View Single Post
Old 08-15-2018, 12:52 PM   #5
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 586
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
Quote:
Originally Posted by davidfor View Post
An alternative is to grab the common_utils.py from one of kiwidudes plugins, or one of mine. This has a ProgressBar implementation. Here is how it is called:
Many thanks, this looks much simpler! I'll do it next time (if there is one)...

Meanwhile I got my plugin working, but I don't have the time to polish it to make it more professional or error-resistant or to invent an icon for it. I'm attaching it here in case anyone wants to pick it up. What it does is to extract the tables of contents from selected ePub files to generate a CSV file. The idea was to make it easier for me to create a list of the short stories in my collection of anthologies. It incorporates a copy of https://pypi.org/project/Unidecode/ which is used to flatten all strings to ASCII, since Microsoft Excel seems to be allergic to UTF-8. The authors, titles, series and ToC entry are all converted to title case to make it easier to sort the output file. Hope someone will find a use for it besides me.
Attached Files
File Type: zip Extract_ToCs.zip (208.7 KB, 419 views)

Last edited by Phssthpok; 08-15-2018 at 12:56 PM.
Phssthpok is online now   Reply With Quote