[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnupod] Some gnupod scripts I wrote

From: H. Langos
Subject: Re: [Bug-gnupod] Some gnupod scripts I wrote
Date: Mon, 17 Aug 2009 19:39:57 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Philip,

Thank you for sharing your scripts.

I will definetly take a look at gnupod_sync.pl because currently I have 
a rather artificial gnupod_search.pl call in the shell script that I use to
update all the podcasts that I listen to. I think I added that call in order 
to make sure that gnupod_addsong didn't overwrite the play count played_flag.

That reminds me ... I have to test if the new gnupod_delete and gnupod_find 
implicitly call otg-sync before re-reading the GNUtunesDB.

The functionality of dumpsong sounds a lot like that of gnupod_find, though
it doesn't yet have a script friendly output format, and the selection by
playlist is as yet only implemented in gnupod_delete and should rather be
migrated to the FindHelper.pm module. Did you taka a look at gnupod_find
and gnupod_delete yet? They are not in the 0.99.8 release but they are
in the master branch. 

I think a parameter that gets passed to FindHelper's prettyprint method that
would disable the padding of the output attributes to field-width and a 
parameter to select an alternative output field separator would pretty much
cover the dumpsong funtionality. 
Is "realpath" the same equivalent of gnupod_search's "unixpath" ?
(Please note: FindHelper's "unixpath" doesn't prepend the mountpoint yet.)

BTW: I hope I'll find the time to add gnupod_modify (using the same generic
parameters that gnupod_find and gnupod_delete have) for the next gnupod
release in order to manipulate all attributes that are available in the 
GNUtunesDB. I'd love to manipulate artwork with the same tools but i'm 
still not sure how to do the user interface... 


On Mon, Aug 17, 2009 at 02:41:04PM +0100, Philip Hazelden wrote:
> I wrote a couple of scripts for gnupod that I find useful, and am sharing
> them in hopes that others will as well. They are available in a cloned
> repository at http://github.com/ChickenProp/gnupod-patches/tree/master ,
> each in separate branches.
> The easy-syncing branch contains gnupod_sync.pl, which syncs both the
> iTunesDB and the OTG data with the GNUtunesDB. It's useful if you intend to
> work with GNUtunesDB.xml without first using another gnupod_* script. This
> branch also redirects messages about syncing to STDERR instead of STDOUT,
> allowing program output to be piped reliably to other scripts. And it adds a
> reminder to run mktunes.pl when running an OTG sync; this caught me out once
> when I assumed gnupod_search.pl would be nondestructive. Usage is simply
> "gnupod_sync.pl [-m mountpoint]".
> The dumpsongs branch contains gnupod_dumpsongs.pl, which is an easy way to
> query GNUtunesDB.xml in a format that can be easily manipulated by the
> standard unix toolchain. Usage: "gnupod_dumpsongs.pl [-m mountpoint] [-d
> delimiter] [--playlist name] attribute ..."; it outputs the given attributes
> in a (by default) tab-delimited list for each song in the DB or playlist.
> Attributes are simply the names of XML attributes, with the addition of
> :realpath which gives the absolute path of the file according to the
> mounting OS.
> Neither script is documented yet; I can work on that if it's decided they
> would be useful additions to the main branch.

> _______________________________________________
> Bug-gnupod mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-gnupod

reply via email to

[Prev in Thread] Current Thread [Next in Thread]