MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Features that i miss in Sigil (https://www.mobileread.com/forums/showthread.php?t=340530)

abraum 07-08-2021 12:42 PM

Features that i miss in Sigil
 
Hi,

so far i used calibre editor to edit my ebooks (epub; most from scanned books converted with abbyy fine reader). Sigil has some very nice features that calibre hasn't but i miss some features:

automatically add closing tag:
finereader is doing a good job but sometimes i need to change some tags and here calibre can automatically add the </tag> when there is a <tag>. when i have this "<p>sdfvbjhdfsbdjhdbdfjhdf". when i now enter "</" calibre completes this to "</p>. The same with all other tags.

When i have headlines or bold text the text is "highlighted" also in the editor and the preview. This can be very helpful in big files.

The images sorting is strange. finereader creates this image names: "main-1.jpg", "main-11.jpg". sigil is sorting the images like this:

Quote:

main-1.jpg
main-10.jpg
main-2.jpg
correct is

Quote:

main-1.jpg
main-2.jpg
main-10.jpg
When i save a file calibre is much faster then sigil. is this normal behaviour or a problem with my system?

KevinH 07-08-2021 01:47 PM

Sigil has the ability to insert the proper ending tag at any text position. Just use that menu.

Sorting is not done numerically. Simply group rename your images in Sigil is you want to inject leading 0s to force a particular sort. This is very easy to do in Sigil.

Saving a file is never slow on my system. Not sure why that would be for you.

theducks 07-08-2021 01:51 PM

Many file systems ALPHA sort. This means, it uses the ASCII value to sort, left to right.
Padding digits with a Leading 0 is the common way to keep the character position, thus sorting, in lineup

KevinH 07-08-2021 04:09 PM

Also, the order of images and other non-spine resources is not relevant. And here is no order inside the zip archive that comprises the epub. The only order important in BookBrowser is the xhtml files order which represents the spine.

As theducks, explained, most file systems use alphanumeric sorting when presenting unordered sets of files. This is exactly what Sigil's BookBrowser does as well.

If saving an epub is "slow" my guess is your anti-virus protection or auto back-up software is interfering somehow. Or you are using a slower network addressable storage (or are trying to write files back into calibre?)

BetterRed 07-08-2021 08:30 PM

Quote:

Originally Posted by KevinH (Post 4137230)
If saving an epub is "slow" my guess [ . . . ] or [you] are trying to write files back into calibre?

Dell i7-7700 16GB RAM - Windows 10 64 bit Pro, Defender AV, Sigil 1.6, Calibre 5.22

I start Sigil via the calibre library manager's built-in Open With feature, I also use the calibre Editor. I cannot discern any difference in the time they take to save an EPUB back into the library book directory it came from - both pretty damn quick.

I start editors for other file types in the same way, the fact that the files are stored in a calibre library makes no difference to save times.

The calibre library manager doesn't monitor the library for file content changes, nor even for file/directory adds, renames or deletes. Calibre libraries are 'black-boxes' in name only, factually they are a hierarchy of regular directories and files whose names are determined by the library manager software.

:bulb2: My calibre libraries are not subject to Windows Controlled folder access (ransomware protection).

BR

DNSB 07-09-2021 01:59 AM

Quote:

Originally Posted by BetterRed (Post 4137271)
The calibre library manager doesn't monitor the library for file content changes, nor even for file/directory adds, renames or deletes. Calibre libraries are 'black-boxes' in name only, factually they are a hierarchy of regular directories and files whose names are determined by the library manager software.

Personally, I treat my calibre libraries as black boxes since I've read too many messages from people who have mucked around with their calibre libraries with operating system and/or third party file tools and are now pleading for help with issues. Or the person a while back who was complaining about not being able to save a file from Sigil when they also had it open in e-book viewer so they could see what changes they needed to make. I really don't need to add PEBKAC errors to the problems I already deal with.

BetterRed 07-09-2021 04:15 AM

@DNSB - Your "Personally, I treat my calibre libraries as black boxes since. . . " is entirely consistent with my "Calibre libraries are 'black-boxes' in name only, factually. . ."

BR

Turtle91 07-09-2021 01:07 PM

Black Boxes for ransomware protection....interesting.

Do you have a link or something to point to more info??

DiapDealer 07-09-2021 01:25 PM

Windows is much more secure now than it used to be. It has achieved this by making it difficult for programs to do any of the things they might need to do in order to function correctly. ;)

Turtle91 07-09-2021 04:24 PM

Quote:

Originally Posted by DiapDealer (Post 4137461)
Windows is much more secure now than it used to be. It has achieved this by making it difficult for programs to do any of the things they might need to do in order to function correctly. ;)

lol.... that is truth!

I thought BR had some special something saying "not subject to Windows Controlled folder access".

DiapDealer 07-09-2021 04:59 PM

You can exclude folders from Windows Controlled folder access (or at the very least, turn it off entirely). I think that's what BR was saying. His calibre library is either located somewhere not under the control of the built-in controlled folder access, or he's disabled it.

EDIT: it seems you either turn the protection off, or you exclude applications from it. I always turn it off, since I don't install software with questionable pedigrees.

BetterRed 07-09-2021 08:44 PM

Quote:

Originally Posted by DiapDealer (Post 4137513)
I think that's what BR was saying. His calibre library is either located somewhere not under the control of the built-in controlled folder access [. . .]

↑ ↑ ↑ ✔

Been ever thus.

The default location used by calibre is the user Documents folder, which is one of the Standard folders that Windows designates as being "Controlled". I've never kept anything I value in Windows so-called Standard folders.

I was trying to imagine what could make saving an EPUB file after editing it in Sigil significantly slower than saving the same EPUB file after editing it in the Calibre Editor on @abraum's system, but not on mine.

Since yesterday this crossed my mind:

I have the calibre Environment variable CALIBRE_CACHE_DIRECTORY set to C:\_AppData\Calibre\Cache and I can see that's where the Calibre Editor unpacks the EPUB its working on. I can't recall the calibre's default location for this, but I don't think it's C:\Users\<user>\AppData\Local\Temp

I have set Sigil->Edit->Preferences->General Settings->Advanced->Set folder where temporary files should be created: to C:/_AppData/Sigil/Temp and I can see that's where Sigil unpacks the EPUB its working on. I'm guessing the default location is C:\Users\<user>\AppData\Local\Temp

So, I'm wondering if @abraum has some 3rd party always-on clean-up utility that maintains a watch and acts on changes to C:\Users\<user>\AppData\Local\Temp.

BR

DiapDealer 07-09-2021 09:54 PM

Quote:

Originally Posted by BetterRed (Post 4137569)
So, I'm wondering if @abraum has some 3rd party always-on clean-up utility that maintains a watch and acts on changes to C:\Users\<user>\AppData\Local\Temp.

BR

Anything's possible. I've never really understood the attraction of such "cleanup" utilities, myself. I'd much rather stick to using well-behaved programs that properly cleanup after themselves.

The OP never really mentioned what version of Sigil they are using, or what kind of epub (huge, monolithic with tons of images?), so there's not much point in me hazarding a guess at this point.

BetterRed 07-09-2021 11:30 PM

IIRC one of the popular system image backup utilities. or maybe an AV tool, added a clean-up feature in the recent past - and turned it on by default.

abraum 07-10-2021 06:30 AM

Quote:

Originally Posted by KevinH (Post 4137197)
Just use that menu.

what menu? what i mean is when i have this code

Code:

</h1>text
and i enter '</' at the end of the line calibre completes this to '</h1> automatically. i like this very much.

Quote:

Originally Posted by KevinH (Post 4137230)
If saving an epub is "slow" my guess is your anti-virus protection or auto back-up software is interfering somehow. Or you are using a slower network addressable storage (or are trying to write files back into calibre?)

i don't use windows, i use linux. there is no anti-virus or firewall or backup software running in background. i only use calibre editor and not calibre library. i open all books with the "open with" menu of the file manager in sigil or calibre editor.

i will test this on an other system using ubuntu.

DiapDealer 07-10-2021 07:51 AM

Version of Sigil, please?

KevinH 07-10-2021 09:57 AM

As sigil's user's guide explains:

Sigil's has an Insert->Closing Tag menu.

In Sigil's Preferences you can assign it a shortcut key sequence.
So instead of typing "</" you just use the key sequence you assigned at the same point.


Quote:

Originally Posted by abraum (Post 4137669)
what menu? what i mean is when i have this code

Code:

<h1>text
and i enter '</' at the end of the line calibre completes this to '</h1> automatically. i like this very much.


phillipgessert 07-10-2021 12:34 PM

Sigil’s ability to launch an external editor is also really useful for stuff like this. Anytime I find myself wishing Sigil had some feature found in a dedicated text editor/IDE, I remind myself that’s probably the exact reason the feature exists. I use it anytime I want multicursor, for example. Glad for this topic though as I hadn’t realized Sigil had this closing tag feature.

KevinH 07-10-2021 12:38 PM

Quote:

Originally Posted by phillipgessert (Post 4137746)
Sigil’s ability to launch an external editor is also really useful for stuff like this. Anytime I find myself wishing Sigil had some feature found in a dedicated text editor/IDE, I remind myself that’s probably the exact reason the feature exists. I use it anytime I want multicursor, for example. Glad for this topic though as I hadn’t realized Sigil had this closing tag feature.

It is smart enough to properly handle nested tags as well.

Kevin

phillipgessert 07-10-2021 01:41 PM

Quote:

Originally Posted by KevinH (Post 4137748)
It is smart enough to properly handle nested tags as well.

Kevin

That’ll come in handy! And come to think of it, assigning some arbitrary shortcut seems less error-prone than the usual autocomplete approach. I’ve definitely gone into autopilot and wound up with more </div>div>s than I care to admit.

Tex2002ans 07-10-2021 05:36 PM

Quote:

Originally Posted by phillipgessert (Post 4137766)
That’ll come in handy! And come to think of it, assigning some arbitrary shortcut seems less error-prone than the usual autocomplete approach. I’ve definitely gone into autopilot and wound up with more </div>div>s than I care to admit.

:thumbsup:

I hate the auto-closing tag while typing. My brain/fingers are already miles ahead, and then I only notice the broken </div>div> while skimming, running epubcheck, or Prettifying and thinking: "wtf happened here?".

Which reminds me, it's frustrated me for so long in Calibre's Editor, I finally decided to do something about it.

In Calibre, the setting is in:

Edit > Preferences > Editor Settings > "Auto close tags while typing </"

Now that I've unchecked it, I'll be at peace! :D

Note: The auto-close in Calibre is helpful though in the one case of trying to debug seriously nested spaghetti code.

I sometimes click deep between the mess, then type "</" to try to spot what dang tag wasn't closed (and then easy to click inside + see opening tag by the highlight tag feature).

BetterRed 07-10-2021 06:58 PM

Quote:

Originally Posted by abraum (Post 4137669)
. . .
i don't use windows, i use linux. there is no anti-virus or firewall or backup software running in background. i only use calibre editor and not calibre library. i open all books with the "open with" menu of the file manager in sigil or calibre editor.

On your linux system, where do the calibre editor and Sigil unpack the epub?

BR

abraum 07-14-2021 02:24 PM

Quote:

Originally Posted by BetterRed (Post 4137819)
On your linux system, where do the calibre editor and Sigil unpack the epub?

it /tmp and /tmp is on the same ssd where the linux is booting.

Quote:

Originally Posted by DiapDealer (Post 4137691)
Version of Sigil, please?

its 1.6

Quote:

Originally Posted by KevinH (Post 4137713)
Sigil's has an Insert->Closing Tag menu.

this works. i'll test it in "normal work".

BetterRed 07-14-2021 07:14 PM

Quote:

Originally Posted by BetterRed (Post 4137819)
On your linux system, where do the calibre editor and Sigil unpack the epub?

Quote:

Originally Posted by abraum (Post 4138742)
it /tmp and /tmp is on the same ssd where the linux is booting.

Interesting - on Windows the calibre editor keeps its working copy of the unpacked EPUB files in a directory named Cache in its Configuration folder, and it uses the equivalent of /tmp to interoperate with external editors invoked via its Open With. The linux version must use a different mechanism to prevent data loss if the two editors make changes to the same file concurrently.

BR

Notjohn 07-21-2021 11:52 AM

>Saving a file is never slow on my system

Instantaneous, it seems to me!


All times are GMT -4. The time now is 10:13 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.