Crates.io | fcom |
lib.rs | fcom |
version | 0.1.1 |
source | src |
created_at | 2024-09-15 22:53:15.008031 |
updated_at | 2024-09-16 01:45:23.137798 |
description | A Rust CLI tool that processes folders and files, combining their contents into a single output file. |
homepage | |
repository | https://github.com/pabl-o-ce/fcom |
max_upload_size | |
id | 1375845 |
size | 35,502 |
fcom (short for file_combiner) is a versatile Rust CLI tool designed to process folders and files, combining their contents into a single output file. It offers a range of features for file manipulation and directory analysis.
Clone the repository:
git clone https://github.com/pabl-o-ce/fcom.git
Navigate to the project directory:
cd fcom
Build and install the binary:
cargo install --path .
This will install the fcom
binary in your Cargo bin directory.
fcom provides three main commands:
combine
: Combines multiple files into a single output filetree
: Generates a folder tree structurelist
: Creates a list of files in a folderfcom combine <FOLDER_PATH> [OPTIONS]
Options:
--output <FILE>
: Specify the output file (default: output.txt)--extensions <EXTENSIONS>...
: Specify file extensions to include--ignore <FOLDERS>...
: Specify folders to ignore (default: .git,node_modules,pycache)--add-line-numbers
: Add line numbers to file contents--mode <MODE>
: Specify the output mode (xml, markdown, or custom) (default: xml)--custom-output-template <FILE>
: Specify a custom output template file (required for custom mode)--custom-file-template <FILE>
: Specify a custom file template file (required for custom mode)fcom tree <FOLDER_PATH> [OPTIONS]
Options:
--output <FILE>
: Specify the output file (default: folder_tree.txt)--extensions <EXTENSIONS>...
: Specify file extensions to include--ignore <FOLDERS>...
: Specify folders to ignore (default: .git,node_modules,pycache)fcom list <FOLDER_PATH> [OPTIONS]
Options:
--output <FILE>
: Specify the output file (default: file_list.txt)--extensions <EXTENSIONS>...
: Specify file extensions to include--ignore <FOLDERS>...
: Specify folders to ignore (default: .git,node_modules,pycache)fcom combine /path/to/your/folder --output combined_output.txt --mode xml
fcom tree /path/to/your/folder --output folder_tree.txt
fcom list /path/to/your/folder --output file_list.txt
fcom combine /path/to/your/folder --output combined_output.md --mode markdown --add-line-numbers
fcom combine /path/to/your/folder --output custom_output.txt --mode custom --custom-output-template /path/to/output_template.txt --custom-file-template /path/to/file_template.txt
This project was inspired by Maximilian-Winter's file_combiner. We appreciate their work and the ideas it provided for this implementation.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.