zsh-users
 help / color / mirror / code / Atom feed
* tss, a tool to manage files with filename tags
@ 2023-07-28 20:12 Johan Grande
  2023-07-29 12:57 ` Thomas Lauer
  0 siblings, 1 reply; 5+ messages in thread
From: Johan Grande @ 2023-07-28 20:12 UTC (permalink / raw)
  To: zsh

Hi all. I thought I should present what I've been working on for the 
past weeks.

This is my first time developing anything half-serious in zsh. I'd love 
some thoughts on it or even a code review if anybody feels like it.

I took this project as an exercise and aimed to write as clean and 
robust code as I could, offer decent completion (though I admit I only 
understand the most simple features of the system), and have automated 
testing for the core features.

The code: https://github.com/nahoj/tss
git clone https://github.com/nahoj/tss.git

## What it does

tss is a tool to tag and find files with tags à la TagSpaces (a 
graphical tool), i.e., tags in file names such as "IMG-2653[vacation 
alps].jpg".

As you can guess, one can perfectly manage such files without any 
specialized tool, which was part of the appeal of this tagging system to 
me. But after a couple of years of tagging my files half in TagSpaces, 
half by hand, I thought a dedicated CLI tool would be handy after all.

$ ls
IMG-2653.jpg
$ tss add 'vacation alps' IMG-2653.jpg
$ tss files -t 'alps' *
IMG-2653[vacation alps].jpg
$ cp "IMG-2653[vacation alps].jpg" "IMG-2653_copy[vacation alps copy].jpg"
$ tss files -t 'alps' -T 'copy' *  # or --tags 'alps' --not-tags 'copy'
IMG-2653[vacation alps].jpg

### Glob patterns

$ tss remove 'v* a*' "IMG-2653_copy[vacation alps copy].jpg"
$ find | tss filter -t '(alps|pyrenees)'
./IMG-2653[vacation alps].jpg

### Completion

$ tss query -t tag1 <tab>           # Files with tag1
$ tss query -t tag1 path/ -t <tab>  # Tags found on files that have tag1 
in path/
$ tss add tag1 <tab>                # Files that don't have tag1

Best,

-- 
Johan


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-07-30 18:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-28 20:12 tss, a tool to manage files with filename tags Johan Grande
2023-07-29 12:57 ` Thomas Lauer
2023-07-29 13:51   ` Johan Grande
2023-07-30 17:34     ` Thomas Lauer
2023-07-30 18:12       ` Johan Grande

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).