Skip to content
/ tag Public
forked from tokuchan/tag

A simple python 3 utility to get, set, and search tags on files.

Notifications You must be signed in to change notification settings

kdgerring/tag

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

""" Usage: tag.py [-v|-q] tags
tag.py [-v|-q] get
tag.py [-v|-q] set tag.py -h | --help tag.py --version

Options: -h, --help Show this help message and exit
-v, --verbose If set, make the application emit DEBUG log statements.
-q, --quiet If set, make the application silent except for errors.

Commands: set Process the tagexpr and set the file to have matching tags. get Process the tagexpr and find all matching files. tags Given a file, return the set of tags for that file.

Tagexprs: A tag expression, or tagexpr, is a query statement that allows the user to precisely specify which tags to match in a query. An expression follows this grammar:

<expr> := [<tag>]
<tag> := <mustHaveTag> | <mustNotHaveTag> | <canHaveTag>
<mustHaveTag> := "+" <tagstring>
<mustNotHaveTag> := "-" <tagstring>
<canHaveTag> := <tagstring>

A is any arbitrary string of characters. An example expression is "+foo -bar baz", which only matches files that have a "foo" tag, do not have a "bar" tag, and may have a "baz" tag. In set, "+tag" and "tag" both mean to add that tag to the file, while "-tag" means to remove that tag from the file. """

About

A simple python 3 utility to get, set, and search tags on files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.3%
  • JavaScript 0.7%