View Single Post
Old 07-25-2014, 01:46 AM   #32
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Sort CSS plugin

Well, that was disgustingly easy. Well, it was once I actually read what Kovid had written about it. Then the hardest part was to find an icon*.

Because of a question in the Modify ePub thread about sorting the CSS, I decided to try an editor plugin.

It is dumb. It simply adds a toolbar button. Press the button and it sorts each stylesheet on the selectors. Then it presents the differences.

The plugin is attached. I have only tested it with the Qt5 beta code of calibre, but it should be OK with Qt4. I did this for curiosity more than any actual need I have. If there is any real interest, I'll open a thread to discuss it.

* And I don't think I was very successful at that.
Attached Files
File Type: zip SortCSS.zip (18.4 KB, 265 views)
davidfor is offline   Reply With Quote