{"id":18994922,"url":"https://github.com/wevre/pptree","last_synced_at":"2026-06-13T21:32:56.966Z","repository":{"id":90724944,"uuid":"283078498","full_name":"wevre/pptree","owner":"wevre","description":"Clojure utility for displaying arbitrary filenames in an outline, like `tree` command.","archived":false,"fork":false,"pushed_at":"2021-03-19T05:25:52.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-21T11:52:53.816Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wevre.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","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":"2020-07-28T02:43:27.000Z","updated_at":"2021-03-19T05:25:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"a643e6f9-3a9a-4d9c-8a25-29b2c99fbd22","html_url":"https://github.com/wevre/pptree","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wevre/pptree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wevre%2Fpptree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wevre%2Fpptree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wevre%2Fpptree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wevre%2Fpptree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wevre","download_url":"https://codeload.github.com/wevre/pptree/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wevre%2Fpptree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34301730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-11-08T17:27:36.219Z","updated_at":"2026-06-13T21:32:56.948Z","avatar_url":"https://github.com/wevre.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pptree\n\nA utility for creating a tree diagram (_à la_ unix `tree` command) for arbitrary\nlists of filenames. By 'arbitrary', I mean that, unlike the `tree` command, you\ndon't have to list out all the files in a directory, you can print a tree for\nthe two or three files you care about, they can be from completely different\nsub-directories, and they don't even need to _be_ real files, the input just\nneeds to be strings with separators that _look_ like files, and `pptree` will\nsort them and display them in an outline showing the hierarchy.\n\n# How to install\n\nClone the repository to your computer, change to its directory, and run the\nfollowing\n\n```\nmkdir classes\nclj -e \"(compile 'wevre.pptree.main)\"\nclj -A:uberjar\n```\n\nto make an executable jar file in 'target' directory of the project. If you\nwant, make an alias to that jar file so it can be invoked with `pptree` from the\ncommand line. For example, in `~/.bashrc` place the following line\n\n```\nalias pptree='java -jar \u003cpath to project\u003e/target/pptree.jar'\n```\n\n# How to use\n\nAssuming you created the executable jar file and alias as above, you could then\nrun the command with something like:\n\n```\npptree\n~/Documents/Important Files/file2.txt\n~/Documents/Important Files/file10.txt\n~/Documents/Important Files/file1.txt\n^D\n```\n\nNote that the lines above indicate the following steps: typing 'pptree', hitting\nreturn, typing three file names, hitting return after each one, and then typing\nCTRL+D. This will run the `pptree` command and generate the following output:\n\n```\n~/Documents/Important Files/\n├── file1.txt\n├── file2.txt\n└── file10.txt\n```\n\nAlso, try running `pptree` using the contents of the sample test input and\ntrying out the various command line options, `-h`, `-l`, `-F`, `-f`, `-I`, for\nexample:\n\n```\npptree -h \u003c resources/test1.txt\n```\n\nTo come full circle, you could _re-create_ the results of the tree command\n(meaning you could get a tree printout of the current directory and\nsub-directories -- the same thing that the `tree` command already does) with\nsomething like this:\n\n```\nfind \"$PWD\" -type f | pptree\n```\n\nwhich of course is completely pointless, except that when I did this in the\nproject directory, and scrolled through the (many screenfuls of) output, I was\nhappy to see that the natural sorting algorithm kicked in. For example, under\nthe `classes/` directory that Clojure creates, there are many files with a\nnumber at the end of their name, and since `pptree` uses\n[natural-compare](https://github.com/wevre/natural-compare) they were ordered\nproperly, unlike the `tree` command which sorts lexically (it has other sorting\noptions, but not natural sorting).\n\n# Why did I create this?\n\nAt work I often send file locations to team members, and instead of just a list,\nI wanted to be able to send something more visual that captured the hierarchy,\nsomething like an outline, ...something like the `tree` command! But I didn't\nwant an entire directory like the `tree` command would give me, I wanted it to\nwork on a list of _arbitrary_ files (see opening paragraph), plus I was on\nWindows and I didn't know if such a thing as the `tree` command even existed\n(I've since learned that yes it does, but, still, _arbitrary_) so I decided to\nwrite my own. My first version, which I still use at work, was in Python, and\nthen I later rewrote it in Clojure, which is what you are looking at now.\n\n# How does it work?\n\nSection to be written. Maybe I'll do a blog post or something, though I don't\ncurrently have a blog. There are lots of problem spaces to explore with this\nlittle project: parsing command-line options, recursion, using Clojure zippers\nand tree walkers, lots of interesting stuff.\n\n# License\n\nCopyright © 2020 Mike Weaver\n\nLicensed under the terms of the Eclipse Public License 2.0, see\n[license.txt](https://github.com/wevre/pptree/blob/master/license.txt).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwevre%2Fpptree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwevre%2Fpptree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwevre%2Fpptree/lists"}