|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#31 |
Hedge Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 802
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Hi
Needed to use the plugin a couple of times yesterday. Works like a charm and saved me a lot of time over using Regex and manually amending files. Thank you again for the plugin. |
![]() |
![]() |
![]() |
#32 | |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@BeckyEBook...
prefs['add_chapter_template'] = 'Chapter' In the plugin, the Add heading name template textbox is initially initialized to 'Chapter' in the dialog itself and is re-populated later if there is an appropriate existing value in prefs. After the OK button is pressed the user-entered dialog value is then saved to prefs. The main reason I initialize this option to either 'Chapter' for file group selections or 'Preface' for single file selections is to give the plugin user a helpful indication of what should be put into the textbox. Perhaps I should've initialized it to "e.g. Chapter" or "e.g. Preface" but I think that looks a bit ugly. Quote:
When Use numbered headings only is selected, the numbering part of the heading is normally generated and added separately to the heading line from a straightforward ascending count(according to the selected file count) and then styled accordingly. And in the code in AddSelectedHeadings(), the new heading line is progressively built and, in the numbered-headings-only handler, you'll see that the heading text name is removed before the numbered heading line is rebuilt -- so the heading name is removed anyway. And don't forget that the Use numbered heading ony option also works together with the Select chapter number style option to determine what numbering style is used for numbered headings only. If you have a look at that function I've mentioned, that should more clearly help your understanding of how numbered headings are added and progressively formatted and styled. Last edited by slowsmile; 07-09-2018 at 11:22 PM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#33 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@Thasaidon...Your most welcome and I'm glad that you find the plugin useful. To be honest with you, my greatest fear with this plugin was that it might be too complicated to use. I'm happy that this does not appear to be the case. Also, I doubt if I will add any more major functional updates to this plugin. I think it's reached its limit in terms of maintaining easy plugin usage.
Last edited by slowsmile; 07-09-2018 at 10:24 PM. |
![]() |
![]() |
![]() |
#34 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
Plugin Update: The new maximum number of chapters allowed when using the Number as Text or Roman Numerals dialog options has been increased to 100.
Last edited by slowsmile; 07-10-2018 at 12:34 AM. |
![]() |
![]() |
![]() |
#35 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 757
Karma: 2296998
Join Date: Jan 2017
Location: Poland
Device: Various
|
slowsmile
Quote:
But think about users from other countries who prefer to have instead of "Chapter" e.g. "Kapitel", "Rozdział" or "Глава". My suggestion SAVES the typed word in Template input box when selecting multiple files, and "Preface" is used when selecting only one file. Ad "cleaning" options.SUFFIX_CHOICE. You're right, but not quite. For template "Chapter" all works. Change template to other word (write something else there). Then the word from the template is added, despite choosing "Use numbered headings only". Code:
<h1>Blahblahblah ONE</h1> |
|
![]() |
![]() |
Advert | |
|
![]() |
#36 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@BeckyeBook...OK I think I understand what you're saying. What I think you want is for the last text typed into the Add heading name template textbox to always be saved and displayed again on the next plugin run. I hope I've got that right.
I've already put a fix in for the above and I'm testing it now. The fix will apply to header templates names for both file groups and single file processing by the plugin. In other words, whatever is typed into the header name template textbox will, in all instances, be preserved and displayed again whenever the plugin is next run. Please also confirm that the above fix is what you want(and I've got the solution right). Last edited by slowsmile; 07-10-2018 at 05:51 AM. |
![]() |
![]() |
![]() |
#37 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 757
Karma: 2296998
Join Date: Jan 2017
Location: Poland
Device: Various
|
Quote:
![]() In other languages, saving the template will speed up the work with the plugin. |
|
![]() |
![]() |
![]() |
#38 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
Thanks for that. I'll put out a new release soon.
|
![]() |
![]() |
![]() |
#39 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
Plugin Update: The plugin has been changed in v0.1.8:
* In the dialog, the text typed into the Add heading name template textbox will now always be saved and dispalyed on the next plugin run. * Fixed a problem in the version updater, which wasn't working. |
![]() |
![]() |
![]() |
#40 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 757
Karma: 2296998
Join Date: Jan 2017
Location: Poland
Device: Various
|
[QUOTE=slowsmile;3720202]Plugin Update: The plugin has been changed in v0.1.8[QUOTE]
Template is saved. Thank you. And second issue/suggestion? 1. Select some files (x)html. 2. Run plugin. 3. Remove headings in Step 1. 4. Set template to any word other than "Chapter" in Step 2 AND Select "Use numbered headings only" to "Yes". Expected: 1, one, I …but result is: Word* 1, Word* one, Word* I * "Word" = heading name template Last edited by BeckyEbook; 07-10-2018 at 07:09 AM. |
![]() |
![]() |
![]() |
#41 | |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@BeckyEbook
Quote:
Try this: 1. Select your file group. 2.Remove/Add the heading style (ignore the Add heading name template textbox -- it isn't used) 3. Now set Select heading number style to Numeric String, Number as Text or Roman Numerals. 4. Then set the Use numbered headings option to 'Yes' and click OK. Result: 1, ONE or I (I've also just tested this in Sigil with an epub) (if Number as text is chosen then the text number will always be displayed in upper case for the Use numbered headings option only) ...And if you want headings like Word 1, Word One or Word I then don't select the numbered heading option because the numbering is separately and consecutively generated anyway by default for all selected headings using group selection only. To change your file group headings to Word I, Word II, Word III do the following: 1. Select your file group. 2. Remove/Add the heading style 3. Use add heading name and add "Word" 4. Set number style option to Roman Numerals 5. Ensure numbered heading only option is set to 'No' 6. Click OK. To change your file group headings to Word ONE, Word TWO, Word THREE do the following: 1. Select your file group. 2.Remove/Add the heading style 3. Use add heading name and add "Word" 4. Set the number style option to Number as Text 5. Set the number case option to uppercase 6. Ensure numbered heading only option is set to 'No' 7. Click OK. Last edited by slowsmile; 07-10-2018 at 09:46 AM. |
|
![]() |
![]() |
![]() |
#42 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 757
Karma: 2296998
Join Date: Jan 2017
Location: Poland
Device: Various
|
I understand everything perfectly.
But ... If I have completed the template field ("Word") AND selected numbered only for "Yes", the plugin should ignore the template. Because now it requires both – deleting the template and enabling the "numbered heading only" option. And my suggestion: Code:
if options.NUM_HEADINGS_CHOICE == 'Yes': options.SUFFIX_CHOICE = '' Another gain is that preferences for "add_chapter_template" is not changed. |
![]() |
![]() |
![]() |
#43 | |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@BeckyEBook...
Quote:
Last edited by slowsmile; 07-10-2018 at 05:40 PM. |
|
![]() |
![]() |
![]() |
#44 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
Plugin Update: Fixed a bug concerning the Add numbered heading only option where the chapter heading text was also being wrongly displayed with the chapter number(v0.1.9).
Last edited by slowsmile; 07-11-2018 at 03:37 AM. |
![]() |
![]() |
![]() |
#45 |
Hedge Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 802
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Hi @slowsmile
I upgraded from v0.12 to v 0,16 and hit the window size problem again and cannot access the 'OK' button. I cannot make the window any larger. So I reverted to to v0.12 which does most of what I want. I have used it again four times today, which is far more than I expected but that may be just a flike due to the 25 books I selected to process. So the plugin is being used by me at least. If you get time could you have a look a look at it, but no rush as I can use v0.12 . |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with Chapter seperators (lines underneath chapter headings) | indieauthor83 | Sigil | 9 | 06-23-2017 06:01 AM |
Invisible chapter headings? | bcamp47 | Sigil | 6 | 03-24-2013 12:38 AM |
How to mark chapter headings | JimLL | Sigil | 107 | 06-17-2012 09:02 AM |
Chapter Headings | Paxman53 | Conversion | 3 | 10-12-2011 12:31 PM |
Why H1 and H2 Chapter Headings? | Ransom | Calibre | 11 | 08-10-2011 04:29 PM |