{"id":48357128,"url":"https://github.com/thingsiplay/fpath","last_synced_at":"2026-04-05T11:33:54.998Z","repository":{"id":239442652,"uuid":"799071038","full_name":"thingsiplay/fpath","owner":"thingsiplay","description":"Reformat and stylize file path like text output.","archived":false,"fork":false,"pushed_at":"2024-06-07T03:00:42.000Z","size":265,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-08T02:25:51.598Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/thingsiplay.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","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-05-11T05:26:42.000Z","updated_at":"2024-06-07T03:00:46.000Z","dependencies_parsed_at":"2024-05-17T20:29:40.888Z","dependency_job_id":"abb0e46f-d111-42fd-bc0c-3df3cda50472","html_url":"https://github.com/thingsiplay/fpath","commit_stats":null,"previous_names":["thingsiplay/fpath"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thingsiplay/fpath","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsiplay%2Ffpath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsiplay%2Ffpath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsiplay%2Ffpath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsiplay%2Ffpath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thingsiplay","download_url":"https://codeload.github.com/thingsiplay/fpath/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsiplay%2Ffpath/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31434624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T08:13:15.228Z","status":"ssl_error","status_checked_at":"2026-04-05T08:13:11.839Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-04-05T11:33:54.901Z","updated_at":"2026-04-05T11:33:54.974Z","avatar_url":"https://github.com/thingsiplay.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fpath\n\nReformat and stylize file path like text output.\n\n- Author: Tuncay D.\n- Source: [Github](https://github.com/thingsiplay/fpath)\n- License: [MIT License](LICENSE)\n\n![screenshot: mix blue and red style](img/blue_and_red.png)\n\n## Introduction\n\nConvenience script to style and reformat output from a list of file path like\ndata. Transform output from `ls`, `find` or any other file listing into a new\nstructure or just add colors. Operates mostly on text based data, but has\nspecial options and commands to access file system for additional information.\n\n## Installation\n\nThis is a Python script. It is written for Linux, has no external library\ndependency, but rely on a standard Linux program called `file` for very few\noperations. Just download the script and give it the executable bit and put\nit into a directory where your executable files are located.\n\n```bash\ngit clone https://github.com/thingsiplay/fpath\ncd fpath\nchmod +x fpath\n```\n\n## Usage\n\n```bash\npaths... | fpath [options] [--] [path...]\n\n\\ls -1 | fpath\n\nfpath *.txt\n```\n\nBy default stdin is parsed as a list of paths split by newline character.\nAdditionally paths can be given as arguments too. All input paths are output\nback to stdout. Without any options, following operations are done\nautomatically:\n\n- remove surrounding quotes `''` and double quotes `\"\"` (see global option `-q`\n  and `-Q`)\n- remove leading `./` for relative paths (see global option `-d`)\n- remove trailing `/`\n- expand leading `~` to users home directory path (see global option `-t`)\n- print path to stdout (see global option `-F`)\n\nThe stdin can be ignored with option `-z`. Double dash `--` tells the script to\nstop looking for options that start with a dash (such as `-t`) and treat\neverything after it as an input path instead. List all available global options\nwith `-h` or `--help` .\n\n### Colorize the path separator\n\nOption `-s` for short or `--sep-style` will change the look of the path\nseparator, which is the slash `/` by default. Use option `--explain style`\nto list available colors and effects.\n\n```bash\nfpath --explain style\n\nfpath -s red\n```\n\n### Advanced formatting\n\nOption `-F` for short or `--format` controls look and structure of output\nentirely. Using this option, by default nothing is output unless you tell it\nwith specific control sequences. These control sequences (also sometimes called\ncommands) have to be enclosed between curly braces `{` and `}` to be recognized\nand will be replaced with their evaluated content. Use option `--explain fmt`\nto list available control sequences.\n\n```bash\nfpath --explain fmt\n\nfpath -F {path}\n```\n\nNote: Advanced formatting with `-F` also supports styles, but they have to be\nput in curly braces too here. Also style commands can have an end tag to\nspecify what portion should be affected, in example `{red}some text{/color}` .\n\n## Documentation\n\nFor more in depth explanation, have a look at the docs:\n\n- [Literals](doc/literals.md): A list of escape sequences, that are\n  translated into a specific character or control sequence for the terminal.\n- [Styles](doc/styles.md): List of available style commands.\n- [Fmt](doc/fmt.md): List of available format commands.\n\nAnd there is a step by step tutorial going through some commands and showing\ntheir output:\n\n- [Tutorial](doc/tutorial.md): Starts off with basic command usage and\n  gradually gets more advanced.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthingsiplay%2Ffpath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthingsiplay%2Ffpath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthingsiplay%2Ffpath/lists"}