https://github.com/axect/rustag
Rustag, a Rust-built command-line tool, simplifies file organization through custom tagging and swift fuzzy search, enhancing file management directly from your terminal.
https://github.com/axect/rustag
Last synced: about 2 months ago
JSON representation
Rustag, a Rust-built command-line tool, simplifies file organization through custom tagging and swift fuzzy search, enhancing file management directly from your terminal.
- Host: GitHub
- URL: https://github.com/axect/rustag
- Owner: Axect
- License: apache-2.0
- Created: 2023-12-12T06:56:16.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-12T07:24:40.000Z (over 1 year ago)
- Last Synced: 2025-04-12T16:10:15.390Z (about 2 months ago)
- Language: Rust
- Size: 15.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rustag
Rustag is a Rust-based command-line tool for organizing and tagging files on your system. It allows users to tag files with custom labels and retrieve them easily using a fuzzy search interface.
## Features
- **File Tagging**: Assign custom tags to your files for easy organization.
- **Fuzzy Search**: Easily find your files using a fuzzy search interface.
- **File Management**: Open files or their containing folders directly from the command line.## Installation
To install Rustag, ensure you have Rust and Cargo installed on your system.
Then run the following command:```bash
cargo install rustag
```And for additional features, add the following to your `~/.bashrc` or `~/.zshrc`:
```bash
rtg() {
RUSTAG=$(rustag $@)
# RUSTAG contains "Error" then just print else cd $(RUSTAG)
if [[ $RUSTAG == *"Error"* ]]; then
echo $RUSTAG
else
cd $RUSTAG
fi
}
```Then run `rtg` to get started.
## Setup
Upon first run, Rustag will create a `.rustag` directory in your home folder to store its data. This includes a `tagfile` that maintains the tag information.
## Usage
### Tagging a File
To tag a file, run Rustag with the file name as an argument:
```bash
rtg filename.ext
```Follow the prompts to select existing tags or create a new one.
### Retrieving Files
To view and open files associated with a tag:
1. Run Rustag without any arguments.
2. Select a tag from the list.
3. Choose a file to open or a related action.## Data Structure
Rustag uses several custom data structures:
- `AGFile`: Represents a tagged file, including metadata such as creation date and file path.
- `AGTag`: Represents a tag, associated with multiple `AGFile` instances.
- `AGTagList`: Manages the collection of tags and their associated files.## Contributing
Contributions are welcome! Feel free to open issues or submit pull requests.