fcom-0.1.0 is not a library.
fcom (file_combiner)
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.
Features
- Combine multiple files into a single output file
- Generate folder tree structures
- Create file lists
- Support for custom output formats (XML, Markdown, or custom templates)
- Option to add line numbers to file contents
- Ignore specific folders and filter by file extensions
Installation
Prerequisites
- Rust and Cargo (Install from https://www.rust-lang.org/tools/install)
Steps
-
Clone the repository:
-
Navigate to the project directory:
-
Build and install the binary:
This will install the fcom binary in your Cargo bin directory.
Usage
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 folder
combine
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)
tree
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)
list
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)
Examples
Combine files in XML format
Generate a folder tree
Create a file list
Combine files in Markdown format with line numbers
Use custom templates
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.