Sort the entries in the .xml files
Opened this issue · 0 comments
I keep my ~/.castget/*.xml
in git
so that in case something happens to my downloads (usually user-error or MP3-player hardware dying), I can easily revert back to a known point-in-time and re-run castget
to easily fetch all the podcasts again.
However, the order of the entries in the ~/.castget/*.xml
files is unsorted, it makes the git diff
output exceptionally noisy. The stop-gap solution I have in place is to open them all in vim
and have it sort them all:
$ castget
$ cd ~/.castget
$ git diff
«hundreds of lines of jumbled diff output»
$ vim *.xml
:argdo 3,$-sort | w
:q
$ git diff
«one timestamp line for each feed plus one line for each new podcast of output»
$ git commit -am "castget"
However, if castget
always wrote these out in a predictable order, it would save me a lot of headache and make for cleaner diffs. The exact order (date, name, URL, whatever) matters less than the consistent ordering between invocations.
Otherwise, thanks for this staple of my podcast-listening!