Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-31-2020, 02:13 AM   #16
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,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by DiapDealer View Post
How exactly does highlighting the closing tag help though?
For example, poorly converted books might contain redundant nested <div> tags. Tag highlighting helps to identify the closing tag and prevents users from deleting the wrong tag.
Doitsu is offline   Reply With Quote
Old 10-31-2020, 09:35 AM   #17
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,572
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
That may be the difference. I never bother trying to manually untangle an unruly div nest (even though 'Prettify' makes divs fairly easy for me to navigate) these days. So I'm never really looking for a particular closing tag in the first place. If the markup in question can't be safely/quickly regexed, then I turn to a parsing tool to safely match and delete/change tag pairs. Knowing where the closing tag is ahead of time provides no benefit in my editing process. *shrug*
DiapDealer is online now   Reply With Quote
Advert
Old 10-31-2020, 10:02 AM   #18
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: 439
Karma: 145424
Join Date: Dec 2017
Device: Kobo
In the same vein as Doitsu, it can also be useful when a large number of <span> are using it or when an aberrant use is made of it.

I know that here we are all more or less expert, and that we avoid this kind of situation, but when we try to repair a book... from the internet , conversion problems or the use of poor quality WYSIWYG editor are common.

And then it's not a big highlight red. The example of Notepad++ is excellent: discreet, but easily visible if you look for it specifically.

(Obviously to the extent that it can be implemented)
un_pogaz is offline   Reply With Quote
Old 10-31-2020, 10:13 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: 28,572
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
If only there were a parsing tool (usable within Sigil) that could help a user easily and safely change/delete tag pairs (even in a rat's nest of nested elements) without needing to know which particular closing tag went with which opening tag.
DiapDealer is online now   Reply With Quote
Old 10-31-2020, 10:58 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,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by DiapDealer View Post
If only there were a parsing tool (usable within Sigil) that could help a user easily and safely change/delete tag pairs (even in a rat's nest of nested elements) without needing to know which particular closing tag went with which opening tag.
And what parsing tool might that be? (I know that CTRL+. will add a closing tag, but don't know any keyboard shortcut for deleting tag pairs.)

Last edited by Doitsu; 10-31-2020 at 11:46 AM.
Doitsu is offline   Reply With Quote
Advert
Old 10-31-2020, 12:04 PM   #21
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,572
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I think it has the words 'Tag' and 'Mechanic' in the name.
DiapDealer is online now   Reply With Quote
Old 10-31-2020, 12:12 PM   #22
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,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by DiapDealer View Post
I think it has the words 'Tag' and 'Mechanic' in the name.
Sounds vaguely familiar. Are you sure that it works as advertised
Doitsu is offline   Reply With Quote
Old 10-31-2020, 12:19 PM   #23
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,572
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Doitsu View Post
Sounds vaguely familiar. Are you sure that it works as advertised
Most of the time.
DiapDealer is online now   Reply With Quote
Old 10-31-2020, 12:47 PM   #24
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,062
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by DiapDealer View Post
That may be the difference. I never bother trying to manually untangle an unruly div nest (even though 'Prettify' makes divs fairly easy for me to navigate) these days. So I'm never really looking for a particular closing tag in the first place. If the markup in question can't be safely/quickly regexed, then I turn to a parsing tool to safely match and delete/change tag pairs. Knowing where the closing tag is ahead of time provides no benefit in my editing process. *shrug*
Baen has one of the messiest (unnecessary) Div nests I have seen. Whatever Slit method they use, I generates a additional Nested Div per Chapter (file)

This is my BaenDeDiv search (I adjust the calibre# as it varies
Code:
Find="(?sm)<div class=\"calibre4\" id=\"calibre_pb_\\d+\">\\s+<p (.+)</p>\\s+(<div class=\"calibre6\" id=\"calibre_pb_\\d+\"></div>\\s+)*</div>"
99\Replace=<p \\1 </p>
By the last chapter, it can be 30+ levels (I repeat this Replace All many times until Not Found status appears)
theducks is offline   Reply With Quote
Old 10-31-2020, 05:15 PM   #25
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,572
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
So you don't need to know where the closing tag is either! You just run your regex repeatedly.
DiapDealer is online now   Reply With Quote
Old 10-31-2020, 09:05 PM   #26
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,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Doitsu View Post
For example, poorly converted books might contain redundant nested <div> tags. Tag highlighting helps to identify the closing tag and prevents users from deleting the wrong tag.
Agreed, and one of my favorite sayings I always promote: at-a-glance.

When you're trying to correct ugly code, seeing the highlight out of the corner of your eye at-a-glance speeds up debugging.

Those fractions of a second add up!

Again, back to the URL examples, many times you get junk where URLs are duplicated near punctuation:

Code:
<a href="reallyreallylongurl">"Example article</a><a href="reallyreallylongurl">"</a><a href="reallyreallylongurl">.</a><a href="reallyreallylongurl"></a>
where you want clean:

Code:
<a href="reallyreallylongurl">"Example article"</a>.
(This error is very common where authors are designing purely WYSIWYG [articles from CMSes, Google Docs, DOCX].)

With Highlighting Tags

You click in the first <a>, see the matching </a> in your peripheral.

Your brain goes into "debug the code" mode:
  • Click in 2nd <a> and see 2nd </a> highlighted.
    • Your eyes jump to the highlight, then move left 1 position. You see " should've been in previous link.
  • Click in 3rd <a> and see 3rd </a> highlighted.
    • Your eyes jump to highlight again. You see the closing . wasn't meant to be </a> at all.
  • Click in 4th </a>.
    • Expect a given <a> tag to light up. Doesn't happen. Hmmm...

With Syntax Highlighting

You click in the first <a>.

"Debug the code" mode:
  • Your eyes begin skimming <a href="reallyreallylongurl">"Example [...]
    • Your eyes jump to the nearest </a> you can see.
    • May land on 2nd or 3rd </a>, especially when URLs + inner text gets very long.

Your eyes are going from left->right.

The colors help, but once you start seeing lots of <a> and </a> close together, the markup can visually merge into a big blob. Brain trying to parse and look through markup/colors at the same time.

Computer instantly parses. No errors. Brain very slow and error prone. Computer help brain. Brain feel better! Brain not need work so hard!

Side Note: On all this UI/UX design and QoL enhancements, there was this set of fantastic videos by Tentacrul covering little niggles and inconsistencies adding up:

He breaks down:
  • Eyes needing to bounce back and forth.
  • Common things buried in menus (and menus in menus in menus)
  • Checkboxes with reset buttons
  • [...].

then gives recommendations on how they can be enhanced. Lots of great info that could be applied across many programs.

Quote:
Originally Posted by DiapDealer View Post
If only there were a parsing tool (usable within Sigil) that could help a user easily and safely change/delete tag pairs (even in a rat's nest of nested elements) without needing to know which particular closing tag went with which opening tag.


In the case of <a>, I also make heavy use of Tools > Reports > Links. Absolutely fantastic for spotting junk in links.

But again, that's sometimes where Calibre's highlighting is more helpful. As I'm jumping around the book, clicking into <a> tags, you can more quickly/easily parse code using your eyes.

Side Note: Another method I've used is this one:

Search: (<a href="[^"]+">)([^<]+)</a>\1
Replace: \1\2

OR:

Search: (<a href="[^"]+">)([^<]+)</a><a href="[^"]+">
Replace: \1\2

First one catches exact same URL right next to each other. Merges them together.

Second one catches any URL right next to each other. Merges them together.

And yet another basic:

Search: </a><a <---- Put a space here

points our links that are right near each other. Usually something fishy's going on when that happens.

Quote:
Originally Posted by Doitsu View Post
Quote:
Originally Posted by DiapDealer View Post
I think it has the words 'Tag' and 'Mechanic' in the name.
Sounds vaguely familiar. Are you sure that it works as advertised
I never heard of this tool in my life.

Last edited by Tex2002ans; 10-31-2020 at 09:09 PM.
Tex2002ans is offline   Reply With Quote
Old 10-31-2020, 10:47 PM   #27
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by DiapDealer View Post
I think it has the words 'Tag' and 'Mechanic' in the name.
Oh, yes, wondrous.

But may I add my wee voice to the "it would be lovely to be able to highlight the matching tag" group? IF it's convenient, of course.

Hitch
Hitch is offline   Reply With Quote
Old 11-01-2020, 12:37 AM   #28
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 802
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Quote:
Originally Posted by Hitch View Post
Oh, yes, wondrous.

But may I add my wee voice to the "it would be lovely to be able to highlight the matching tag" group? IF it's convenient, of course.

Hitch
Of course you may. Your "wee voice" is always welcome.

I agree. IF the work needed to implement the above is doable, not excessive and convenient I am sure KevinH and Diap will seriously consider implementing it in a future release.

N.B. Guarantees and/or timescales should not be requested!
Thasaidon is offline   Reply With Quote
Old 11-01-2020, 01:41 AM   #29
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Thasaidon View Post
Of course you may. Your "wee voice" is always welcome.

I agree. IF the work needed to implement the above is doable, not excessive and convenient I am sure KevinH and Diap will seriously consider implementing it in a future release.

N.B. Guarantees and/or timescales should not be requested!
Of course! One has no right to harangue or beleaguer those who nobly volunteer their time.

We do still see a lot of cleanup, with stuff that's so nested that it's devolved backward right into its own egg, so...tag matching would be loverly.

Hitch
Hitch is offline   Reply With Quote
Old 11-01-2020, 07:02 AM   #30
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 802
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Quote:
Originally Posted by Hitch View Post
Of course! One has no right to harangue or beleaguer those who nobly volunteer their time.
Hitch
I apologise Hitch, I have just realised my N.B. comment might have been taken to be aimed at you.

It most Certainly Was NOT!

Unfortunately there are some forum members who I think, shall we say, are over forceful and sometimes verge on disrespectful in the way they put forward RFQ's to KevinH and Diap. It was people of this water I was addressing.
Thasaidon is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick Question Moonbeam111 KOReader 9 08-28-2019 12:16 PM
Quick Question.. The Branimal Kobo Reader 3 04-25-2011 08:17 PM
Quick question... Magic Man Calibre 18 09-05-2010 03:18 PM
PRS-600 Okay, quick question.... emonti8384 Sony Reader 13 11-12-2009 06:18 PM
Quick Question. Baz047 Sony Reader 10 12-09-2008 12:25 PM


All times are GMT -4. The time now is 07:33 PM.


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