Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 02-21-2025, 09:16 AM   #46
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,434
Karma: 5702578
Join Date: Nov 2009
Device: many
Give TOCSaver_v030.zip a try. It worked even when I deleted files first.

https://www.mobileread.com/forums/sh...49&postcount=1
KevinH is offline   Reply With Quote
Old 02-21-2025, 12:08 PM   #47
Vanguard3000
Groupie
Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.
 
Posts: 166
Karma: 474196
Join Date: Jan 2011
Location: Canada
Device: Kobo Libra 2
Quote:
Originally Posted by KevinH View Post
Give TOCSaver_v030.zip a try. It worked even when I deleted files first.

https://www.mobileread.com/forums/sh...49&postcount=1
At a quick glance it seems to work great. Thanks for the update!
Vanguard3000 is offline   Reply With Quote
Advert
Old 02-21-2025, 03:35 PM   #48
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,434
Karma: 5702578
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by mrprobert View Post
Thanks, Becky. I think I can get the same result with right-click -> Get Info.

What would be really useful for me is to see image and font filesizes without generating a report.
You can now.

Just double-click on an Image in BookBrowser and an Image Tab will open showing the image, number of colors, width and height in pixels and of course the file size.

Similarly if you doubleclick on a font, a Font Tab will open showing the Font in a variety of sizes, its Font Name assigned by css and of course the file size.

That was the reason I wanted to add a Get Info for XHTMLFiles so that you did not have to run reports.

We could instead expand the GetInfo() to other file types:

Something like the following for all types of Files:

Bookpath
Filename
Folder
Media Type
File Size(kb)

And then with extras dependent on the type of file:

For XHTML (as we have now)
--------------------------------
Epub Version
Primary Language
Well Formed
Word Count
Linked Stylesheets
Linked Javascripts
Linked Images
Linked Audio
Linked Video
Semantics
Manifest Properties
Defined IDS

For Images
------------
Image Size Width x Height in pixels
Color vs Greyscale
Depth (bits per pixel) 8, 16, 24, 32

For Fonts
----------
Font Name
Weight


What about that idea? Would people like to see the GetInfo expanded to other file types?
KevinH is offline   Reply With Quote
Old 02-22-2025, 12:18 AM   #49
mrprobert
Connoisseur
mrprobert began at the beginning.
 
Posts: 60
Karma: 46
Join Date: Mar 2017
Device: None
Quote:
Originally Posted by KevinH View Post

For Fonts
----------
Font Name
Weight
Good stuff but can you add font file size as well?

Thanks.
mrprobert is offline   Reply With Quote
Old 02-22-2025, 08:54 AM   #50
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,434
Karma: 5702578
Join Date: Nov 2009
Device: many
There is no font size. They are all scalable fonts (otf, ttf, sfnt, woff, woff2). Only the CSS determines the size.

If you just mean file size, that s already provided in the Font tab. Just double-click on a Font file in Sigil's BookBrowser.

If you are referring to a possible extension of GetInfo that I proposed, then please re-read the post to see File Size is listed in the basics for all file types.

Last edited by KevinH; 02-22-2025 at 09:04 AM.
KevinH is offline   Reply With Quote
Advert
Old 02-22-2025, 06:44 PM   #51
mrprobert
Connoisseur
mrprobert began at the beginning.
 
Posts: 60
Karma: 46
Join Date: Mar 2017
Device: None
Quote:
Originally Posted by mrprobert View Post
Good stuff but can you add font file size as well?
Thank you for your reply. Of course there are no static font sizes, my inquiry was about font file sizes. I asked because I didn't see it mentioned in the "For Fonts" section. I see now that it was in the all type of files section. Sorry.

I know where and how to find various bits of info using Sigil's current functionality. The idea of mapping a key is good and helpful.

I gather there is no interest in a mouseover event as a quick and light-weight way of noting files sizes.
mrprobert is offline   Reply With Quote
Old 02-22-2025, 07:06 PM   #52
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,434
Karma: 5702578
Join Date: Nov 2009
Device: many
The problem is most editable file types are stored in caches (QTextDocuments) and are nly written to disk when absolutely required as disk access is slow. So to get an accurate estimate of file sizes requires the cache to be written first. Not something that should be done with every mouseover.
KevinH is offline   Reply With Quote
Old 02-22-2025, 07:47 PM   #53
mrprobert
Connoisseur
mrprobert began at the beginning.
 
Posts: 60
Karma: 46
Join Date: Mar 2017
Device: None
Quote:
Originally Posted by KevinH View Post
The problem is most editable file types are stored in caches (QTextDocuments) and are nly written to disk when absolutely required as disk access is slow. So to get an accurate estimate of file sizes requires the cache to be written first. Not something that should be done with every mouseover.
Aren't font and image file sizes static? Mouseover already show paths, why not mouseover or shift-mouseover to show font and image files sizes? Ignoring usefulness arguments, is this in theory not implementable?

My use cases are these:

1. Some subsetted fonts are not well done IMHO, and often a small file size is a clue that indicates I should check the quality of that particular font. When I see a rendering problem or some other anomaly, I would like a quick way to check the size.

2. Some images are rather large PNGs, and a quick file size check will guide me to deciding if is it is worth transcoding to jpeg or whatever.
mrprobert is offline   Reply With Quote
Old 02-22-2025, 08:25 PM   #54
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,434
Karma: 5702578
Join Date: Nov 2009
Device: many
Then use Reports to check all fonts and image files at once. Or ifyou are looking for a quick file size, just double-click on the Image or Font file inSigil's BookBrowser. This works fast and works now. Mousing over to get file sizes is not gonna happen especially not for inly some file types, that would be strange.

So two ways already exist to get File sizes in Sigil now.

That said ... I am willing to expand GetInfo to more types of files as long as multiple people would find that useful.
KevinH is offline   Reply With Quote
Old 02-24-2025, 03:25 PM   #55
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,434
Karma: 5702578
Join Date: Nov 2009
Device: many
Okay, I have expanded the use of GetInfo to all file types adding additional type specific data but file size is now provided for every file. Using BeckyEbook trick to set an "i" shortcut make it all fast and easy.

This change will appear in the next version of Sigil.
KevinH is offline   Reply With Quote
Old 02-28-2025, 12:07 PM   #56
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,434
Karma: 5702578
Join Date: Nov 2009
Device: many
For those who feel as Turtle91 does, you will hopefully be happy to learn that barring any unforeseen technical difficulties, we have just now integrated Python Function Replace into Sigil master in an experimental form. It is integrated with both Find and Replace and Saved Searches, has its own Python Function editor with Python syntax highlighting and line numbers. BeckyEbook nicely donated the icon gui support that integrates it into Find Replace.

Note: The Sigil version does NOT use a Function Replace "mode". It is invoked any time the F&R Replace field has a new "escape" like the following:

\F<YOURFUNCTIONNAMEHERE>

And in that way it is automatically already supported by Saved Searches, F&R histories, etc.


FYI, this was not as simple as it is when done in pure python inside a plugin. The diff of the changes needed was over 3200 lines long and required a lot of infrastructure support because positions and lengths of strings inside Qt/C++ differ from the lengths and positions of the identical strings in Python as one is utf-16 encoded (Qt) and the other is utf-32 encoded. So all non-BMP characters need to be accounted for.

I just do not have any good testcases of epubs that use many non-BMP chars to test with. So if anyone can point me to an epub that uses lots of emojis preferably (or Asian languages with non-BMP chars) please let me know.

So this is still all very experimental. There will be bugs. Help testing will be needed. Those who build their own can check out Sigil master now.

At some point, we will make CI builds available for more testers to play with.

Hope this helps.

KevinH

ps. FYI - if unforeseen technical difficulties do arise or the code maintenance support turns out to be too much for this feature's incremental usefulness for the majority of users we will simply revert it before the final actual release and will fall back to the newly revised plugin for those users who still need this feature.

I hope to make CI builds this weekend and post them for those interested.

KevinH



Quote:
Originally Posted by Turtle91 View Post
RE: Function Replace plugin

In my testing so far I haven’t found any issues with the actual function replace… the default functions seem to work as expected. One detractor I found using a plugin was that I can’t interact with the rest of Sigil’s functionality the way you can if it is a built-in feature. eg. Using a clip to fill in the Find field, or copying the highlighted portion into the Find field like you can by selecting the magnifying glass in the ribbon.

This is certainly usable, just not as nice/consistent as having it built-in to the find/replace window.

I will keep working with it and see how it does when making my own functions.
KevinH is offline   Reply With Quote
Old 02-28-2025, 12:40 PM   #57
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,291
Karma: 20171067
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire




Thank You! Can't wait to test it out!!
Turtle91 is offline   Reply With Quote
Old 02-28-2025, 02:29 PM   #58
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,434
Karma: 5702578
Join Date: Nov 2009
Device: many
Beta builds of Todays's Sigil master with all new features so far

Hi All,

I had a free moment and got the github CI builds made and deployed and uploaded them to one of my personal githup repository release here:

https://github.com/kevinhendricks/Bu...nMac/releases/

See:

Sigil-Beta-Mac-arm64.tar.xz
Sigil-Beta-Mac-x86_64.tar.xz
Sigil-Beta-Windows-x64-Setup.exe

Note: These are github Continuous Improvement builds for testers. They are *NOT* signed or notarized.

These builds include major changes including Qt 6.8.2, Python 3.13.2, and has experimental builds of all of the bug fixes to this point and new features we have added so far including the experimental Python Function Replace.

So all testers welcome. Any feedback or questions about the new features should be directed to this thread.

FWIW, we are still quite a ways from any new release. As there are still more new features being planned including a potential tool to standardize the file extensions (that can be used under Automate too), and a second potential tool to update all old MediaTypes to be the ones recommended under the latest epub 3.3 spec. A new version of the PCRE2 library is still coming as well.

Any and all feedback welcomed.

Thanks


Update:

Here is the partial changelog for what is included in these Beta for willing testers.

Code:
pre-2.X.X
   Bug Fixes
     - allow SVG resources to be selectable alongside Image resources and context menu to work in BookBrowser
     - because Linux has multiple light and dark themes (but different)
         always send out our internal theme change signal when palette changes
     - detect urls in altimg attributes in math tags and properly update them is changed
     - disable workaround for FR open interfering in MainWindow restorestate as no longer needed
     - fix incorrect custom dc:identifier creation by Metadata Editor.
     - fix missing SearchEditor Model Controls tooltips

   New Features
     - upgrade MacOS and Windows release and ci builds to use Qt 6.8.2
     - upgrade MacOS and Windows release and ci builds to embed Python 3.13.2
     - move all platforms to use cmake FindPython3 to simplify our cmake files and remove leftovers
     - add ability to easily clear an Open With editor list, without need to edit ini files
     - added new Search Menu option that will hide the Find and Replace Window if open
     - extend GetInfo to all BookBrowser file types
     - Add PythonFunctionEditor and support Python Function Replace in Sigil (experimental)

Last edited by KevinH; 02-28-2025 at 02:32 PM.
KevinH is offline   Reply With Quote
Old 03-01-2025, 08:39 AM   #59
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,679
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
I just installed the beta and briefly tested the predefined functions, which are a great addition to Sigil!



Am I right in assuming that unlike the Calibre function mode, users won't be able to easily add their own custom functions, unless they add them to fr_utils.py and functionrep.py?

If so, could you could you please briefly document the interface in the Plugin Framework guide?

If it's not too much work, I'd recommend adding two additional custom functions that Kovid described in the Calibre function mode documentation.

Using a spelling dictionary to fix mis-hyphenated words
Auto numbering sections

I also have a minor nitpick about the GUI. On my Windows machine, both the X and 𝑓 buttons are rendered in a color that is usually used for disabled buttons. It might be helpful to display them in another color that is also visible in dark mode to indicate that they can be clicked.
Attached Images
 
Doitsu is offline   Reply With Quote
Old 03-01-2025, 08:46 AM   #60
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,335
Karma: 203719142
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Custom functions are creatable with the new editor widget. Then you use them with the \F<YOURFUNCTIONNAMEHERE> syntax. There should be no need to manually edit existing Python files in order to add custom functions.

EDIT: Sorry, I think I misunderstood. You won't be able to add universally usable functions (like replace_capitalize used in the built-in capitalize), but then there's really no reason to do so when all of the functionality can be coded within the custom replace. Unless I'm missing something else?

Last edited by DiapDealer; 03-01-2025 at 09:53 AM.
DiapDealer is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Improvements/bugs/features dontcrash KOReader 10 10-23-2019 10:05 AM
Touch HD, Future features or dead features? ElWorm PocketBook 4 02-07-2018 11:36 AM
[FREE]Innovative Ideas to Ignite Your Mind: Business Ideas to Start Entrepreneurship amazon author Self-Promotions by Authors and Publishers 0 04-01-2015 04:09 AM
How many 'improvements' do we really need? Fozzybear General Discussions 61 04-15-2012 12:38 PM
ideas for calibre features smarties86 Recipes 3 07-01-2011 10:23 AM


All times are GMT -4. The time now is 11:14 PM.


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