Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 01-13-2020, 12:50 PM   #16
KevinH
Wizard
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: 4,157
Karma: 2620702
Join Date: Nov 2009
Device: many
I guess we could build a do_not_update_me map of all broken links and pass it along the universal updates code. We could then have it check each link against that list before trying to update it. That would mean touching and fixing the universal updates code for every resource type.

If this only matters for AddExisting html or ImportHTML, we might be able to change the link in the html code to be effectively external. We could for example change a broken link such as:

../Styles/sheet1.css

to

fixme://../Styles/sheet1.css

so that it would go untouched by the universal updates code. We could leave it like that, so that the user could easily find any broken links with a simple search, or parse the xhtml file with gumbo and strip the fixme: somehow.

Thoughts?
KevinH is offline   Reply With Quote
Old 01-13-2020, 01:03 PM   #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: 21,736
Karma: 118266822
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Just so that I understand ... If a link is broken, you want to import it as is?
It doesn't much matter to me so much, but in general... "yes," it seems.

Quote:
Originally Posted by KevinH View Post
Why?
For lack of a better reason: because that's how Sigil always did it in the past.

The current process of changing a broken link into a different broken link (outside of the epub) doesn't seem any less odd to me. Why waste time changing any links upon import that don't point to importable resources?
DiapDealer is offline   Reply With Quote
Advert
Old 01-13-2020, 01:11 PM   #18
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: 21,736
Karma: 118266822
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
I guess we could build a do_not_update_me map of all broken links and pass it along the universal updates code. We could then have it check each link against that list before trying to update it. That would mean touching and fixing the universal updates code for every resource type.

If this only matters for AddExisting html or ImportHTML, we might be able to change the link in the html code to be effectively external. We could for example change a broken link such as:

../Styles/sheet1.css

to

fixme://../Styles/sheet1.css

so that it would go untouched by the universal updates code. We could leave it like that, so that the user could easily find any broken links with a simple search, or parse the xhtml file with gumbo and strip the fixme: somehow.

Thoughts?
It definitely only matters for Add Existing/Import HTML from my point of view.

If they must be changed at all (and I still don't quite follow why we'd want to alter an unusable css/image link into different unusable css/image link), I guess I'd have no problem with a fixme:// protocol being added. But would it survive any and all QUrl finagling the various Sigil features might do it before it was fixed?

Last edited by DiapDealer; 01-13-2020 at 01:25 PM.
DiapDealer is offline   Reply With Quote
Old 01-13-2020, 01:32 PM   #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: 21,736
Karma: 118266822
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I understand, now, that "Sigil used to leave them alone" probably isn't exactly true. It's been a while. I'm guessing Sigil just made them all point to the generic resource-type folder structure Sigil always enforced. Like I said; I understand if this is just a consequence of Sigil 1.0.0. I'm not looking to reinvent the wheel.

Essentially ... Sigil has always changed broken links into different broken links upon import. It's just that broken links that happened to follow Sigil's old ../Text/, ../Images/, ../Styles/, pattern appeared to be left alone.

Last edited by DiapDealer; 01-13-2020 at 01:37 PM.
DiapDealer is offline   Reply With Quote
Old 01-13-2020, 02:59 PM   #20
KevinH
Wizard
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: 4,157
Karma: 2620702
Join Date: Nov 2009
Device: many
And when we always standardized we updated all links and so built a list of all links and all the links did not depend on the location of the xhtml file itself.

But under Sigil 1.0 if we move a xhtml file down into a subdirectory we need to update all of its links to be have ../ added to the front to be correct.

At that point, we would have to know if that link actually exists or not (or will exist if the link destination is also moved) in order to know whether to update it or not, but we do not have that information in universal updates anymore (cause they are not really universal - i.e. all links) so the code assumes all relative links are correct and then updates them no matter if they exist or not. So even "broken" links get updated if the xhtml file is moved.

As for trying a fixme:// scheme, custom url schemes are allowed and often used internally inside browsers. So any of the Qt or python url handling/parsing routines should handle a fixme: scheme properly.

Do you want us to try a "fixme:" scheme?

Last edited by KevinH; 01-13-2020 at 03:01 PM.
KevinH is offline   Reply With Quote
Advert
Old 01-13-2020, 03:20 PM   #21
Vroni
Banned
Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'Vroni knows the difference between 'who' and 'whom'
 
Posts: 168
Karma: 10010
Join Date: Oct 2018
Device: Tolino/PRS 650/Tablet
Quote:
Originally Posted by KevinH View Post
Just so that I understand ... If a link is broken, you want to import it as is?

Why?
Because thats the workflow i hat since version. 0.34b.

And to be honest: "Fixing" it to a file outside the epub is more senseless than just leave it alone.

And Kevin, i appreciate your work, but can you read postings more carefzlluy? I often have the impression that you are not really working very intense with Sigil. Otherwise my initial post would have been clear. I have a bunch of ebook which should have a similar titlepage and the same stylesheet. That iplies that i have templates i am adding. I writze i have files. An html file and a stylesheet file. Not clips or peces of code. So your workarounds ae not really helpful.

And i know what i am doing. I do not need something like fixme. Broken things are reported by Reports, Flightcrew, Epubcheck well formed check, whats so ever.

If the resource is missing in the epoub, thats fine. I will correct that later, creating the image with affinity or use something public domain later on.

A missing resource does not make an epub invalid, its not working correctly, so there are semantic errors. Not syntactically ones. Theres nothing in rhe specs telling me that references/links MUST work.

And again: if it is broken, you/sigil can do nothing to fix it. It stays broken. If you at the protocol fixme, it is broken. Pointing to resource outside the epub: still broken. So just let ir broken.

If i write

b = 0
a = 5 / b

in python, thats syntactcally correct. It wll result in a runtime error. Same with broken links. Thats syntactcally correct. But it will not work, at least not as intended.

And quite honestly: this whole discussion is taking up far too much time for me. Sometimes I think it's better to live with the bugs than to report them.

I appreciate the work you and Diap put into Sigil, but this time I'm really tired of talking it out.
Vroni is offline   Reply With Quote
Old 01-13-2020, 03:56 PM   #22
KevinH
Wizard
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: 4,157
Karma: 2620702
Join Date: Nov 2009
Device: many
I do read all posts carefully but, again your post simply was not very clear and I am no mind reader. Check out Odamizu s very clear summary as a well reported issue.

Sigil changed how it handles broken links. It did that out of necessity because of other needed internal changes for Sigil 1.0.

And yes you really can open an html in almost any text editor and paste it in Sigil and the same can be done with stylesheets as well.

And I am done being "berated" for trying to help.

Please do not "bother" yourself to submit any more bug reports as I won't be responding to them.

Perhaps DiapDealer can be convinced to help.

KevinH




Quote:
Originally Posted by Vroni View Post
Because thats the workflow i hat since version. 0.34b.

And to be honest: "Fixing" it to a file outside the epub is more senseless than just leave it alone.

And Kevin, i appreciate your work, but can you read postings more carefzlluy? I often have the impression that you are not really working very intense with Sigil. Otherwise my initial post would have been clear. I have a bunch of ebook which should have a similar titlepage and the same stylesheet. That iplies that i have templates i am adding. I writze i have files. An html file and a stylesheet file. Not clips or peces of code. So your workarounds ae not really helpful.

And i know what i am doing. I do not need something like fixme. Broken things are reported by Reports, Flightcrew, Epubcheck well formed check, whats so ever.

If the resource is missing in the epoub, thats fine. I will correct that later, creating the image with affinity or use something public domain later on.

A missing resource does not make an epub invalid, its not working correctly, so there are semantic errors. Not syntactically ones. Theres nothing in rhe specs telling me that references/links MUST work.

And again: if it is broken, you/sigil can do nothing to fix it. It stays broken. If you at the protocol fixme, it is broken. Pointing to resource outside the epub: still broken. So just let ir broken.

If i write

b = 0
a = 5 / b

in python, thats syntactcally correct. It wll result in a runtime error. Same with broken links. Thats syntactcally correct. But it will not work, at least not as intended.

And quite honestly: this whole discussion is taking up far too much time for me. Sometimes I think it's better to live with the bugs than to report them.

I appreciate the work you and Diap put into Sigil, but this time I'm really tired of talking it out.
KevinH is offline   Reply With Quote
Old 01-13-2020, 04:13 PM   #23
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: 1,976
Karma: 12600000
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2 & Air/Surface Pro/Kindle PW
Quote:
Originally Posted by KevinH View Post
...

Are people trying to "pre-edit" the links in an html document before importing it? If so, how would they know the actual structure in the epub unless they assume it will always be in standard format?

If so, wouldn't it be better just to fix the original links so that they point where they should?
...
Just so. The html file I was importing was a standard template file built under the old system when I knew that the associated image was going to be placed in ../Images/ I hadn't even thought about it automatically grabbing the image when I added the html, I just added them at the same time. When I tried adding just the html it changed the reference to the totally wrong desktop folder.

I can easily fix this - I think - by changing the reference in the template html to just: src="example.png" When the html file is imported it will find the image file and drag it in as well. Then it should update the reference automatically to "../Images/example.png".

As for the changing broken links on add...I wouldn't think they should be changed at all. If it is broken, leave it broken. You could just have a message pop-up mentioning broken links and the user could run a report to find and fix any at their leisure.
Turtle91 is offline   Reply With Quote
Old 01-13-2020, 04:27 PM   #24
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: 21,736
Karma: 118266822
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Vroni View Post
I appreciate the work you and Diap put into Sigil, but this time I'm really tired of talking it out.
Three or four posts on the subject and you're worn out? Wow! Sorry to bother you with requests for details in trying to ascertain the best way forward. We'll just jump to conclusions next time. If you have no interest in helping to work toward a solution with the latest version of Sigil, feel free to drop back to a version of Sigil that already works the way you want it to.
DiapDealer is offline   Reply With Quote
Old 01-13-2020, 05:48 PM   #25
odamizu
just an egg
odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.
 
odamizu's Avatar
 
Posts: 1,150
Karma: 1900384
Join Date: Mar 2015
Device: Kindle Oasis1 & Voyage, iOS
Just to be clear, my post was simply to provide additional testing results, not to report an issue or push for any sort of "fix". This issue doesn't affect my workflow as I never intentionally import html with broken links — and if I do so by mistake, I expect to have to fix them manually.
odamizu is offline   Reply With Quote
Old 01-13-2020, 06:07 PM   #26
KevinH
Wizard
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: 4,157
Karma: 2620702
Join Date: Nov 2009
Device: many
Understood but the point was you made it clear that it worked when the links existed and did not work when the links are broken, which was exactly what I was trying to understand.
KevinH is offline   Reply With Quote
Old 01-13-2020, 11:45 PM   #27
odamizu
just an egg
odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.
 
odamizu's Avatar
 
Posts: 1,150
Karma: 1900384
Join Date: Mar 2015
Device: Kindle Oasis1 & Voyage, iOS
Understood. I am happy that the information I provided ended up being useful

Last edited by odamizu; 01-14-2020 at 12:18 PM.
odamizu is offline   Reply With Quote
Old 01-14-2020, 03:49 PM   #28
pete6055
Enthusiast
pete6055 began at the beginning.
 
Posts: 48
Karma: 10
Join Date: Nov 2012
Device: none
This is definitely not a bug..

Because epubs need no longer be restructured to meet Sigil’s long-held standard, some existing html for paste (e.g. paths for stylesheets and images) may not be consistent with a custom format.

Selecting standard format prior to import will keep the paths consistent or one can simply reload the stylesheets and images.

We can either get used to this change, or lobby for setting the format state automatically in preferences and the addition of a keyboard toggle on and off switch.

Change happens...
pete6055 is offline   Reply With Quote
Old 01-14-2020, 04:08 PM   #29
pete6055
Enthusiast
pete6055 began at the beginning.
 
Posts: 48
Karma: 10
Join Date: Nov 2012
Device: none
Related question: Can keystroke combinations be added to Sigil clip editor?

Since restructure format to standard can be set in keyboard shortcuts, but a button might jog my sluggish memory better.
pete6055 is offline   Reply With Quote
Old 01-14-2020, 05:44 PM   #30
Doitsu
Wizard
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: 4,794
Karma: 16157045
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by pete6055 View Post
Related question: Can keystroke combinations be added to Sigil clip editor?
If you're referring to clips, you already can select keyboard shortcuts for the first 20 clips, which should be sufficient for most users. There's also a Clip Bar toolbar, which is hidden by default.
Doitsu is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing or Adding embedded MOBI cover Timboli Library Management 1 10-28-2018 04:45 AM
table of content file link not add in toc.ncx file bhambhu Conversion 0 01-14-2016 02:40 AM
Adding books with the same titles by replacing them alexthunder Library Management 2 07-09-2012 02:08 AM


All times are GMT -4. The time now is 11:36 AM.


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