[KPhotoAlbum] kpa-util

Robert Krawitz rlk at alum.mit.edu
Sun Mar 8 22:57:28 GMT 2020


On Sun, 08 Mar 2020 22:49:11 +0100, Johannes Zarl-Zierl wrote:
> Hi,
>
>
> Am Sonntag, 8. März 2020, 03:19:04 CET schrieb Robert Krawitz:
>> I'm fiddling around with extensions to kpa-merge, which I'm calling
>> kpa-util (I haven't added it in yet).  Currently it supports the
>> following operations:
>> 
>> - merge (as current)
>> - clean (as current)
>> - add-item <category> [--parent parent] items...
>> - add-tag <category> items... <<< file-list (on stdin)
>
> I assume "add-item" adds a new tag to the given category, and "add-tag" tags all files in the file-list with the given tags?
> I think I would have to look this up every time I use it (if I'm not using the script regularly). It's hard to come up with better names for these operations, but how about "add-category-items" and "tag-files"?

OK, thanks for the suggestions.

>> It would be a lot more efficient if I could have it process multiple
>> commands in one shot; the difficulty is working out a syntax for it.
>> I suppose for add-tag and the hypothetical remove-tag there could be
>> an input syntax something like
>> 
>> <file> +<cat:tag> -<cat1:tag1>
>> 
>> but any of these things could have spaces, colons, and potentially
>> even newlines in them.  Suggestions would be welcome.
>
> Why not just use shell quoting? After all, POSIX file names have the exact same problem (if not worse).

The problem is that I may want to tag more files than the OS command
line length limit (ARG_MAX).  At least on my system, that's 128K,
which would limit me to tagging maybe 2000 files in one shot.  But I'd
like to add about 100~150 tags to various sets of files, and given
that each go-round takes about 30-40 seconds, if I can combine things
it would be ideal.  But I guess it doesn't really matter.
-- 
Robert Krawitz                                     <rlk at alum.mit.edu>

***  MIT Engineers   A Proud Tradition   http://mitathletics.com  ***
Member of the League for Programming Freedom  --  http://ProgFree.org
Project lead for Gutenprint   --    http://gimp-print.sourceforge.net

"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton



More information about the Kphotoalbum mailing list