12-31-2021, 01:45 PM | #61 | |
Sigil Developer
Posts: 7,654
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Master now supports a new Automate List Tool (and the AutomateEditor Dialog also supports it as well).
Code:
SetPluginParameter YOUR_PARAMETER_HERE The plugin interface has also been extended to add two related interface calls: Code:
# Newly Added to Support Plugins running in Automate Lists # returns boolean True if plugin was launched by the automate False otherwise def using_automate(self): return self._w.using_automate # returns a string of the automate plugin parameter set before plugin launch # and the null string "" if nothing was passed def automate_parameter(self): return self._w.automate_parameter Comments welcome. Quote:
|
|
12-31-2021, 05:44 PM | #62 |
Evangelist
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
|
Possible To-Do List for Future Sigil Releases Post Sigil 1.8
Thank you for the plugin work.
Thanks too for the CRC32 change. Running just one file 5 times — the one with 6700 images — and then averaging, ~30% difference. If you wish for more benchmarks, I can try later. Unsure if you consider that difference significant. I also am not sure how I feel about not being able to rename file while keeping date. For the various reasons listed, renaming too I think should keep mod dates if the file is unmodded, e.g. I may merely rename all files to extension .xhtml, or make further renames. Sometimes they may make files change, such as if there links elsewhere, other times not. For certain publishers, those that separate each chapters xhtml and images into folders, there could be multiple duplicates of some like shared images (e.g. graphical bullets), and in such cases, merging can take a long time, I haven't tested recently on new computer, though before it'd run overnight and not complete. I before have renamed such files outside Sigil. For that and other reasons mentioned, some dialog to perform rename, merge, and perhaps other operations where one can see first toc entry, possible header title, and maybe other metadata could be helpful someday. I still really really would like any file that is not modified to not have the date changed. Perhaps you disagree, but for me, one might say it is merely the "right" thing to do. Last edited by democrite; 12-31-2021 at 06:21 PM. |
Advert | |
|
12-31-2021, 06:49 PM | #63 | |
Sigil Developer
Posts: 7,654
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Hmm if epub import times still show a huge difference then something is fishy with your timings. On import with current master no file hashing is done at all. Perhaps some OS level file caching or something else on your system is impacting things.
You seem to misunderstand and think that these zip dates are real file modification dates but they only exist in the zip file. Sigil caches xhtml files and only flushes to real files when needed and but files are often opened for write which resets the actual file modification time. This is done to detect exactly external changes from OpenWith. So Sigil has to remember them and that means using a key to store that info. But you do not want that key to be based on file contents, nor the file relative path in the zip, nor even on the file name. The zip archive has no concept of files being renamed or moved. It stores its modification time based on zip entry (relative path in the zip). You want it to set unpacked file mod dates and somehow have them survive opening for write (which is needed for how Sigil does file caching). This is just not possible without major changes to how Sigil works. Changes I am not willing to make when Checkpointing and Compare already exists and is based in git and works just fine and can provide both files changed and internal change details. To make your date changes work, open any epub, standardize and rename at will and save it as an epub to create a base set of modification dates in the epub zip. So what I have in Sigil master now is all that I am willing to do. If you and others do not find it useful, I will remove it. Just let me know if as it stands it is not useful. Comments on this versions usefulness from others welcome as well. Quote:
Last edited by KevinH; 12-31-2021 at 09:10 PM. |
|
01-01-2022, 12:09 AM | #64 |
Evangelist
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
|
Such is still so very useful. Perhaps I’ve become as they say a bit demanding. Just concerned about and unsure of how best to approach. Perhaps someday, if possible, edit state could be more easily tracked as it seems to be with documents in OS APIs. Maybe Qy doesn’t (yet?) have a concept of document(s).
Many thanks. Still such a thing is so very important to me. What is there is truly helpful. |
01-02-2022, 03:17 PM | #65 |
Sigil Developer
Posts: 7,654
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Last night after some further thought, I think I may be able to store the additional zip file info in each Resource Object we create to wrap each file. By doing that, it should be able to withstand both move and rename. I will give that a try and push it to master if it improves upon what is in master now.
|
Advert | |
|
01-02-2022, 04:19 PM | #66 |
Evangelist
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
|
Thank you.
You very well know what I am hoping for. More words from me may just perhaps be tiresome. You may very well feel Sigil needs other things and other is more significant. I trust and have as they say faith that any possible future improvements if any you’ll self-realize with time and implement whenever you feel like it. |
01-03-2022, 11:10 AM | #67 |
Sigil Developer
Posts: 7,654
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Okay, I just pushed these changes to master. Please try "standardizing" an epub that starts out non-standard and in particular try renaming an image file but not editing it. Please verify that the epub zip modification times remain unchanged.
Note: The epub mimetype file, and META_INF/container.xml are not unpacked from the zip or editable in Sigil, they are created on the fly upon write. But for all files listed in the manifest and the opf file itself, the zip modification dates should hopefully now be saved and restored with no filename clashing issues. Timings for file load should be reasonable as well. For an epub with 6000 files it will still have to build a hashmap table with 6000 entries containing the zip file info on loading an epub and then copying that info to the actual Resource object associated with that file. That will not take 0 time but it should be much faster than sha256ing the contents of 6000 files. Please let me know how it goes when you get a chance. Last edited by KevinH; 01-03-2022 at 11:15 AM. |
01-04-2022, 10:50 AM | #68 |
Sigil Developer
Posts: 7,654
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Update Post Master To-Do List
Okay based on this thread, related recent threads, and earlier To-Do list threads:
Here is the latest list (in no particular order, and NO PROMISES!!!!!) Sigil To-Do List --------------------
Last edited by KevinH; 03-11-2022 at 11:37 AM. Reason: remove feature just added from To-Do list |
01-04-2022, 10:53 AM | #69 |
Sigil Developer
Posts: 7,654
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Completed To-Do List items (for the record) as of master today
For those keeping track since we started using To-Do threads (pre-Sigil 1.5.0)
Completed To-Do List Requests (as of Sigil master today) -----------------------------------
Last edited by KevinH; 03-11-2022 at 11:24 AM. Reason: update with latest feature added |
01-04-2022, 10:36 PM | #70 | |
Evangelist
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
|
Quote:
Perhaps I am unfamiliar with parsing and formatting upon first open; I see some date changes of XML files such as the ADE page map and page template. From what I recall perhaps CSS too. If it is a quick answer, I am curious. No need to respond, not a big deal and I can diff files sometime if I really want to know. Benchmarks: tried to ensure nothing else running that might use disk or CPU. Reran all. Compared against git checkout before all this began. Not sure why for larger files I used, current master is faster. Rebuilt both to make sure, but maybe I still missed something. - 330 MB, 2700 images, 40 XHTML w - 3.78, 3.84, 3.79, 3.77, 3.80 w/o - 4.05, 4.14, 4.07, 4.13, 4.08 - 175 MB, 5500 images, 250 XHTML w - 10.38, 10.38, 10.49. 10.47, 10.54 w/o - 10.83, 10.75, 10.98, 10.92, 10.95 - 470 MiB, 6700 images, 20 XHTML w - 7.41, 7.42, 7.46, 7.41, 7.49 w/o - 7.83, 7.85, 7.93, 7.97, 7.99 - 40 MB, 380 images, 30 XHTML w - 1.30, 1.31, 1.33, 1.30, 1.29 w/o - 1.30, 1.30, 1.30, 1.30, 1.33 - 1.1 MB, 12 images, 76 XHTML w - 0.45, 0.44, 0.44, 0.43, 0.44 w/o - 0.45, 0.45, 0.45, 0.45, 0.45 |
|
01-04-2022, 10:48 PM | #71 |
Sigil Developer
Posts: 7,654
Karma: 5433388
Join Date: Nov 2009
Device: many
|
When files are moved, especially when css files are moved and images are moved, each css sheet is parsed to look for url(), background images, importing other css files, etc and any that need updated due to the file move. That is true of page maps and templates that link to any files moved. So all of that is expected behaviour given the movement of that file or links into that file or out of that file.
In an unrelated change, I tried to speedup OPF parsing itself to try to speed up adding blank xhtml files. You are probably seeing those slight speedups in your timings as Importing an Epub is only a light user of opf parsing in general. Mainly just the manifest. Last edited by KevinH; 01-04-2022 at 10:52 PM. |
01-04-2022, 11:09 PM | #72 |
Evangelist
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
|
I am not sure if this is ideal place for feature requests. So far seems to be yet I haven't checked other threads. If so, maybe the first post could be edited as a running list as others who may not read this thread or regularly check forums may find such less effort to find and remain up-to-date. Is this turning into the thread for requests?
Hope you don't mind random things. As I wasn't trying to edit some EPUB but from recent testing, I was more aware of actions I tend to ignore during regular use: - forgot to mention, it's been there for a while yet, keyboard shortcuts on macOS show ctrl instead of cmd and meta rather than ctrl. might be confusing for those who don't know what is meta. - preference to set linear=no on add cover?, and auto-set if cover is detected? - adding cover, often with commercial specified in some other way undetected, Sigil adds a new file. possibly instead of needing to delete the old and edit toc, maybe in that dialog some place, perhaps expandable not shown by default, to replace some existing cover? - renaming files, if focus could remain in file list post-rename, I think easier to continue. e.g. select files, press shortcut to rename, arrow keys + selection, repeat. - as many or most commercial EPUBs bring up the message of missing DOCTYPE, html, etc., if there is no malformed XHTML, perhaps there could be an option to do such automatically? I am unaware if suggested, spoken of before, or of any dangers in such cases. Mentioned before, I remain unclear at times when there is indeed malformed HTML vs merely a change in header. Tested one where such was fixed, made something malformed (removed closing tag somewhere), and same message. Thus times where I may have, outside of Sigil, introduced some html syntax error of missing tag or something, vs. a harmless (?) DOCTYPE, html, … that is autorepaired, I do not know how to distinguish such. - I was thinking, over time, I might contribute to making the app more macOS native if interested: UI elements (noticed status bar size), icons, and other. If someday buttons or other icons could use available resources such as recommended UI fonts per platform or environment (Gnome/KDE no idea if there is such) if available, as I kind of like seeing such refinement, I may experiment with finding such icons for macOS Big Sur+ (SF Symbols) or making use of the Qt API for a more native look. Perhaps uninterested or low priority, but maybe nice someday like possibly using such also on newer Windows. if qt 6 offers new such capabilities. maybe very far off yet perhaps Sigil could later slowly introduce changes to in the future make use of platform native offered by Qt. edit: and possibly an option to set epub3 nav to linear unless also used as html toc and file is in ncx/nav TOC. Last edited by democrite; 01-04-2022 at 11:27 PM. |
01-05-2022, 02:59 AM | #73 | |
Evangelist
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
|
Quote:
As you mention, after first open and possible restructuring, everything is afterwards fine. |
|
01-05-2022, 03:47 AM | #74 |
Fanatic
Posts: 500
Karma: 3498633
Join Date: May 2011
Location: Surrey, UK
Device: Kobo Aura One, Sony PRS 600/650
|
Just a thought, but is there any chance of bundling a more comprehensive English dictionary with Sigil?
My default user dictionary now contains nearly 2000 words (all checked as being valid and correct English against two on-line dictionaries) that are not included in the dictionary that comes with Sigil. I realise that you just pick up the Hunspell ones, but I was wondering if there was a better alternative that updated their dictionaries on a more regular basis. As I said it's just a thought and not a big issue. |
01-05-2022, 06:57 AM | #75 |
Sigil Developer
Posts: 7,654
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Ashjuk,
On Windows and macOS we include our own copy of the hunspell en_US dictionary. So we could certainly improve our local copy. If you are sure that your 2000 long wordlist are all valid en_US words then please zip up the list, post it someplace and pm KevinH (me) with a link and when I get a chance I will add them to the en_US dictionary and rebuild our local copy. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New Policy on Translations Included with Sigil Releases | KevinH | Sigil | 0 | 03-08-2019 10:37 AM |
Icon Redesign for future 1.0 Release of Sigil | shorshe | Sigil | 38 | 06-06-2016 11:29 PM |
Sigil on Nook vs Sigil on Kobo vs Sigil on iBook | rosshalde | Sigil | 12 | 11-13-2014 09:34 AM |
Sigil’s Future Direction (Post 0.4.x) | user_none | Sigil | 90 | 10-11-2011 03:28 PM |
Sigil's Future | crutledge | Sigil | 36 | 07-26-2011 06:02 PM |