RodoFS is a FUSE-based virtual filesystem that provides tag-based organization for your files using Redis as a persistent metadata store. Instead of traditional hierarchical directory structures, RodoFS allows you to organize and access files through taxonomies, tags, and flexible rule-based queries.
- Tag-Based Organization: Classify files using custom taxonomies and tags
- Virtual Filesystem: Access tagged resources through a FUSE-mounted directory structure
- Redis Backend: Fast, persistent metadata storage
- Rule-Based Filtering: Create dynamic collections based on tag rules
- MD5 Deduplication: Automatic identification of duplicate files
- Multi-URL Support: Associate multiple URLs/locations with a single resource
- Auto-Tagging: Automatically tag files based on filename patterns
- Flexible Querying: Browse files by tags or search by MD5
rodofs/
├── lib/
│ ├── rodofs.rb # Main module entry point
│ └── rodofs/
│ ├── version.rb # Version information
│ ├── rodo_object.rb # Object model for resources, taxonomies, tags, and rules
│ └── fuse_dir.rb # FUSE filesystem implementation
├── bin/
│ └── rodofs # Command-line executable
├── scripts/
│ ├── plumb # Generic file viewer/editor launcher
│ ├── rodo-tag # Perl utility to manually tag files
│ ├── rodo-autotag # Perl utility for automatic tagging
│ ├── rodo-check # Perl utility to check file metadata
│ └── rodo-del # Perl utility to delete file metadata
└── test/
├── rodofstest.rb # Integration tests
└── RodoObjectTest.rb # Unit tests
When mounted, RodoFS exposes the following virtual directories:
/
├── ctl # Control file for commands
├── tax/ # Taxonomies directory
│ └── <taxonomy>/
│ └── <tag>/
│ └── <file>
├── res/ # Resources matching current rule
├── rules/ # Rule-based dynamic collections
│ └── <rule>/
│ ├── ctl
│ └── <file>
└── auto/ # Auto-tagging rule definitions
# Clone the repository
git clone https://github.com/mmirko/rodofs.git
cd rodofs
# Build and install the gem
gem build rodofs.gemspec
gem install rodofs-0.1.0.gem
# Or install dependencies for development
bundle install# Clone and setup
git clone https://github.com/mmirko/rodofs.git
cd rodofs
bundle installSystem Requirements:
- Ruby 2.6 or later
- FUSE libraries (libfuse)
- Redis server
- Perl 5 (for utility scripts)
Install system dependencies:
sudo apt-get install ruby fuse libfuse-dev redis-server perlOn Debian/Ubuntu:
sudo apt-get install ruby fuse libfuse-dev redis-server perlOn Fedora/RHEL:
sudo dnf install ruby fuse fuse-devel redis perlStart Redis server:
sudo systemctl start redis
# or run manually:
redis-server# Start Redis if not already running
redis-server &
# Create a mountpoint
mkdir -p /tmp/rodofs
# Mount RodoFS
rodofs /tmp/rodofs
# In another terminal, use the filesystem
cd /tmp/rodofsSet environment variables to configure RodoFS:
REDIS_HOST: Redis server hostname (default:127.0.0.1)REDIS_PORT: Redis server port (default:6379)RODOFS_LANG: Language code (default:it)
Example:
REDIS_HOST=myredis.local REDIS_PORT=6380 rodofs /tmp/rodofsbundle exec scripts/rodo-tag -T "subject=physics,type=paper" /path/to/document.pdf
**Auto-tagging based on filename patterns:**
```bash
bundle exec scripts## Basic Workflow
#### 1. Create a Taxonomy and Tags
```bash
cd /path/to/mountpoint
mkdir -p tax/subject/physics
mkdir -p tax/subject/mathematics
Manual tagging:
./rodo-tag -T "subject=physics,type=paper" /path/to/document.pdfAuto-tagging based on filename patterns:
./rodo-autotag -s /path/to/directory# Access files through taxonomy structure
ls tax/subject/physics/
# Use rules to create dynamic views
echo "rule: subject=physics" > ctl
ls res/./rodo-check /path/to/document.pdf./rodo-del /path/to/document.pdfCreate rules to filter resources:
# Positive match: files tagged with subject=physics
echo "rule: subject=physics" > ctl
# Negative match: files NOT tagged with subject=physics
echo "rule: subject!=physics" > ctlFind files by MD5 hash:
MD5=$(md5sum myfile.pdf | cut -d' ' -f1)
echo "md5: $MD5" > ctl
ls res/Create named rules:
mkdir rules/physics-papers
echo "rule: subject=physics" > rules/physics-papers/ctl
ls rules/physics-papers/Resource metadata files contain key-value pairs:
oid: 42
tags: subject=physics subject=quantum_mechanics
url: file:///home/user/documents/paper.pdf
mime: application/pdf
md5: d41d8cd98f00b204e9800998ecf8427e
A smart file launcher that uses file type and RodoFS metadata:
# View files in current directory matching pattern
./plumb -f -s "*.pdf"
# Use tag-based view
./plumb -t -T "subject=physics" -s
# Random file selection (no repetitions)
./plumb -t -T "subject=physics" -R -c 5
# Show filenames only
./plumb -t -L
# Launch editor instead of viewer
./plumb -f -e "document.txt"Edit rodofs.rb to change Redis connection settings:
r = Redis.new(:host => "127.0.0.1", :port => 6379)The default language can be changed in rodofs.rb:
root = RodoFS.new('it', r) # Change 'it' to your preferred languageIf you see errors about fusefs, make sure you've installed rfusefs:
gem uninstall fusefs # Remove old gem if present
gem install rfusefsEnsure your user has permission to mount FUSE filesystems:
sudo usermod -a -G fuse $USER
# Log out and back inVerify Redis is running:
redis-cli ping
# Should return: PONGThis version has been updated for compatibility with modern Ruby (2.4+) and Redis gem (4.2+):
Fixnum→Integer(Ruby 2.4+)Redis.exists()→Redis.exists?()(redis gem 4.2+)fusefs→rfusefs(actively maintained FUSE library)
All Perl scripts have been updated for modern Perl compatibility.
# Build gem package
gem build rodofs.gemspec
# Install locally
gem install rodofs-0.1.0.gem
# Or use bundler for development
bundle installcd test
ruby RodoObjectTest.rb
ruby rodofstest.rbThe gem follows standard Ruby conventions:
lib/rodofs.rb- Main entry point and public APIlib/rodofs/- Internal modules and classesversion.rb- Version constantrodo_object.rb- Data model for Redis-backed objectsfuse_dir.rb- FUSE filesystem implementation
bin/rodofs- Command-line executablescripts/- Perl utility scripts for file tagging and management
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -am 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Contributions are welcome! Please feel free to submit pull requests or open issues on GitHub.
Licensed under the Apache License 2.0. See LICENSE file for details.
Copyright 2014-2026 - Mirko Mariotti
- Website: https://www.mirkomariotti.it
- GitHub: https://github.com/mmirko/rodofs