{"id":16540822,"url":"https://github.com/itzg/file-tree-as-json","last_synced_at":"2025-04-04T20:45:42.608Z","repository":{"id":65339856,"uuid":"578443377","full_name":"itzg/file-tree-as-json","owner":"itzg","description":"Walks one or more directories capturing the file/directory tree into a JSON format","archived":false,"fork":false,"pushed_at":"2025-03-17T23:33:08.000Z","size":144,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T00:29:44.538Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itzg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-12-15T04:12:16.000Z","updated_at":"2025-03-17T23:33:04.000Z","dependencies_parsed_at":"2023-11-07T04:14:55.120Z","dependency_job_id":"843704af-66e8-414f-b0a7-5577a684b05a","html_url":"https://github.com/itzg/file-tree-as-json","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itzg%2Ffile-tree-as-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itzg%2Ffile-tree-as-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itzg%2Ffile-tree-as-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itzg%2Ffile-tree-as-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itzg","download_url":"https://codeload.github.com/itzg/file-tree-as-json/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249601,"owners_count":20908211,"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":[],"created_at":"2024-10-11T18:53:23.947Z","updated_at":"2025-04-04T20:45:42.578Z","avatar_url":"https://github.com/itzg.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Walks one or more directories capturing the file/directory tree into a JSON format.\n\n## Usage\n\n```\nUsage: file-tree-as-json [-h] [--debug] [-o=FILE] PATH...\n      PATH...         One or more paths to process\n      --debug         Enable debug logs\n  -h, --help          Show usage\n  -o, --output=FILE   If not provided, JSON is output to stdout\n```\n\n## Example output\n\n```json\n{\n  \"C:\\\\projects\\\\file-tree-as-json\\\\src\" : {\n    \"children\" : [ {\n      \"path\" : \"main\",\n      \"children\" : [ {\n        \"path\" : \"java\",\n        \"children\" : [ {\n          \"path\" : \"app\",\n          \"children\" : [ {\n            \"path\" : \"FilenameSerializer.java\"\n          }, {\n            \"path\" : \"FileTreeAccumulator.java\"\n          }, {\n            \"path\" : \"FileTreeAsJson.java\"\n          }, {\n            \"path\" : \"FileTreeEntry.java\"\n          } ]\n        } ]\n      }, {\n        \"path\" : \"resources\",\n        \"children\" : [ {\n          \"path\" : \"logback.xml\"\n        }, {\n          \"path\" : \"schema.json\"\n        } ]\n      } ]\n    }, {\n      \"path\" : \"test\",\n      \"children\" : [ {\n        \"path\" : \"java\",\n        \"children\" : [ ]\n      }, {\n        \"path\" : \"resources\",\n        \"children\" : [ ]\n      } ]\n    } ]\n  }\n}\n```\n\n## Output Schema\n\n```json\n{\n  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n  \"description\": \"Map of root paths to its tree\",\n  \"type\": \"object\",\n  \"additionalProperties\": {\n    \"type\": \"object\",\n    \"properties\": {\n      \"children\": {\n        \"type\": \"array\",\n        \"items\": {\n          \"$ref\": \"#/definitions/FileTreeEntry\"\n        }\n      }\n    }\n  },\n  \"definitions\": {\n    \"FileTreeEntry\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"path\": {\n          \"description\": \"The subpath of this entry\",\n          \"type\": \"string\"\n        },\n        \"children\": {\n          \"description\": \"If present, indicates that this subpath is a directory with the given entries\",\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FileTreeEntry\"\n          }\n        }\n      },\n      \"required\": [\"path\"]\n    }\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitzg%2Ffile-tree-as-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitzg%2Ffile-tree-as-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitzg%2Ffile-tree-as-json/lists"}