Good catch, I've attached a fixed patch. Some of the options are a little awkward - to search for multiple tags, you have to do tracker-tag -s tag1 -s tag2... but I'm not sure GOption will let us do it a better way. Anyways, they still have to fix this bug (http://bugzilla.gnome.org/show_bug.cgi?id=336089) and a few others until we can do more useful stuff. Samuel On 9/11/06, Jamie McCracken <jamiemcc blueyonder co uk> wrote:
Samuel Cormier-Iijima wrote: > Hey everyone, > > tracker-tag and friends were starting to bother me because of their > non-standard options usage; most didn't even have a --help option. > I've patched tracker-tag to use GOptions, which offers the following > benefits: 1) it automatically converts filenames from locale to utf8, > and 2) automatically provides useful help output. This patch also adds > support for tagging multiple files at once, like so: > > tracker-tag -a music -a radiohead -r bad music/radiohead/* > > which would tag all files in music/radiohead/ with "music" and > "radiohead", and remove any instances of "bad." I know that these > command line utilities aren't really meant to be used for day-to-day > stuff (eventually we'll have a bling-ful barracuda :-P), but I don't > think that means the CLI tools should be left out. Anyways, if this is > useful, let me know and I can patch the other tools too. > It looks good. One query though - you removed realpath call in the patch. Tracker needs a fully qualified path and filename so realpath is used to translate a relative path to a full one for any file paramter. I dont have time to test this now but unless GOption does this conversion (it might do it if the arg is defined as a file name and not a string?)then I think we need realpath around any file uri parameter. Please confirm correct operation or send an amended patch. -- Mr Jamie McCracken http://jamiemcc.livejournal.com/
Attachment:
tracker-tag.patch
Description: Text Data