|  08-23-2016, 02:58 AM | #1 | 
| Wizard            Posts: 2,625 Karma: 3120635 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' | 
|   |   | 
|  08-23-2016, 03:49 AM | #2 | 
| Grand Sorcerer            Posts: 6,686 Karma: 12595249 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)
		 | 
|   |   | 
| Advert | |
|  | 
|  08-23-2016, 07:24 AM | #3 | 
| Wizard            Posts: 2,625 Karma: 3120635 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.   | 
|   |   | 
|  08-23-2016, 07:26 AM | #4 | 
| Grand Sorcerer            Posts: 6,686 Karma: 12595249 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...
		 | 
|   |   | 
|  08-23-2016, 07:33 AM | #5 | |
| Grand Sorcerer            Posts: 6,686 Karma: 12595249 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: 
 | |
|   |   | 
| Advert | |
|  | 
|  08-23-2016, 08:43 AM | #6 | 
| Resident Curmudgeon            Posts: 80,740 Karma: 150249619 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.
		 | 
|   |   | 
|  08-23-2016, 09:30 AM | #7 | 
| Wizard            Posts: 2,625 Karma: 3120635 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 Code: "global_plugins_toolbar": [
    "Diaps Editing ToolbagSpanDivEdittoolbar", 
    "Diaps Editing ToolbagCSScm2emtoolbar", 
    "Diaps Editing ToolbagSmarterPuncttoolbar", 
    "Sort CSSSortCSStoolbar"
  ], | 
|   |   | 
|  08-23-2016, 09:38 AM | #8 | 
| Grand Sorcerer            Posts: 24,905 Karma: 47303824 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. | 
|   |   | 
|  08-23-2016, 09:57 AM | #9 | 
| Wizard            Posts: 2,625 Karma: 3120635 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. | 
|   |   | 
|  08-23-2016, 10:40 AM | #10 | ||
| Grand Sorcerer            Posts: 24,905 Karma: 47303824 Join Date: Jul 2011 Location: Sydney, Australia Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos | Quote: 
 Quote: 
 | ||
|   |   | 
|  08-23-2016, 11:04 AM | #11 | 
| Grand Sorcerer            Posts: 6,686 Karma: 12595249 Join Date: Jun 2009 Location: Madrid, Spain Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2 | |
|   |   | 
|  08-23-2016, 12:33 PM | #12 | |
| Wizard            Posts: 2,625 Karma: 3120635 Join Date: Jan 2009 Device: Kindle PW3 (wifi) | Quote: 
 Thank you! | |
|   |   | 
|  | 
| 
 | 
|  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 |