View Single Post
Old 01-22-2015, 06:02 PM   #40
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Something like

Code:
for d in /mnt/us/*.sdr; do
    book = $(basename d .sdr)
    if [[ ! -f  /mnt/us/${book}.azw* -o ! -f /mnt/us/${book}.mobi ]]; then
        rm -r $d
    fi
done




There is already a KUAL extension that removes the EndActions, which I extended to rm Personal\ Letter* as well, and this would be fairly easy to do as well... It does of course run on the Kindle itself, but it could just as easily be implemented on the computer, with the heuristic KindleDrive sensing I assume you already do, in any programming language, with the greatest ease.

But this shouldn't be done automatically... the leftovers can be helpful if you re-sideload the book, since sideloaded books do not store annotations on Amazon's servers. That is why sideloaded books specifically leave those remains behind, just in case.

They aren't all that bothersome, considering that the combined filesize is negligible and it doesn't show up in the framework -- unlike the Personal Letters.

Last edited by eschwartz; 01-22-2015 at 06:15 PM.
eschwartz is offline   Reply With Quote