Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 08-23-2016, 02:58 AM   #1
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
SortCSS status?

Hi

About SortCSS.zip

Following an advice from Terisa de Morgan, I installed the SortCSS.zip plugin from David Forrester and tried to make it work to sort a stylesheet made from two merged stylesheets (I hope it's clear).

https://www.mobileread.com/forums/sho...8&postcount=68

The plugin was installed directly from the zip file. It was reported as installed among the book editing tools (alongside Diaps Editing toolbag). However I could not make its icon appear, I got only its name on the extension menu.

When I opened the EPUB and launched the plugin with the menu (no toolbar), I got the following mistake:

Code:
Traceback (most recent call last):
File "calibre_plugins.sortcss.main", line 83, in sort_stylesheets
File "calibre_plugins.sortcss.main", line 117, in sort_stylesheet
File "calibre_plugins.sortcss.main", line 117, in <lambda>
AttributeError: 'CSSFontFaceRule' object has no attribute 'selectorText'
question: what's the status of this plugin, Is it still reputed working?
roger64 is offline   Reply With Quote
Old 08-23-2016, 03:49 AM   #2
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
@roger64, as I have it working (I don't know if there was a further development and it was an experience), I attach you my zip file, so you can install it (I think I remember this problem)
Attached Files
File Type: zip Sort CSS.zip (21.1 KB, 222 views)
Terisa de morgan is offline   Reply With Quote
Advert
Old 08-23-2016, 07:24 AM   #3
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
@Terisa

It's working: the stylesheet was correctly sorted after selecting the menu entry. It made appear a screen comparing the changes that it could perform.

I still do not see any icon to trigger it nor do I see one in the Preferences. But the most important is that it works.

roger64 is offline   Reply With Quote
Old 08-23-2016, 07:26 AM   #4
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I'll check this evening from home, because I think davidfor gave me some instructions because I had the same problem... and they are at the same thread. I'll be back to you with instructions or apologies...
Terisa de morgan is offline   Reply With Quote
Old 08-23-2016, 07:33 AM   #5
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I've been able to check soon. I had the same problem and the answer was:

Quote:
To fix it, I think you need to edit the file "tweak_book_gui.json" that is in you calibre preferences directory. Look for the "global_plugins_toolbar" and remove that section and save the file.
BTW, have you configured the tool bar at the editor window?
Terisa de morgan is offline   Reply With Quote
Advert
Old 08-23-2016, 08:43 AM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Be careful sorting your CSS. CSS is read top down and some CSS needs to be after other CSS in order to work properly.
JSWolf is offline   Reply With Quote
Old 08-23-2016, 09:30 AM   #7
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
@JSWolf

Thanks for the advice. I'll check to see if everything is in order.

@Terisa

I have two such files which seem to be equally useful...

Code:
[roger@anterg ~]$ locate tweak_book_gui.json
/home/roger/.config/calibre/tweak_book_gui.json
/home/roger/.config/calibre/calibre/tweak_book_gui.json
However only the first one contains
Code:
"global_plugins_toolbar": [
    "Diaps Editing ToolbagSpanDivEdittoolbar", 
    "Diaps Editing ToolbagCSScm2emtoolbar", 
    "Diaps Editing ToolbagSmarterPuncttoolbar", 
    "Sort CSSSortCSStoolbar"
  ],
I'll make some tries, with and without it.
roger64 is offline   Reply With Quote
Old 08-23-2016, 09:38 AM   #8
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,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Wow, I've completely forgotten about this. It's still on the toolbar in the editor, but I haven't used it for ages. Anyone else out there still using this?

Terisa, thanks for the fix. Looks like I had it as well, but hadn't released it. I had also started to look at a more intelligent sort, so I might have fixed it while doing that. I don't have any notes on what I was doing, so I'm not exactly sure what I was doing. But, is looks like I was also grouping the types of styles and sorting within them.
davidfor is offline   Reply With Quote
Old 08-23-2016, 09:57 AM   #9
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
@davidfor

This is quite useful for the few people who use two stylesheet. Thanks for it.

Up to now, I just fail to display the icon on the toolbar, even after Terisa's remarks. But I can launch it twith the menu entry.

To take into account JSWolf's remarks, maybe the elements beginning with a @ should be sorted to appear at the top (like @page, @font-face) while the selectors beginning only with a point should be somewhat trailing at the end.
roger64 is offline   Reply With Quote
Old 08-23-2016, 10:40 AM   #10
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,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by roger64 View Post
@davidfor

This is quite useful for the few people who use two stylesheet. Thanks for it.

Up to now, I just fail to display the icon on the toolbar, even after Terisa's remarks. But I can launch it twith the menu entry.
Editing the file you found and then adding it to the toolbar using the preferences in the editor should work.
Quote:
To take into account JSWolf's remarks, maybe the elements beginning with a @ should be sorted to appear at the top (like @page, @font-face) while the selectors beginning only with a point should be somewhat trailing at the end.
That appears to be one of the things I was trying to do with my changes. I'll have to have another look at it.
davidfor is offline   Reply With Quote
Old 08-23-2016, 11:04 AM   #11
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by davidfor View Post
Wow, I've completely forgotten about this. It's still on the toolbar in the editor, but I haven't used it for ages. Anyone else out there still using ?
Me, I've remembered because of that
Terisa de morgan is offline   Reply With Quote
Old 08-23-2016, 12:33 PM   #12
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by davidfor View Post
Editing the file you found and then adding it to the toolbar using the preferences in the editor should work.
I tried it but , for some reason, I failed to see the icon to push it on the right like the three icons of the "Diaps Editing Toolbag".

Quote:
Originally Posted by davidfor View Post
That appears to be one of the things I was trying to do with my changes. I'll have to have another look at it.
Thank you!
roger64 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inkmesh Status? ClairePMR General Discussions 7 10-11-2011 05:02 PM
Status mvoosten OpenInkpot 64 08-13-2009 08:14 AM
Status line alexxxm Sony Reader 6 11-14-2007 12:43 PM
iLiad Status? RibRdb2 iRex Developer's Corner 11 09-25-2006 09:50 AM


All times are GMT -4. The time now is 12:23 AM.


MobileRead.com is a privately owned, operated and funded community.