{"id":23317112,"url":"https://github.com/berquerant/fflist","last_synced_at":"2025-04-07T03:53:33.066Z","repository":{"id":268180411,"uuid":"903564631","full_name":"berquerant/fflist","owner":"berquerant","description":"Search for media files and display the paths of matching files.","archived":false,"fork":false,"pushed_at":"2025-03-17T20:00:39.000Z","size":138,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T20:40:18.795Z","etag":null,"topics":["go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/berquerant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-14T23:28:40.000Z","updated_at":"2025-03-17T19:59:30.000Z","dependencies_parsed_at":"2024-12-15T00:23:47.729Z","dependency_job_id":"e4c85173-5e92-410b-ae37-011a46ef597d","html_url":"https://github.com/berquerant/fflist","commit_stats":null,"previous_names":["berquerant/fflist"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquerant%2Ffflist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquerant%2Ffflist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquerant%2Ffflist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquerant%2Ffflist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/berquerant","download_url":"https://codeload.github.com/berquerant/fflist/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247589832,"owners_count":20963022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go"],"created_at":"2024-12-20T16:20:07.151Z","updated_at":"2025-04-07T03:53:33.031Z","avatar_url":"https://github.com/berquerant.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fflist\n\nSearch for media files and display the paths of matching files.\n\n## Installation\n\n``` shell\n./task build\n```\n\n## Requirements\n\n- ffprobe 7.1 https://ffmpeg.org/ffprobe.html\n\n## Usage\n\n``` shell\n❯ fflist query --help\nSearch for media files and display the paths of matching files.\n\nThe QUERY is a string in the 'key=value' format.\nThe 'key' refers to the name of the metadata of the media file, and the 'value' is a regular expression.\nIf the value corresponding to 'key' matches the 'value', the file path will be output to standard output.\nIf there are multiple QUERY, the file paths that match all QUERY will be output.\n\nIf the QUERY contains \"or\" or \"OR,\" it splits the QUERY into groups based on that.\nWithin a group, conditions are evaluated with AND, while between groups, they are evaluated with OR.\nFor example, in \"name=NAME1 OR name=NAME2 artist=ARTIST\" the output will include files that either meet name=NAME1 or both name=NAME2 and artist=ARTIST.\n\nThe available 'key' include the following:\n\n- name: The name of the file\n- path: The path of the file\n- mode: The file permissions (in octal)\n- mod_time: The last modification time of the file\n- size: The file size (in bytes)\n- dir: All but the last element of path\n- ext: The file name extension\n- basename: name but ext\n- basepath: path but ext\n\nDepending on the type of media file, the following 'key' may also be available:\n\n- album\n- artist\n- composer\n- genre\n\nNote: All metadata values are interpreted as strings.\n\nTo check which 'key' are actually available, please use the 'fflist debug' command or the '--verbose' option.\n\nUsing sh 'key' allows you to execute a sh script and output the file path only if the exit status is 0.\nThe value of sh 'key' is the main body of the script, and environment variables are available.\nThe script receives the entire file metadata in jsonl format from standard input.\nFor example, by writing a QUERY like the following, you can output only the file paths of files that exceed 8,000,000 bytes in size.\n\n  'sh=jq \"select((.size|tonumber) \u003e 8000000).name\" -r | grep -E \".+\" -q'\n\nUsing the '--config' option allows you to specify the search directory and QUERY from a file.\nThe file has the following format:\n\nroot:\n  - ROOT1\n  - ROOT2\n\nquery:\n  - - name=NAME1\n  - - name=NAME2\n    - artist=ARTIST\n\nor\n\n{\n  \"root\": [\"ROOT1\", \"ROOT2\"],\n  \"query\": [\n    [\"name=NAME1\"],\n    [\"name=NAME2\", \"artist=ARTIST\"]\n  ]\n}\n\n'query' is an array of query groups.\nNested conditions are evaluated with AND, while top-level conditions are evaluated with OR.\nIn the above example, it means 'name=NAME1 OR (name=NAME2 AND artist=ARTIST)'.\n\nWhen the '--config' option is specified, the '--root' option and QUERY arguments are ignored.\n\nYou can use environment variables (e.g. '$VARNAME') in the file specified by the --config option, as well as in the --root option and QUERY arguments.\n\nExmaples:\n# in ~/Music, match name\nfflist query -r ~/Music 'name=NAME'\n# in ~/Music, match artist and genre\nfflist query -r ~/Music 'artist=ARTIST' 'genre=GENRE'\n# in ~/Music, either meet name=NAME1 or both name=NAME2 and artist=ARTIST\nfflist query -r ~/Music name=NAME1 OR name=NAME2 artist=ARTIST\n# read paths from stdin, match name\nfflist query -r - name=NAME \u003c path.list\n# create index of ~/Music\nfflist query -r ~/Music --createIndex \u003e index\n# in the index, match name\nfflist query --readIndex index 'name=NAME'\n# create index from config\nfflist query -c config.yml --createIndex \u003e index\n# read index and query config\nfflist query -c config.yml --readIndex index\n\nUsage:\n  fflist query [QUERY...] [flags]\n\nFlags:\n  -c, --config string       Query config file\n      --createIndex         Dump all metadata. Equivalent to '--verbose' and ignoring all QUERY\n  -h, --help                help for query\n  -i, --readIndex strings   Read metadata from the specified files instead of scanning the directory specified by '--root' or config.root.\n                            Read metadata from stdin by '-'\n  -r, --root strings        Root directories. Read paths from stdin by '-' (default [.])\n  -v, --verbose             Verbose output. Output metadata to stdout and metrics to stderr\n  -w, --worker int          Probe worker num (default 8)\n\nGlobal Flags:\n      --debug          Enable debug logs\n  -p, --probe string   Media analyzer command (default \"ffprobe\")\n  -q, --quiet          Quiet logs except ERROR\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberquerant%2Ffflist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberquerant%2Ffflist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberquerant%2Ffflist/lists"}