codetag - tmsu wrapper to tag source files

17 views
Skip to first unread message

Mike Kazantsev

unread,
Mar 1, 2013, 7:26:15 AM3/1/13
to tm...@googlegroups.com

Hi, list.


Wrote this tmsu wrapper tool about a month ago to scan directories,
finding repositories and filename/shebang patterns and tag the files
accordingly:

https://github.com/mk-fg/codetag


Idea is to then use tmsu directly like "tmsu files lang:py" to find all
python sources in one's "dev area".

Other currently supported tags are, as mentioned, repository scm tags
(e.g. "scm:git" or "scm:hg") and code hosting (parsed from scm
configs), e.g. "host:github" or "host:whatever-you-configured".

Includes simple rsync-like (but with re2 patterns instead of globs)
path filters to skip descending into or tagging known "tmp" areas or
caches.

All features are configurable via yaml config:

https://github.com/mk-fg/codetag/blob/master/codetag.yaml.dist

And the whole thing is written in Go, same as tmsu.


I wrote a bit longer announcement in the blog post here:

http://blog.fraggod.net/2013/02/04/codetag-tmsu-tag-all-the-things-and-go.html


At first, I wanted to use tmsu as a lib there, but given that it's
current version will be statically compiled into the tool and CLI tmsu
tool might diverge from it, decided to just use CLI interface (call
tmsu tool as a subprocess) instead.

Performance-wise, the difference is probably negligible anyway.


Thought it might be useful to create a bit more noise on the list, if
only to draw attention to such interesting tmsu use-cases.
Should've probably done it about a month ago, but oh well.

Huge thanks to Paul for the most awesome tool, which led me to this idea
in the first place.


--
Mike Kazantsev // fraggod.net
signature.asc

Paul Ruane

unread,
Mar 6, 2013, 1:21:24 AM3/6/13
to tm...@googlegroups.com

Hi Mike,

Thanks for the announcement.

This looks really interesting and genuinely useful: I'll have a play with it when I get a minute as it may actually be useful for my own files.

Paul

Dieter Plaetinck

unread,
Mar 8, 2013, 7:20:11 AM3/8/13
to tm...@googlegroups.com
very cool.
i adressed a similar/same use case a while ago, with a tool that searches realtime (https://github.com/Dieterbe/projectfilter have a look at the readme, maybe it gives you more ideas)
i'll def. have to check out your tool :)
also big +1 on "i need some code that i know i did somewhere/sometime before, but don't know where", that seems like a harder problem to solve properly (that was also the main reason for my project.. and sometimes you remember by the strangest things like "i did that code somewhere around christmas" or "i remember pushing it to a given git remote", etc), but you're on your way. keep it up :)


--
You received this message because you are subscribed to the Google Groups "tmsu" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tmsu+uns...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages