Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-16-2020, 10:44 AM   #16
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: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Unfortunately, the nav is being completely rebuilt each time from scratch and any added attributes are lost. That said, any time we add an epub-type toc attribute we can add in the matching aria roll attribute as well. It can not hurt!

As for default selections for editing when format tools are used when no text is selected, I will look into that. That should be doable.

I personally am not a fan of autocorrect or autocomplete. When writing longer things I typically speed things up by using my own unique abbreviations for longer or often used words and then doing a find and replace for each abbreviation. But this is typically done in a Word Processor long before loading it into Sigil.

So let's hear what others are think about that feature request.

Thanks!


Quote:
Originally Posted by elibrarian View Post

Headers (H1-H6) will always be a full line. So why not make the CTRL + 1 etc. insert <h1>-</h1> tags around the line, in which the cursor is placed, if (and only if) no text is selected?

Almost the same goes for bold, italics etc. - if no text is selected, the ctrl + b (e.g.) could surround the word where the cursor is placed.

(I have made something like it in most of my tekst/html-editors using macros or AutoHotKey, and you'll be amazed how many mouse moves and time it saves!)

Also, how about an autocorrect function with the ability to use personal and exchangeable word lists (like the one in Atlantis, but with regexes)?

And then one small gripe: When I regenerate a TOC, Sigil will preserve the header and the "<nav epub:type='toc' id='toc'>", but removes "role='doc-toc'". It is of course a small thing to re-insert (I always run ACE as one of the last things before publishing my books, and it will tell me if I forget).

Regards,

Kim
KevinH is offline   Reply With Quote
Old 12-16-2020, 10:57 AM   #17
elibrarian
Imperfect Perfectionist
elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.
 
elibrarian's Avatar
 
Posts: 464
Karma: 724664
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
Quote:
Originally Posted by KevinH View Post
I personally am not a fan of autocorrect or autocomplete. When writing longer things I typically speed things up by using my own unique abbreviations for longer or often used words and then doing a find and replace for each abbreviation. But this is typically done in a Word Processor long before loading it into Sigil.
I see that I've not been totally clear on what I suggest - I am not that great a fan of autocorrect myself, and habitually turn it off in Word etc. What I'm after is the part of the Atlantis autocorrect function that allows to load a personal/customised list of corrections and run it upon a whole text, which is extremely useful for correcting OCR'ed texts, especially from blackletter prints, where even Abbyy and gImageReader makes the same errors time and time again.

Hope this will clarify my meaning.

Regards,

Kim

Last edited by elibrarian; 12-16-2020 at 10:59 AM. Reason: typos
elibrarian is offline   Reply With Quote
Advert
Old 12-16-2020, 11:08 AM   #18
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: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Sounds like a good idea for a plugin.

In fact there are already plugins that try to do things like this for common scanner mistakes. I am not sure if they are word list driven or not.

Obviously this list would need to be language specific.
Would this word list of find and replaces be book specific or reasonably static?

Could it be autogenerated from spellcheck and suggestion output?

Let's see what other people think, especially plugin devs.

Quote:
Originally Posted by elibrarian View Post
I see that I've not been totally clear on what I suggest - I am not that great a fan of autocorrect myself, and habitually turn it off in Word etc. What I'm after is the part of the Atlantis autocorrect function that allows to load a personal/customised list of corrections and run it upon a whole text, which is extremely useful for correcting OCR'ed texts, especially from blackletter prints, where even Abbyy and gImageReader makes the same errors time and time again.

Hope this will clarify my meaning.

Regards,

Kim
KevinH is offline   Reply With Quote
Old 12-16-2020, 11:17 AM   #19
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: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I like the table-based metadata editor more, as well. But I also understand (and agree with) the reasons it is the way it is now. It's just a bit unfortunate that the metadata editor is a bit of a catch-22 in its current state. It offers a way to edit metadata in a wysiwyg manner, but using it effectively means that a fairly thorough understanding of metadata specifications and their various hierarchies is sort of a pre-requisite. And having a fairly thorough understanding of metadata specifications and their various hierarchies can mean that manually editing the opf to add metadata might actually be simpler.

But the bottom line for me is that I don't think there's a solution for a wysiwyg metadata editor for epub3 that would appeal to those already knowledgeable and would also be intuitive enough for a novice to navigate.

In other words: the easier it is, the less it can do; and the more it can do, the less useful it becomes to those who understand its use. *shrug*

That's not meant to dismiss the suggestion at all. But then I don't use the new metadata editor any more than (or less) than I did the previous one.
DiapDealer is offline   Reply With Quote
Old 12-16-2020, 11:18 AM   #20
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,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
@KevinH

For reference purposes, here's a screenshot of the Atlantis WP Autocorrect dialog.

Doitsu is offline   Reply With Quote
Advert
Old 12-16-2020, 11:25 AM   #21
elibrarian
Imperfect Perfectionist
elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.
 
elibrarian's Avatar
 
Posts: 464
Karma: 724664
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
Quote:
Originally Posted by KevinH View Post
Obviously this list would need to be language specific.
Would this word list of find and replaces be book specific or reasonably static?
The way Atlantis has done it (and some other software of similar intention) is by lists/text files with word pairs. The lists are pure text, and interchangeable, so they are static, but you can have as many as you want for different types of books or languages, and load whichever you deem most useful for the actual purpose.

Perhaps a better example might be wReplace ( http://www.sharktime.com/en_wReplace.html ) - it's rather old and haven't seen an update for many years, but still works.

Quote:
Originally Posted by KevinH View Post
Could it be autogenerated from spellcheck and suggestion output?
Probably could. I have build mine from word frequency lists using a wordprocessor and a spreadsheet.

Regards,

Kim
elibrarian is offline   Reply With Quote
Old 12-16-2020, 11:53 AM   #22
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: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Based on the images and discussion above ... something like an AutoReplace tool or plugin that allows you to load and save a text file. The text file would be pipe delimited one entry per line with what to find first then a "|" character then the replacement text followed by a new line (or cr/lf for Windows).

No wild cards or placeholders would be allowed in the list. (are placeholders and wildcard allowed in Atlantis?) The find text and replacements would be *whole* word only.

All text files would be utf-8 encoded.

The interface once you selected and loaded a file would show you the loaded information in two columns, allowing a user to edit/tweak either column before doing the replacement.

Then there would be a "Do It" button, that when pushed would automatically do all of the replacements but only in the text not in tags across selected xhtml files (or all xhtml files).

It would report the total number of replacements per file.

That sounds very very doable, although it may be better as a plugin..

Please correct or adapt the above (anyone who is familiar with tools like this) as needed to refine exactly what is being suggested.

Thanks!

Last edited by KevinH; 12-16-2020 at 12:04 PM.
KevinH is offline   Reply With Quote
Old 12-16-2020, 12:34 PM   #23
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: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
What if we did go to a two-stage approach with a scrolling form style interface with pulldowns with just the most used and basic set of metadata on the first stage and an advanced button to load the current metadata editor, updated with any changes on the first form.

If we did that, then what information should appear on the first form (it could even be an html form that is create on the fly and loaded in a Preview-like tool).

book main title
book secondary title
book series number
book series title
primary language pulldown
secondary language pulldown
author1 with file-as
author2 with file-as
author3 with file-as
contributor1 with associated role pulldown
contributor2 with associated role pulldown
contributor3 with associated role pulldown
subject
keywords
description bigger box supporting html markup
identifier1 with pull down for identification type
identifier2 with pull down for identification type
publication date

and what else?

How about that approach?

Quote:
Originally Posted by DiapDealer View Post
I like the table-based metadata editor more, as well. But I also understand (and agree with) the reasons it is the way it is now. It's just a bit unfortunate that the metadata editor is a bit of a catch-22 in its current state. It offers a way to edit metadata in a wysiwyg manner, but using it effectively means that a fairly thorough understanding of metadata specifications and their various hierarchies is sort of a pre-requisite. And having a fairly thorough understanding of metadata specifications and their various hierarchies can mean that manually editing the opf to add metadata might actually be simpler.

But the bottom line for me is that I don't think there's a solution for a wysiwyg metadata editor for epub3 that would appeal to those already knowledgeable and would also be intuitive enough for a novice to navigate.

In other words: the easier it is, the less it can do; and the more it can do, the less useful it becomes to those who understand its use. *shrug*

That's not meant to dismiss the suggestion at all. But then I don't use the new metadata editor any more than (or less) than I did the previous one.
KevinH is offline   Reply With Quote
Old 12-16-2020, 01:15 PM   #24
elibrarian
Imperfect Perfectionist
elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.
 
elibrarian's Avatar
 
Posts: 464
Karma: 724664
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
Quote:
Originally Posted by KevinH View Post
No wild cards or placeholders would be allowed in the list. (are placeholders and wildcard allowed in Atlantis?) The find text and replacements would be *whole* word only.
Placeholders and wildcards are not allowed in Atlantis (which is my main gripe withe the Atlantis implementation). Given it is made as a plugin, wouldn't Python's regex engine be able to handle something in that direction?

(I would have no objections to a plugin - would the plugin implementation be significant slower than a C++ implementation in the Sigil core if working with big files/many replacements?)

Regards,

Kim

Last edited by KevinH; 12-16-2020 at 01:30 PM. Reason: Sorry hit efit instead of quote by mistake!
elibrarian is offline   Reply With Quote
Old 12-16-2020, 01:16 PM   #25
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,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
Based on the images and discussion above ... something like an AutoReplace tool or plugin that allows you to load and save a text file. The text file would be pipe delimited one entry per line with what to find first then a "|" character then the replacement text followed by a new line (or cr/lf for Windows).
Since most user probably maintain such list with a spreadsheet app, I'd recommend that the input files should be two-column .csv or tab-delimited files, because both can be easily exported.

Quote:
Originally Posted by KevinH View Post
All text files would be utf-8 encoded.
This is a good idea, because some Windows apps still save .csv files as ANSI/CP1252 files, but most can save UTF-8 files.

Quote:
Originally Posted by KevinH View Post
That sounds very very doable, although it may be better as a plugin.
Agreed. I actually might write one over the Christmas break, if enough users are interested and KevinH isn't interested in writing it.


Quote:
Originally Posted by elibrarian View Post
Given it is made as a plugin, wouldn't Python's regex engine be able to handle something in that direction?
Python actually has two regex engines (re and regex) and one of them even has limited support for fuzzy searches.

Quote:
Originally Posted by elibrarian View Post
(I would have no objections to a plugin - would the plugin implementation be significant slower than a C++ implementation in the Sigil core if working with big files/many replacements?)
That depends on the implementation and the number of entries in the list. A C++ implementation would definitely be faster, but a pure Python solution shouldn't be that much slower, especially, if the list isn't too long.

Last edited by Doitsu; 12-16-2020 at 01:30 PM.
Doitsu is offline   Reply With Quote
Old 12-16-2020, 01:36 PM   #26
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: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
The issues with regular expressions would be the need to capture and replace wildcard text and then to get users to properly regex escape any entries that use any regex special chars but do not want regex including (, ), *, !, ., ?.

Also since fully automated, regex could easily lead to unexpected matches and replacements. It is probably better used inside Find and Replace where you can say "no", just for safety sake.

Speed of python should not be an issue as this need not be done in real time, and is most likely once or twice perhaps with different lists.


Quote:
Originally Posted by elibrarian View Post
Placeholders and wildcards are not allowed in Atlantis (which is my main gripe withe the Atlantis implementation). Given it is made as a plugin, wouldn't Python's regex engine be able to handle something in that direction?

(I would have no objections to a plugin - would the plugin implementation be significant slower than a C++ implementation in the Sigil core if working with big files/many replacements?)

Regards,

Kim

Last edited by KevinH; 12-16-2020 at 01:39 PM.
KevinH is offline   Reply With Quote
Old 12-16-2020, 01:38 PM   #27
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: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
And Doitsu, yes we could use commas or better yet tabs as delimiters. A pulldown to select delimiter char might also be a good idea as lists can then come from different sources.
KevinH is offline   Reply With Quote
Old 12-16-2020, 02:27 PM   #28
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,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
And Doitsu, yes we could use commas or better yet tabs as delimiters. A pulldown to select delimiter char might also be a good idea as lists can then come from different sources.
On second thought, there actually is no need to create a brand-new new plugin, because users already can create a Saved Search groups.
All that's missing is an import filter for comma/tab-delimited files.

How about simply adding .csv and .txt files as file types to the Import Search Entries dialog box? (.txt would be for tab-delimited files)
Doitsu is offline   Reply With Quote
Old 12-16-2020, 02:51 PM   #29
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: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
What format does it currently import and export?

I had no idea this feature even existed in Sigil!
KevinH is offline   Reply With Quote
Old 12-16-2020, 03:20 PM   #30
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,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
What format does it currently import and export?
AFAIK, users can only import and export Saved Searches .ini files.
Doitsu is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Touch HD, Future features or dead features? ElWorm PocketBook 4 02-07-2018 11:36 AM
New Plugin Features in the upcoming Sigil 0.8.900 KevinH Plugins 6 09-14-2015 02:48 PM
FAQ>How do I use ... features of the conversion tools? chaot Library Management 2 08-28-2012 07:28 AM
Writer2ePub, Sigil, and mjBookMaker Features Ransom Writer2ePub 1 09-21-2011 09:20 AM
ePub Creation Tools: Sigil vs Oxygen twedigteam ePub 6 12-10-2010 03:41 AM


All times are GMT -4. The time now is 02:43 PM.


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