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-09-2021, 02:40 PM   #151
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,630
Karma: 5433388
Join Date: Nov 2009
Device: many
Hmm I checked Doitsu's Epub2LegacyMetadata plugin and in that he uses this style:

Code:
<dc:identifier opf:scheme="MOBI-ASIN">B005IEGK5C</dc:identifier>
So it would appear that some e-readers or calibre can grok that format as well in epub2.

The spec's flexibility here (where none is truly needed) makes this a bit of a muddle.
KevinH is offline   Reply With Quote
Old 02-09-2021, 02:48 PM   #152
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 687
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Kindle (Key3, PW2, PW3), Nook (ST, GLP), Kobo Touch, Tolino Vision 2
The examples given by @DNSB are probably the result of the KindleUnpack, and Calibre writes it the same way as Epub2LegacyMetadata.


Edit: https://github.com/kovidgoyal/calibr...ch?q=mobi-asin
BeckyEbook is offline   Reply With Quote
Old 02-09-2021, 03:17 PM   #153
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,630
Karma: 5433388
Join Date: Nov 2009
Device: many
Thanks BeckyEbook. But those calibre links appear to be for kfx and mobi ebooks and not epubs that are conversions from mobi.

If you have a mobi book with an asin in calibre and convert it to epub3, what metadata will it produce in the newly converted epub3 opf related to the asin?

In epub3 under the epub3.2 spec, the dc:identifier is not allowed the scheme attribute and so the scheme info is typically kept in the content field by adding a urn:XXXX: preface (similar to what DNSB's post showed first) or added by the use of identifier-type property is a separate refinement.

I will use calibre and Doitsu's approach for epub2, but I am just not sure exactly what calibre uses when it generates an epub3 from a mobi (or updates an epub2 to epub3) that has an asin as a dc:identifier?
KevinH is offline   Reply With Quote
Old 02-09-2021, 03:32 PM   #154
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 687
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Kindle (Key3, PW2, PW3), Nook (ST, GLP), Kobo Touch, Tolino Vision 2
I found one book from Amazon:

EPUB2 in Calibre:
Code:
<dc:identifier opf:scheme="MOBI-ASIN">B00ALQH9IY</dc:identifier>
EPUB3 in Calibre:
Code:
<dc:identifier>mobi-asin:B00ALQH9IY</dc:identifier>
BeckyEbook is offline   Reply With Quote
Old 02-09-2021, 03:53 PM   #155
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,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
My KindleImport plugin (based on KindleUnpack) will produce the following dc metatdata:

Code:
        if epub_version == "2":
            dc = '''<dc:identifier opf:scheme="AMAZON">%s</dc:identifier>''' % asin
        elif epub_version == "3":
            dc = '''<dc:identifier>urn:AMAZON:%s</dc:identifier>''' % asin
But that's a manual opt-in tweak only intended to provide seamless integration with Doitsu's Kindlegen plugin.

https://www.mobileread.com/forums/sh...&postcount=147

At the time of the change to the Kindlegen plugin, it was determined that the <dc:identifier>urn:AMAZON:%s</dc:identifier> was recognized by calibre. https://www.mobileread.com/forums/sh...2&postcount=73

But the vast majority of the time, KindleImport should be producing whatever the underlying KindleUnpack produces in this regard.
DiapDealer is offline   Reply With Quote
Old 02-09-2021, 04:12 PM   #156
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,630
Karma: 5433388
Join Date: Nov 2009
Device: many
Wow! And the list grows! I had no idea there were so many variants.

So just for consistency's sake, lets go with what calibre recognizes and Kindlegen and KindleImport plugin use given what DiapDealer posted.

Code:
        if epub_version == "2":
            dc = '''<dc:identifier opf:scheme="AMAZON">%s</dc:identifier>''' % asin
        elif epub_version == "3":
            dc = '''<dc:identifier>urn:AMAZON:%s</dc:identifier>''' % asin
Is that okay with everyone?
KevinH is offline   Reply With Quote
Old 02-09-2021, 04:22 PM   #157
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,630
Karma: 5433388
Join Date: Nov 2009
Device: many
I do like the urn:AMAZON approach over MOBI-ASIN as the former makes it clear who owns and assigns those identifiers. Mobi as a separate company is gone, bought out be Amazon as I remember.
KevinH is offline   Reply With Quote
Old 02-15-2021, 07:38 AM   #158
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 410
Karma: 145324
Join Date: Dec 2017
Device: Kobo
I'm translating and I just saw that ASIN should be "Amazon Standard Identification Number" and not "Amazon Unique Idenitifier" (copy-past).
un_pogaz is offline   Reply With Quote
Old 02-15-2021, 09:06 AM   #159
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,630
Karma: 5433388
Join Date: Nov 2009
Device: many
I will update that in the base for translations in time for the next release.

Thanks,

Kevin
KevinH is offline   Reply With Quote
Old 02-22-2021, 08:10 AM   #160
jcsalomon
Zealot
jcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheese
 
jcsalomon's Avatar
 
Posts: 100
Karma: 1204
Join Date: Jun 2012
Device: Bookari (née Mantano Reader) on Android; Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
When you say a custom dictionary, are you talking about a custom wordlist (user wordlist) or a full fledged en_US sized hunspell dictionary.
Custom word-list. E.g.:
Code:
acknowledgment
*acknowledgement
grepsling
sanafratz
where “sanafratz” and “grepsling” are made-up words for the science-fictional world, and the other lines ensure that the author’s preferred spelling is the only one allowed.
jcsalomon is offline   Reply With Quote
Old 02-22-2021, 05:11 PM   #161
isaacbh
Connoisseur
isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.
 
Posts: 57
Karma: 98196
Join Date: Mar 2015
Location: Israel
Device: Kobo Aura H20
Run SavedSearches on import

Not sure if it should be done with a plugin or in Sigil itself. I'm sure many here have developed over time a set of regex searches that they apply for every file added to the book (and then some specific to the book). It would be nice to have something like a checkmark next to saved-searches entries/groups that will run those entries automatically upon importing with "Add Existing Files". It's only a small convenience, I know (replacing having to Ctrl-Alt-F -> select group -> Replace all), but any savings adds up. I will also cast my vote for preserving search flags.

Thanks!
isaacbh is offline   Reply With Quote
Old 03-05-2021, 05:16 PM   #162
Coleccionista
Connoisseur
Coleccionista began at the beginning.
 
Posts: 67
Karma: 40
Join Date: Aug 2010
Device: iPad, Kindle Paperwhite
Lightbulb Saved searches

On the topic of Saved Searches I'd love to see in Sigil or in a Sigil plugin something that would not rely on a static list of entries. I sometimes find myself working with an ebook that let's say has 100s of <i class="xx">...</i> but I cannot expect to know beforehand the contents.

I want to search and replace for the appropiate <i>, <em> or <cite> tags and even add the lang/xml:lang when needed so I cannot really use Search&Replace because every 2 matches I need to switch the replace pattern.

What I would like is something like the spellchecker window where you would enter a tag pattern to search for (i.ex: <i class="xx">) and it will return an orderable, alphabetically and/or by frequency, list of all the text found inside this tag:
Code:
Text                    Number of times       Replace tag       Language code
Origin of Species       24                           cite                  en
alea                     14                             i                   -
Der Weiss Kunig          10                          cite                  de
¡basta!                    2                           em                 -
The idea is that in one swoop you would replace all the bland <i>/<em> or whatever styles for ones that are correct in language and semantics.
Once you have selected the changes Sigil would run all the list of Search and Replaces.
Coleccionista is offline   Reply With Quote
Old 03-05-2021, 10:15 PM   #163
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Coleccionista View Post
On the topic of Saved Searches I'd love to see in Sigil or in a Sigil plugin something that would not rely on a static list of entries. I sometimes find myself working with an ebook that let's say has 100s of <i class="xx">...</i> but I cannot expect to know beforehand the contents.
I've been thinking of similar for a while.

There's portions of these things that exist, but nothing that combines them all into one super power user tool! :P

1. Replacing <i class="xyz"> -> <em>

It doesn't let you see the inner HTML, and you still have to do one-by-one cleanup (but it has regex capabilities for class names).

But the Sigil/Calibre plugins exist:
  • DiapDealer's "TagMechanic" (Sigil)
  • "Diap's Editing Tools" (Calibre)

I wrote a tutorial here:

(These 2 plugins are incredibly high up in my workflow.)

It would be nice to be able to apply this in a nice list, then batch convert... but for that, see #2 below.

2. Style Mapping

This is a nice menu where you could see all current Styles, then you could assign them an equivalent HTML + class in the output.

InDesign and some of the Word->InDesign import tools have this.

For example, being able to say:
  • Change my "Heading-2" InDesign style -> <h2 class="ABC"> in the EPUB.
  • Change my "Heading-2" Word style -> "XYZ" InDesign style.

This is a video showing off InDesign's Style Mapping. And here are two Adobe pages explaining it in more detail:

Also see lots of my links/posts in these two threads:

This would be an absolutely fantastic functionality to have in Calibre while converting... although I currently don't feel it fits within the scope of Sigil. (But I could be wrong!)

Partial Functionality: If the full-blown Style Mapper is too much, I'm imagining something similar to Tools > Delete Unused Stylesheet...

Maybe a "Consolidate Stylesheet", where you could map nearly redundant classes into each other (like those Word/InDesign CSS where dozens of classes are almost exact duplicates, with only a minuscule difference).

You could check a box (or map) "calibre1", "calibre2", "calibre10", then have it consolidate all those into a single "Clean1". :P

And similar to InDesign, it would be nice to have a little window below that showed you:
  • the current class's CSS
  • vs. the expected class's CSS

when you click on each Style.

3. "Spellcheck List" for Search

I also wrote about something similar last year:

Past few years, I've "secretly" been using this concept of "Italic Lists" to catch typos/errors.

Quote:
Originally Posted by Tex2002ans View Post
For example, ripping every single <i> out and sorting into an alphabetical list:

Code:
<i>Enciclopedia Italiana</i>
<i>New York Times</i>
<i>Volksgemeinschaft</i>
<i>Wall Street Journal</i>
<i>Washington Post</i>
<i>individual</i>
<i>laissez-faire</i>
<i>negative</i>
From a glance, you can usually tell which ones are meant to be <i> (newspapers, book titles, foreign words/terms) and which ones are <em> (individual words).

[...]
Splitting ALL italics, then sorted alphabetically + uniques... opens up a whole new class of previously missed errors.

Code:
<i>Wall Street Journal</i>
<i>Wa11 Street Journal</i>
right next to each other stands out like a sore thumb.

Having everything displayed beautifully in a "Sigil/Calibre Spellcheck List"-form would be super icing on top.

If there's some sort of editor out there that lets you mass search text/HTML + display similar to Sigil's Spellcheck List... I'd be EXTREMELY interested.

Note: Notepad++'s "Find All" displays in a chronological list form, although it displays the entire line. When working with long paragraphs, many times the hit is going to display off screen:

Click image for larger version

Name:	Notepad++.-.Find.All.png
Views:	253
Size:	37.4 KB
ID:	185761

And there is an (unreleased) Sigil Plugin that let you search using Regex. The hits appear chronologically in the Validation Results, then you could double-click to jump to its exact location:

Click image for larger version

Name:	Sigil.Plugin.Regex.Search.png
Views:	133
Size:	29.6 KB
ID:	185758

Helpful, but nowhere near as nice as Spellcheck Lists!

4. Marking Lang

I wrote a few non-standard ways you could hackishly use the Spellcheck Lists to accomplish this:

Sure, nothing as easy/fancy... but it "works".

But yeah... more extremely powerful "Spellcheck List"-like interfaces... ten thumbs up from me.

- - -

I think the Style Mapper is the core to most of this.

Once that functionality gets introduced, I think the potential for the power tools like the "Lang Mapper" or "HTML+Class Mapper" or "Mass Replace Mapper" would follow.

Last edited by Tex2002ans; 03-06-2021 at 01:17 PM.
Tex2002ans is offline   Reply With Quote
Old 03-06-2021, 03:44 AM   #164
Coleccionista
Connoisseur
Coleccionista began at the beginning.
 
Posts: 67
Karma: 40
Join Date: Aug 2010
Device: iPad, Kindle Paperwhite
Thumbs up

Wow @Tex2002ans! I'm impressed by all the information on your post. Certainly I'm going to add TagMechanic to my plugins in Sigil and let's see if future versions can advance in this area.

One of the things I would also love is if when Sigil can't save the book from HTML errors (missing < or > or a tag, etc) it would give you more information. The popup dialog doesn't identify the wrong file and right now I have to turn live preview and check all recently modified files to get the warning error in LP with the line number (when lucky).
Code View should mark the line with a red dot like you see in Text/Code Editors and switch to offending page/line as soon as you click on "Manually Correct"
Coleccionista is offline   Reply With Quote
Old 03-06-2021, 09:06 AM   #165
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,630
Karma: 5433388
Join Date: Nov 2009
Device: many
Use the well-formed check button.
KevinH 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 11:10 PM.


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