{"id":15045605,"url":"https://github.com/kdabir/directree","last_synced_at":"2025-04-10T00:43:29.273Z","repository":{"id":48693494,"uuid":"15917405","full_name":"kdabir/directree","owner":"kdabir","description":"A Simple DSL to create Directory Tree with Text Files","archived":false,"fork":false,"pushed_at":"2021-07-13T23:14:55.000Z","size":237,"stargazers_count":15,"open_issues_count":9,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T00:43:24.460Z","etag":null,"topics":["directory","dsl","file","groovy","jvm","tree"],"latest_commit_sha":null,"homepage":null,"language":"Groovy","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/kdabir.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}},"created_at":"2014-01-14T22:18:57.000Z","updated_at":"2025-02-24T03:03:03.000Z","dependencies_parsed_at":"2022-09-14T12:50:55.440Z","dependency_job_id":null,"html_url":"https://github.com/kdabir/directree","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdabir%2Fdirectree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdabir%2Fdirectree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdabir%2Fdirectree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdabir%2Fdirectree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kdabir","download_url":"https://codeload.github.com/kdabir/directree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137998,"owners_count":21053775,"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":["directory","dsl","file","groovy","jvm","tree"],"created_at":"2024-09-24T20:52:04.605Z","updated_at":"2025-04-10T00:43:29.253Z","avatar_url":"https://github.com/kdabir.png","language":"Groovy","readme":"DirecTree\n---------\n\nA Simple DSL for :\n- Creating directory trees with text files (with contents).\n- Keeping multiple source directories in sync with a target directory.\n\n![Build](https://github.com/kdabir/directree/workflows/Build/badge.svg)\n\n\u003e directree is available in `jcenter` maven repository.\n\n```groovy\n@Grab('io.github.kdabir.directree:directree:0.3.2')\nimport static directree.DirTree.create\n\ncreate(\"my-dir\") {\n    dir (\"todo\") {\n        file \"first.txt\", \"check out this new library\"\n    }\n\n    file (\"README.md\") { \"\"\"\n        Directree\n        ${'='*80}\n\n        There are multiple ways in which content can be written to a file.\n        after all, its all a valid groovy code.\n        \"\"\".stripIndent()\n    }\n}\n```\n\n#### Verifying it:\n\n`$ tree my-dir`\n\n    my-dir\n    |-- README.md\n    `-- todo\n        `-- first.txt\n\n    1 directory, 2 files\n\n`$ cat my-dir/README.md`\n\n    Directree\n    ================================================================================\n\n    There are multiple ways in which content can be written to a file.\n    after all, its all a valid groovy code.\n\n`$ cat my-dir/todo/first.txt`\n\n    check out this new library\n\n#### More realistic example\n\nYou can create a project structure:\n\n```groovy\ncreate(\"my-project\") {\n    dir \"src\" , {\n        file \"hello.groovy\", \"println 'hello world'\"\n    }\n    dir \"test\", {\n        file \".gitkeep\"\n    }\n    file \"build.gradle\" , \"\"\n    file \".gitignore\", \"*.class\"\n}\n```\n\n`create(\".\")` will create the files and directories in current directory.\n\n\n","funding_links":[],"categories":["File System Utilities"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkdabir%2Fdirectree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkdabir%2Fdirectree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkdabir%2Fdirectree/lists"}