Skip to main content

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

Available on PyPI

$ pip install hypertag

Overview

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.

Semantic Search (Experimental): Search through all your text documents (yes, even PDF's) content indexed by HyperTag. This function is powered by the awesome Sentence Transformers library.

Fuzzy Matching Queries: HyperTag uses fuzzy matching to minimize friction in the unlikely case of a typo.

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 (name as query) creation with automatic query result population.

HyperTag Graph: Quickly get an overview of your HyperTag Graph! HyperTag visualizes the metatag graph on every change and saves it at HyperTagFS/hypertag-graph.pdf.

HyperTag Graph Example

CLI Functions

Import existing directory recursively

Import files with tags inferred from the 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

Merge all associations (files & tags) of tag A into tag B

$ hypertag merge human into "Homo Sapiens"

Query using Set Theory

Print file names of the resulting set matching the query. Queries are composed of tags and operands. Tags are fuzzy matched for convenience. Nesting is currently not supported, queries are evaluated from left to right

Print paths: $ hypertag query human --path
Print fuzzy matched tag: $ hypertag query man --verbose
Disable fuzzy matching: $ hypertag query human --fuzzy=0

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"

Index available text files

Only indexed files can be searched.

$ hypertag index

Semantic search indexed text files

Print file names sorted by matching score. Performance is not great right now but hey it works! (will hopefully improve very soon)

$ hypertag search "your important text query

Print all tags of file/s

$ hypertag tags filename1 filename2

Print all metatags of tag/s

$ hypertag metatags tag1 tag2

Print all tags

$ hypertag show

Print all files

Print names: $ hypertag show files

Print paths: $ hypertag show files --path

Visualize HyperTag Graph

Visualize the metatag graph hierarchy (saved at HyperTagFS root)

$ hypertag graph

Specify layout algorithm (default: fruchterman_reingold):

$ hypertag graph --layout=kamada_kawai

Generate HyperTagFS

Generate file system based representation of your files and tags using symbolic links and directories

$ hypertag mount

Start HyperTagFS daemon

Start 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

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 formatter: $ black hypertag/
  • Run linter: $ flake8
  • Run type checking: $ mypy **/*.py
  • Run security checking: $ bandit --exclude tests/ -r .
  • Run HyperTag: $ python -m hypertag

Inspiration

What is the point of HyperTag's existence?
HyperTag offers many unique features such as the import, semantic search, graphing and fuzzy matching functions that make it very convenient to use. All while HyperTag's code base staying tiny at <1000 LOC in comparison to TMSU (>10,000 LOC) and SuperTag (>25,000 LOC), making it easy to hack on.

This project is partially inspired by these open-source projects:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hypertag-0.4.1.1.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

hypertag-0.4.1.1-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file hypertag-0.4.1.1.tar.gz.

File metadata

  • Download URL: hypertag-0.4.1.1.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.10.4-arch2-1

File hashes

Hashes for hypertag-0.4.1.1.tar.gz
Algorithm Hash digest
SHA256 a0a0e77f56d6921b35bb2acb88d3d19a420a50eefb6cf78263f8f1e3bff8dd0d
MD5 a14a92321ea74e900d40557cf022bd32
BLAKE2b-256 8f001ec53b07edcea906dac46e0983cb93c8c5c9204823589f82f70f30d0abaa

See more details on using hashes here.

File details

Details for the file hypertag-0.4.1.1-py3-none-any.whl.

File metadata

  • Download URL: hypertag-0.4.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.10.4-arch2-1

File hashes

Hashes for hypertag-0.4.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97ff1dfb3ab5e8cc8df03fd85d3f12a416406cc3900e5ef7c2cc11e6abe2acf8
MD5 4d2c458c07c3ce1589b6597ba2526785
BLAKE2b-256 0987d5b1756b816772becf2b96dd4cc7c947a69726fd646e7e54c97d124cd8d3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page