File organization made easy using tags
Project description
HyperTag
File organization made easy. HyperTag let's humans intuitively express how they think about their files using tags.
Install
$ pip install hypertag
Quickstart
HyperTag offers a slick CLI but more importantly it creates a directory called HyperTagFS
which is a file system based representation of your files and tags using symbolic links and directories.
Directory Import: Import your existing directory hierarchies using $ hypertag import path/to/directory
. HyperTag converts it automatically into a tag hierarchy using metatagging.
File Type Groups: HyperTag automatically creates folders containing common files (e.g. Images: jpg, png, etc., Documents: txt, pdf, etc., Source Code: py, js, etc.), which can be found in HyperTagFS
.
HyperTagFS Daemon (Experimental): Monitors HyperTagFS
for user changes. Currently supports file and directory (tag) deletions + directory (query) creation.
CLI Functions
Start HyperTagFS daemon
Starts process watching HyperTagFS dir for user changes.
$ hypertag daemon
Set HyperTagFS directory path
Default is the user's home directory.
$ hypertag set_hypertagfs_dir path/to/directory
Import existing directory recursively
Import files with tags inferred from existing directory hierarchy
$ hypertag import path/to/directory
Tag file/s
Manually tag files
$ hypertag tag humans/*.txt with human "Homo Sapiens"
Untag file/s
Manually remove tag/s from file/s
$ hypertag untag humans/*.txt with human "Homo Sapiens"
Tag a tag
Metatag tag/s to create tag hierarchies
$ hypertag metatag human with animal
Merge tags
Merges all associations (files & tags) of tag A into tag B
$ hypertag merge human into "Homo Sapiens"
Query using Set Theory
Prints file names matching the query. Nesting is currently not supported, queries are evaluated from left to right.
Print paths: $ hypertag query human --path
Default operand is AND (intersection):
$ hypertag query human "Homo Sapiens"
OR (union):
$ hypertag query human or "Homo Sapiens"
MINUS (difference):
$ hypertag query human minus "Homo Sapiens"
Print all tags of file/s
$ hypertag tags filename1 filename1
Print all tags
$ hypertag show
Print all files
Print names:
$ hypertag show files
Print paths:
$ hypertag show files --path
Architecture
- Python powers HyperTag
- SQLite3 serves as the meta data storage engine (located at
~/.config/hypertag/hypertag.db
) - Symbolic links are used to create the HyperTagFS directory structure
Development
- Clone repo:
$ git clone https://github.com/SeanPedersen/HyperTag.git
$ cd HyperTag/
- Install Poetry
- Install dependencies:
$ poetry install
- Activate virtual environment:
$ poetry shell
- Run all tests:
$ pytest -v
- Run Black formatter:
$ black hypertag/
- Run PyLint:
$ pylint **/*.py
- Run MyPy:
$ mypy **/*.py
- Run Bandit:
$ bandit --exclude tests/ -r .
- Run HyperTag:
$ python -m hypertag
Inspiration
This project is inspired by other existing open-source projects:
What is the point of HyperTag's existence? HyperTag offers some unique features such as the import function that make it very convenient to use. Also HyperTag's code base is written in Python and thus extremely small (<500 LOC) compared to TMSU (>10,000 LOC) and SuperTag (>25,000 LOC), making it very easy to modify / extend / fix it yourself.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hypertag-0.2.0.tar.gz
.
File metadata
- Download URL: hypertag-0.2.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.10.3-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df4430b103a7ec7b4da32794879ad8445850b080bc738cd3050059c4c41e9513 |
|
MD5 | 191ea11ce810107bb3ac5257e46ddac5 |
|
BLAKE2b-256 | 191d7464676e2a1a424355f7cb2cf2f96d3952a516bc204750e1b89caebedf79 |
File details
Details for the file hypertag-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: hypertag-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.10.3-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60656b0d39362c69dcb614309f7725354514ab57040cf47156a9593e4dadaf2b |
|
MD5 | feca3aee7a063829c98e95c69f8163c6 |
|
BLAKE2b-256 | 797c751c26fbed9ae3993dd58d5490570796eae86032131555fb25b84e50ffd6 |