text2code
is a command-line tool designed to reconstruct a project's directory and files from a consolidated text file. It specifically uses output generated by code2text
, a tool that consolidates code files into a single text document.
This tool is intended to work with output from code2text
, which creates a text file of a project's code files with their paths.
- Go (1.15 or later) [Only if installing from source]
To install text2code
from source using Go, ensure your environment is set up with GOPATH/bin
in your PATH
and then run:
go install github.com/forrest21/text2code@latest
This command will compile the program and place the executable in your GOPATH/bin, making it executable from anywhere on your command line.
To use text2code, simply provide the path to the consolidated text file produced by code2text: text2code <path_to_text_file>
The tool reads the text file, recreates the directory structure, and restores all files as specified.
Contributions are welcome! Please fork the repository, make your modifications, and submit a pull request.
text2code is released under the MIT License. See the LICENSE file in the repository for details.