dic-structure-creater-0.1.0 is not a library.
DicStructureCreater
DicStructureCreater is a lightweight, cross-platform CLI tool that parses directory structures from .txt or .md files and generates corresponding folders and files under a specified root directory. By default, it avoids overwriting existing files, and supports dry-run (--dry-run) and force overwrite (--overwrite) modes.
README
Features
- 📁 Automatic generation: Generate folder structures and empty files from
treeASCII diagrams or Markdown-style lists. - 🔒 Safe by default: Existing files won't be overwritten unless explicitly allowed.
- 🔄 Optional overwrite: Use
--overwrite(-O) to force replace files. - 👀 Dry-run support: Use
--dry-run(-d) to preview actions without changing your file system. - ⚙️ Cross-platform: Built with Rust, compatible with Windows, macOS, and Linux.
Installation
Using Cargo
Download Precompiled Binary
- Visit the Releases page:
https://github.com/natsuki221/DicStructureCreater/releases - Download the archive for your OS, extract it, and place
dsc(ordsc.exe) in your system'sPATH.
Example Usage
Given a structure file structure.txt:
src/
├── lib/
│ └── utils.rs
└── main.rs
- Preview only (dry-run):
- Generate structure (without overwriting existing files):
- Force overwrite existing files:
CLI Options
| Option | Description |
|---|---|
STRUCTURE_FILE |
Path to the input structure file (required) |
-r, --root <path> |
Root directory to create files/folders (default: .) |
-O, --overwrite |
Overwrite existing files |
-d, --dry-run |
Show actions without making changes |
-h, --help |
Display help message |
Supported Input Formats
DSC supports two main formats:
- Tree ASCII format:
src/
├── models/
│ └── user.rs
└── main.rs
- Markdown list format:
- - - -
Note: Lines ending with
/are treated as folders; otherwise, they are considered files.
Contributing
Contributions are welcome! You can submit Issues, Pull Requests, suggestions, or bug reports.
Steps:
- Fork this repository
- Create a new branch (
git checkout -b feature/your-feature) - Implement your changes
- Submit a Pull Request
License
This project is licensed under the MIT License. See LICENSE for details.
For questions, feel free to open an issue or discussion. Happy hacking! 🚀