ConvFT is a simple CLI tool for converting between file structures and single text file representations. It's ideal for backup, sharing, and reconstructing complex directory hierarchies.
- Convert file structures to a single text file
- Reconstruct file structures from a text file
- Easy installation and uninstallation
- Colorful and informative CLI output
- V programming language (latest version) installed on your system
- Makefile (optional)
First, clone the repository and navigate to the project directory:
git clone https://github.com/Mik-TF/convft_v.git
cd convft_v
ConvFT comes with a Makefile that simplifies the build and installation process. Here are the available commands:
-
To build and install ConvFT:
make build
This command formats the source code, compiles the program, and installs it system-wide.
-
To rebuild and reinstall ConvFT:
make rebuild
This command uninstalls the existing version, formats the source code, recompiles the program, and installs the new version.
-
To uninstall ConvFT:
make delete
This command removes ConvFT from your system.
Note: The Makefile commands require sudo privileges as they involve system-wide installation.
To install ConvFT system-wide manually, run the following commands:
v fmt -w convft.v
v -o convft .
sudo ./convft install
These commands format the source code, compile the program, and install it system-wide.
convft [OPTION]
ft
: Convert files to texttf
: Convert text to filesinstall
: Install ConvFT (requires sudo)uninstall
: Uninstall ConvFT (requires sudo)help
: Display help message
convft ft # Convert current directory to 'all_files_text.txt'
convft tf # Reconstruct files from 'all_files_text.txt'
sudo ./convft install # Install ConvFT system-wide. Must be in the repo directory to work.
sudo convft uninstall # Remove ConvFT from the system
This option scans the current directory and its subdirectories, creating a single text file (all_files_text.txt
) that contains the content of all files along with their relative paths.
This option reads the all_files_text.txt
file and reconstructs the original file structure, creating directories and files as needed.
- The script ignores itself and the output file during the conversion process.
- When reconstructing files, it only creates files in the current directory or its subdirectories for safety.
To remove ConvFT from your system, you can either use the Makefile:
make delete
Or run the uninstall command directly:
sudo convft uninstall
For more information, updates, and to contribute, visit the ConvFT GitHub repository.
This work is under the Apache 2.0 license.