MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Can't open epub file (https://www.mobileread.com/forums/showthread.php?t=340005)

jonesyb 06-14-2021 04:01 AM

Can't open epub file
 
I am just starting with using Sigil. I want to edit existing eBooks I had originally converted to epub files with Calibre.

When I open the epub it just opens with a blank page called "titlepage.xhtml" - I can't see the contents of the file I opened anywhere.

Sigil version of 1.5.1

I am using Mac OS High Sierra

I have been searching this forum for tutorials and similar problems but can't find anything so making a post.

Any ideas what I should do next?

Thank you very much :)

KevinH 06-14-2021 08:54 AM

You see no BookBrowser listing the xhtml files, the opf, etc?

Does this happen with just one epub or all of them?

Please try by Opening Digil directly and NOT using calibre's "open wit" feature.

Next try renaming your Sigil preferences "sigil.ini" file to "oldsigil.ini" and thentry launching Sigil again.

jonesyb 06-14-2021 12:31 PM

Quote:

Originally Posted by KevinH (Post 4130170)
You see no BookBrowser listing the xhtml files, the opf, etc?

Does this happen with just one epub or all of them?

Please try by Opening Digil directly and NOT using calibre's "open wit" feature.

Next try renaming your Sigil preferences "sigil.ini" file to "oldsigil.ini" and thentry launching Sigil again.

Yes all epub files.

Your last suggestion worked great thank you!

DiapDealer 06-14-2021 01:16 PM

It's unusual that a first time user would have a corrupt ini file, but whatever works! ;)

Turtle91 06-14-2021 05:45 PM

This may happen if you are trying to open DRM'd ePubs.

jonesyb 06-15-2021 08:16 AM

Quote:

Originally Posted by Turtle91 (Post 4130292)
This may happen if you are trying to open DRM'd ePubs.

I'm opening epubs that I have created myself. Basically my own books.

My process is, I code them by hand, then convert to epub with calibre. My next step is I want to remove the Calibre part of the process as want a deeper understanding of how to put a epub file is put together, without it being done for me.

jonesyb 06-15-2021 08:28 AM

Quote:

Originally Posted by DiapDealer (Post 4130232)
It's unusual that a first time user would have a corrupt ini file, but whatever works! ;)

Yes, definitely first time user. I have literally just installed Sigil and this happened.

odamizu 06-15-2021 02:28 PM

Quote:

Originally Posted by jonesyb (Post 4130443)
I'm opening epubs that I have created myself. Basically my own books.

My process is, I code them by hand, then convert to epub with calibre. My next step is I want to remove the Calibre part of the process as want a deeper understanding of how to put a epub file is put together, without it being done for me.

If your goal is to learn how to put together an epub and remove the Calibre part of the process, skip Calibre altogether and go straight to Sigil.

You can start with almost any type of file (html, txt, docx, etc.), import them into Sigil (using import plugins when necessary), then build your epub from there.

Download Sigil User Guide here: https://github.com/Sigil-Ebook/sigil...tag/2021.05.27

See Tutorial section in particular to learn how to put together an epub. The chapter "Prepare Your File For Sigil" discusses how to import various file formats into Sigil. There is also a "Manage Plugins" chapter that explains how to use plugins.

exaltedwombat 06-16-2021 08:16 AM

Anything more than a simple txt file will require conversion before Sigil can deal with it.

You can do this conversion in Calibre, or you can do it using one of the Import plugins available for use in Sigil.

But sure, if you write your book in un-formatted (apart from linefeeds) text and save as a TXT file you can drop it straight into Sigil and start learning about the subset of HTML markup that is EPUB.

You might learn more about this by looking at what Calibre (or one of the Sigil Inport plugins) creates and modifying it to your requirements. But that's your choice.

Notjohn 06-16-2021 11:42 AM

>skip Calibre altogether and go straight to Sigil.

My opinion also. I generally go from Word doc to clean html to Sigil.

jonesyb 06-16-2021 01:24 PM

Quote:

Originally Posted by odamizu (Post 4130535)
If your goal is to learn how to put together an epub and remove the Calibre part of the process, skip Calibre altogether and go straight to Sigil.

You can start with almost any type of file (html, txt, docx, etc.), import them into Sigil (using import plugins when necessary), then build your epub from there.

Download Sigil User Guide here: https://github.com/Sigil-Ebook/sigil...tag/2021.05.27

See Tutorial section in particular to learn how to put together an epub. The chapter "Prepare Your File For Sigil" discusses how to import various file formats into Sigil. There is also a "Manage Plugins" chapter that explains how to use plugins.

Thank you this is super helpful for me!

I will report back with how I get on.

jonesyb 06-16-2021 01:27 PM

Quote:

Originally Posted by Notjohn (Post 4130758)
>skip Calibre altogether and go straight to Sigil.

My opinion also. I generally go from Word doc to clean html to Sigil.

Thankyou. My current process is word doc, to html, to calibre. I do have a fairly OK ish understanding of how an epub is packaged together so I don't think it will be too much of a problem.

Thanks again

DiapDealer 06-16-2021 02:13 PM

Calibre does do a really good job of converting docx to epub for those who don't want to get their hands very dirty. There's some Sigil plugins that can get similar results, but there's still a good bit of twiddling and configuring to be done. Try them all (including calibre) and do whatever works best for you.

BetterRed 06-16-2021 07:30 PM

Quote:

Originally Posted by DiapDealer (Post 4130800)
Calibre does do a really good job of converting docx to epub for those who don't want to get their hands very dirty. There's some Sigil plugins that can get similar results, but there's still some a good bit of twiddling and configuring to be done. Try them all (including calibre) and do whatever works best for you.

:thumbsup:

I mainly use calibre's DOCX conversion, but if I want to preserve Word's Style inheritance tree I use your DOCX Input plugin.

I'll also put in a plug for ==>> Toxaris' eBook Tools MS Word add-in. It requires Word 2007 or later, and apart from creating ePubs it has several other useful features such as a Dialogue checker and an Embed linked images option.

BR

Tex2002ans 06-16-2021 11:57 PM

Or the great Styles/conversion discussion last year in "eBook formatting in Sigil".

jonesyb 06-17-2021 12:00 PM

Quote:

Originally Posted by odamizu (Post 4130535)
If your goal is to learn how to put together an epub and remove the Calibre part of the process, skip Calibre altogether and go straight to Sigil.

You can start with almost any type of file (html, txt, docx, etc.), import them into Sigil (using import plugins when necessary), then build your epub from there.

Download Sigil User Guide here: https://github.com/Sigil-Ebook/sigil...tag/2021.05.27

See Tutorial section in particular to learn how to put together an epub. The chapter "Prepare Your File For Sigil" discusses how to import various file formats into Sigil. There is also a "Manage Plugins" chapter that explains how to use plugins.

I just read the Sigil user guide. Awesome stuff thanks.

jonesyb 06-17-2021 12:11 PM

So now I have a better understanding of Sigil and how it works, I have a question.

Say I have a fully formatted html book in one html file (actually I do, this is not hypothetical). It includes a HTML TOC, and a decent sized appendix. Also all the CSS.

Is there a way of importing it and splitting it up in to sections without having to manually edit all the appendix links and TOC links etc?

I had a look through the plugins but I could not see anything.

Anyway I am just going to make a copy of a book to mess around with and see how I get on.

This question now is not on topic for the original thread I created. Should I create a new one or is it OK in here?

DiapDealer 06-17-2021 12:20 PM

Quote:

Originally Posted by jonesyb (Post 4131051)
Say I have a fully formatted html book in one html file (actually I do, this is not hypothetical). It includes a HTML TOC, and a decent sized appendix. Also all the CSS.

Is there a way of importing it and splitting it up in to sections without having to manually edit all the appendix links and TOC links etc?

Yes.

Quote:

Originally Posted by jonesyb (Post 4131051)
I had a look through the plugins but I could not see anything.

It's inherent to Sigil itself. No need to use plugins.

If you use Add File to add your existing html to a blank epub, it will pull in the css file as well (as long as the link to it is valid). After that, it's a matter of using the built in Split feature and adding the ToC semantic. Add File(s)/Splitting/Merging and adding semantics are things that are documented in the user guide.

But yes: feel free to start a new thread if you want some assistance in using these various Sigil features.

jonesyb 06-17-2021 12:30 PM

Quote:

Originally Posted by DiapDealer (Post 4131056)
Yes.


It's inherent to Sigil itself. No need to use plugins.

If you use Add File to add your existing html to a blank epub, it will pull in the css file as well (as long as the link to it is valid). After that, it's a matter if using the built in Split feature and adding the ToC semantic. Add File(s)/Splitting/Merging and adding semantics are things that are documented in the user guide.


Thank you! Fully appreciated. I will crack on and see what happens.

jonesyb 06-17-2021 03:33 PM

Well that was an easy process. I have completed my mission.

Thank you for all your help everyone.

odamizu 06-17-2021 07:44 PM

Quote:

Originally Posted by jonesyb (Post 4131123)
Well that was an easy process. I have completed my mission.

Thank you for all your help everyone.

:thumbsup:

@DiapDealer — now that the User Guide has been updated for 1.6.0+, would you consider putting a link to the User Guide in the Links section of the Sigil GitHub page, perhaps before or after the link to the MobileRead? Also maybe highlight the User Guide more prominently on the Sigil website Documentation page?

DiapDealer 06-17-2021 07:59 PM

Quote:

Originally Posted by odamizu (Post 4131183)
:thumbsup:

@DiapDealer — now that the User Guide has been updated for 1.6.0+, would you consider putting a link to the User Guide in the Links section of the Sigil GitHub page, perhaps before or after the link to the MobileRead? Also maybe highlight the User Guide more prominently on the Sigil website Documentation page?

Sure. It's in the important links section of the Sigil github wiki, but I can add a link to the main readme if you think it will help.

But what would you suggest for making it more prominent on the documentation page? The link is already there. In my experience, it's not a problem of the link not standing out. The problem is they simply don't read the documentation page. Or any of the pages, really. For a large portion of the people who can't find the user guide, I've found that it's typically because the darn thing simply refuses to fall out of the sky and into their laps. ;)

odamizu 06-18-2021 12:51 AM

Quote:

Originally Posted by DiapDealer (Post 4131185)
Sure. It's in the important links section of the Sigil github wiki, but I can add a link to the main readme if you think it will help.

But what would you suggest for making it more prominent on the documentation page? The link is already there. In my experience, it's not a problem of the link not standing out. The problem is they simply don't read the documentation page. Or any of the pages, really. For a large portion of the people who can't find the user guide, I've found that it's typically because the darn thing simply refuses to fall out of the sky and into their laps. ;)

Ha! I didn't even remember there was a Wiki! :)

Anyway, when I went searching for a link to the User Guide for jonesyb, it took a lot of clicking for me to find it, whereas links to MobileRead were prominently posted everywhere, which is why I think people come here first and don't even realize there is a User Guide. If a link to the User Guide were posted wherever there is a link to MobileRead, more people might try the User Guide first (if that's even your goal).

For the Documentation page, if you want people to check the User Guide before asking on MobileRead, I suggest making that the first paragraph rather than the last. As it is, the first paragraph says: "Please consider the Sigil User Forums at Mobileread to be the primary resource for getting help with your Sigil questions." If I read that, I'd stop reading right there and click the Mobileread link, never making it to the last paragraph.

Also, you might attach a link to "Sigil User Guide" so that it's highlighted and clickable and make it capitalized and bold. That would make it more noticeable.

Code:

<p>The latest release of the <a href="https://github.com/Sigil-Ebook/sigil-user-guide/releases/latest"><strong>Sigil User Guide</strong></a> can always be found <a href="https://github.com/Sigil-Ebook/sigil-user-guide/releases/latest">in its own repository</a> (in EPUB format), as well as in the <a href="https://github.com/Sigil-Ebook/Sigil/tree/master/docs">docs directory</a> of the source tree.</p>

DNSB 06-18-2021 12:56 AM

Quote:

Originally Posted by DiapDealer (Post 4131185)
Or any of the pages, really. For a large portion of the people who can't find the user guide, I've found that it's typically because the darn thing simply refuses to fall out of the sky and into their laps. ;)

<sarcasm>What? The installer does not install the user guide and automatically open it after the install? What kind of user hostile software are you creating?</sarcasm>

hobnail 06-18-2021 01:11 AM

Quote:

Originally Posted by jonesyb (Post 4131051)
Is there a way of importing it and splitting it up in to sections without having to manually edit all the appendix links and TOC links etc?

If you're consistent with your chapter titles, for example, I use h2 tags for chapter titles then you can use Sigil's insert split marker (ctl+shift+return) to have as a copy of what you're going to replace/change to. E.g., insert it just after the body line. Select the entire line with the split marker, ctl+x to cut it, then go down to the search and replace and put it in the Replace: box at the bottom. Above it in the Find: box put <h2, then in the Replace: box add that same <h2 at the end of the Replace: box. So then when you do replace all, all of the <h2s become split markers with an <h2 at the end of their line (or maybe on the next line). You can then use Mend and Prettify to add in line breaks after the split markers. Then do Split at Markers (f6). If you get it right you can have the .xhtml file names match the chapter numbers.

Tex2002ans 06-18-2021 02:08 AM

Quote:

Originally Posted by DNSB (Post 4131219)
<sarcasm>What? The installer does not install the user guide and automatically open it after the install? What kind of user hostile software are you creating?</sarcasm>

What? You mean the thing you're supposed to immediately click through as fast as possible and X right out of? :D

Quote:

Originally Posted by hobnail (Post 4131223)
If you're consistent with your chapter titles, for example, I use h2 tags for chapter titles then you can use Sigil's insert split marker (ctl+shift+return) to have as a copy of what you're going to replace/change to.

:thumbsup:

Insert > Split Marker (Ctrl+Shift+Enter) places this code within your EPUB:

Code:

<hr class="sigil_split_marker" />
then pressing Edit > Split At Markers (F6) splits the HTML files wherever that code is placed.

Or, like you mentioned, this can be done on a mass scale by using Search/Replace:

Search: <h2
Replace: <hr class="sigil_split_marker" /><h2

This looks for all "<h2" (or whatever else you use for chapter titles), then a simple F6 splits your entire book in one shot. :)

* * *

Example Code:

Original:

Code:

<p>Dedicated to jonesyb</p>

<h2>Chapter 1</h2>
<p>It was a dark and stormy night.</p>
<h2>Chapter 2</h2>
<p>I woke up in bed.</p>

After S&R (or manually placing splits):

Code:

<p>Dedicated to jonesyb</p>

<hr class="sigil_split_marker" /><h2>Chapter 1</h2>
<p>It was a dark and stormy night.</p>
<hr class="sigil_split_marker" /><h2>Chapter 2</h2>
<p>I woke up in bed.</p>

After F6:

Code:

<p>Dedicated to jonesyb</p>
Code:

<h2>Chapter 1</h2>
<p>It was a dark and stormy night.</p>

Code:

<h2>Chapter 2</h2>
<p>I woke up in bed.</p>


jonesyb 06-18-2021 02:09 AM

Quote:

Originally Posted by DiapDealer (Post 4131185)
For a large portion of the people who can't find the user guide, I've found that it's typically because the darn thing simply refuses to fall out of the sky and into their laps. ;)

maybe this is...erm... is directed at me here.

OK I admit, I can not remember how hard I looked for a user guide.

In fact, or at all. I am not very familiar with github at all. I am not sure it even crossed my mind. My idea was to just open sigil and use it. Or something like that.

But thank you. It has been fun learning this new software. I really like it.

jonesyb 06-18-2021 02:12 AM

Quote:

Originally Posted by hobnail (Post 4131223)
If you're consistent with your chapter titles, for example, I use h2 tags for chapter titles then you can use Sigil's insert split marker (ctl+shift+return) to have as a copy of what you're going to replace/change to. E.g., insert it just after the body line. Select the entire line with the split marker, ctl+x to cut it, then go down to the search and replace and put it in the Replace: box at the bottom. Above it in the Find: box put <h2, then in the Replace: box add that same <h2 at the end of the Replace: box. So then when you do replace all, all of the <h2s become split markers with an <h2 at the end of their line (or maybe on the next line). You can then use Mend and Prettify to add in line breaks after the split markers. Then do Split at Markers (f6). If you get it right you can have the .xhtml file names match the chapter numbers.

I also use h2s for my chapters and this would work nicely. Thanks for the tip.

jonesyb 06-18-2021 02:12 AM

Quote:

Originally Posted by Tex2002ans (Post 4131229)
What? You mean the thing you're supposed to immediately click through as fast as possible and X right out of? :D



:thumbsup:

Insert > Split Marker (Ctrl+Shift+Enter) places this code within your EPUB:

Code:

<hr class="sigil_split_marker" />
then pressing Edit > Split At Markers (F6) splits the HTML files wherever that code is placed.

Or, like you mentioned, this can be done on a mass scale by using Search/Replace:

Search: <h2
Replace: <hr class="sigil_split_marker" /><h2

This looks for all "<h2" (or whatever else you use for chapter titles), then a simple F6 splits your entire book in one shot. :)

This is super useful, thank you!

jonesyb 06-18-2021 02:13 AM

I converted my first book yesterday using Sigil. It and it worked great. Now I am going to go back and do all the rest of them and see what else I can learn along the way.

Thanks again

Tex2002ans 06-18-2021 02:14 AM

Quote:

Originally Posted by jonesyb (Post 4131232)
This is super useful, thank you!

Wow, that was fast. I was in the middle of editing and didn't expect a response.

I inserted a tiny bit of extra clarification at the end too. :)

PS. There's also a little "Multi-Quote" button in the bottom right corner of posts.

Instead of posting 3 separate responses within minutes, you can use that button to QUOTE multiple posts in a single one. :)

jonesyb 06-18-2021 02:49 AM

Quote:

Originally Posted by Tex2002ans (Post 4131234)
Wow, that was fast. I was in the middle of editing and didn't expect a response.

I inserted a tiny bit of extra clarification at the end too. :)

PS. There's also a little "Multi-Quote" button in the bottom right corner of posts.

Instead of posting 3 separate responses within minutes, you can use that button to QUOTE multiple posts in a single one. :)

Also just read your clarification. Thank you!

OK noted about multi quote responses.

DiapDealer 06-18-2021 07:38 AM

Quote:

Originally Posted by jonesyb (Post 4131230)
maybe this is...erm... is directed at me here.

Not specifically, but perhaps generally. ;)

You sought help in the Sigil user forums and were directed to the user guide along the way. And you were amenable to using it. That's a good outcome in my opinion.


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

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