Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-02-2010, 04:10 PM   #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,644
Karma: 5433388
Join Date: Nov 2009
Device: many
inserting chapter breaks in codeview

Hi Valloric,

I used to be able to insert one chapter break in a big html file and then switch to codeview and copy the sigil chapter break div and then use find and replace to quickly insert a chapterbreak right before every Chapter start.

I can't seem to figure out how to do that since there is no way to "see" what format the chapter break actually takes since as soon as you insert one in book view the new chapter is split off.

I also used the sigil chapter break divs in my xpml2xhtml.py code (converts pml to xhtml) so that upon loading the new html the chapter breaks were all in place for me. This really sped up conversion of the book to an epub.

Is there some code I can insert inside the single large html files I have, that would make Sigil split the file at that point as it loads it? If not, is there a way to do the splitting via a find&replace in codeview?

Thanks,

KevinH


ps. very nice work! I am having fun with the beta release already!
KevinH is offline   Reply With Quote
Old 03-02-2010, 04:10 PM   #17
polyfragmentiert
Groupie
polyfragmentiert can read faster than his screen refreshespolyfragmentiert can read faster than his screen refreshespolyfragmentiert can read faster than his screen refreshespolyfragmentiert can read faster than his screen refreshespolyfragmentiert can read faster than his screen refreshespolyfragmentiert can read faster than his screen refreshespolyfragmentiert can read faster than his screen refreshespolyfragmentiert can read faster than his screen refreshespolyfragmentiert can read faster than his screen refreshespolyfragmentiert can read faster than his screen refreshespolyfragmentiert can read faster than his screen refreshes
 
polyfragmentiert's Avatar
 
Posts: 181
Karma: 14258
Join Date: Oct 2009
Location: Kiel, Germany
Device: SONY PRS-T1, bald tolino vision 3 HD
Quote:
Originally Posted by Valloric View Post
Run these commands and report back:
Code:
cd /opt/sigil
LD_LIBRARY_PATH=$PWD
./sigil
Same result as before. Thanks for bearing with me on this!
polyfragmentiert is offline   Reply With Quote
Advert
Old 03-02-2010, 04:14 PM   #18
paulpeer
Zealot
paulpeer is on a distinguished road
 
paulpeer's Avatar
 
Posts: 147
Karma: 56
Join Date: Dec 2009
Location: Antwerpen
Device: iPhone, Sony PRS-505, EPUBreader
Great improvement. Thanks! One minor problem: If you're working in code view, and open a new chapter, this always opens in book view. As I always work in code view, this is rather annoying.
paulpeer is offline   Reply With Quote
Old 03-02-2010, 04:30 PM   #19
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,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Hi Valloric,

A quick question:

If I click on an internal link, the right chapter tab pops up perfectly. However, in the bookview at the left of the screen, it still shows the old location (before following the link).

Is this a feature so that I can copy something from here and simply return to where I was before following the link to edit/paste something, or should the book view on the left be updated to follow the link as well?

If a buglet, do you want me to open an official report?

Thanks,

KevinH
KevinH is offline   Reply With Quote
Old 03-02-2010, 04:41 PM   #20
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by KevinH View Post
Is there some code I can insert inside the single large html files I have, that would make Sigil split the file at that point as it loads it? If not, is there a way to do the splitting via a find&replace in codeview?
Not anymore, no. The chapter break inserting actual code in the book was an ugly hack (which you apparently put to good use), so 0.2.0 uses JavaScript to read all relevant content (starting from the caret element) and create a new chapter. Nothing is being inserted anymore.

But there should be a way to do the split from the Code View. Add it to the tracker.

Quote:
Originally Posted by polyfragmentiert View Post
Same result as before. Thanks for bearing with me on this!
I just got this to replicate. I'll provide you with more information when I have it.

Quote:
Originally Posted by paulpeer View Post
Great improvement. Thanks! One minor problem: If you're working in code view, and open a new chapter, this always opens in book view. As I always work in code view, this is rather annoying.
This will have to wait until an options screen is created where you'll be able to set which View do you prefer as the default one. Sometime after 0.2.1. But soon.
Valloric is offline   Reply With Quote
Advert
Old 03-02-2010, 04:45 PM   #21
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by KevinH View Post
If I click on an internal link, the right chapter tab pops up perfectly. However, in the bookview at the left of the screen, it still shows the old location (before following the link).

Is this a feature so that I can copy something from here and simply return to where I was before following the link to edit/paste something, or should the book view on the left be updated to follow the link as well?
I'm not following, sorry. What do you mean by "left" Book View? The original tab with the link? And by internal link, do you mean internal to the book or to the chapter?
Valloric is offline   Reply With Quote
Old 03-02-2010, 04:48 PM   #22
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,827
Karma: 921169
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
Quote:
Originally Posted by Valloric View Post
Not anymore, no. The chapter break inserting actual code in the book was an ugly hack (which you apparently put to good use), so 0.2.0 uses JavaScript to read all relevant content (starting from the caret element) and create a new chapter. Nothing is being inserted anymore.

But there should be a way to do the split from the Code View. Add it to the tracker.
i put that code to the same good use. i'll also be very happy to see some way of automating chapter splits in Sigil 0.2. maybe something as simple as adding "file split" to a "special" list of elements you can use in the s&r dialogue, and replace all occurences of "<h3" (or whatever h you're using for your chapters) with "filesplit <h3". that would be great.
zelda_pinwheel is offline   Reply With Quote
Old 03-02-2010, 04:55 PM   #23
paulpeer
Zealot
paulpeer is on a distinguished road
 
paulpeer's Avatar
 
Posts: 147
Karma: 56
Join Date: Dec 2009
Location: Antwerpen
Device: iPhone, Sony PRS-505, EPUBreader
Is there a way to search, or search and replace, in the whole book? It seems to work only in one chapter at a time ...
paulpeer is offline   Reply With Quote
Old 03-02-2010, 05:02 PM   #24
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,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by Valloric View Post
I'm not following, sorry. What do you mean by "left" Book View? The original tab with the link? And by internal link, do you mean internal to the book or to the chapter?
Hi,

Yes, I am not being very clear am I? On the left side of my screen is a sidebar which is called "Book Browser" (not book view, as I called it). Across the top is a set of tabs for each file/chapter.

If I click on an internal link that jumps to another chapter of the book. The set of tabs across the top automatically brings the destination tab to the front, ready to work with it. The highlighted chapter in Book Browser on the left sidebar stays with the old chapter (where the original link was I followed) and does not update.

I was unsure if this was a bug or a feature and wanted to know if you wanted me to open a bug report on this behaviour or not.

Thanks,

KevinH
KevinH is offline   Reply With Quote
Old 03-02-2010, 05:02 PM   #25
plazec
Member
plazec doesn't litterplazec doesn't litter
 
plazec's Avatar
 
Posts: 22
Karma: 166
Join Date: Dec 2007
Location: Czech Republic, Sedlice
Device: Cybook Gen 3, HTC Desire
Valloric: Thanks! Great piece of software! Speed Issues are gone so I can use Sigil finally

Things I noticed so far:

- There is no simple way to merge two chapters... no undo button after accidental pagebreak

- How is splitview intended to work? For example when code window is active pressing pagedown key moves book window. Are positions in code and book window independent when using splitview?

and finally book browser - I'd like to set active tab on single click on its name in list rather than with doubleclick.

Last edited by plazec; 03-02-2010 at 05:16 PM.
plazec is offline   Reply With Quote
Old 03-02-2010, 05:03 PM   #26
bobcdy
Fanatic
bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.
 
bobcdy's Avatar
 
Posts: 527
Karma: 1048576
Join Date: May 2009
Device: bebook; prs-950; nook simple touch; HTC Jetstream tablet
Usually when starting with a Project Gutenberg text file, I open it with Word 2003, correct spelling, etc., enter the html tags, and save it as a utf-8 text. I then open it with Notepad++ and save it as an html file. Finally, I open it with Sigil 0.1.9 and save as epub. Sigil has automatically split all the chapters for the epub so when I open it with Sigil 0.2.0 all the files are present.

If I open the html file with Sigil 0.2.0 then save it as epub, when I close and reopen it, the html file has not be split into chapters, style sheets, etc. and the html file is the only file present. It is not a proper epub, and on reopening it with Sigil 0.1.9 I find that the styles have been deleted. With Sigil 0.2.0 I must somehow split the file into chapters, style sheet, images, etc. - but how do I do this? How do I even know what files are necessary?

As a dedicated Sigil 0.1.9 user, it appears on first use that Sigil has lost the advantage it had with the simple interface of the previous version, and now there is only a small advantage to using Sigil compared to simply starting from scratch with an html file, splitting it manually into the proper files, and zipping the final result.
bobcdy is offline   Reply With Quote
Old 03-02-2010, 05:09 PM   #27
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by zelda_pinwheel View Post
i put that code to the same good use.
I just thought of a way: create an SGF. SGF is just an epub with one large XHTML file with the chapter break code instead of many different chapters.

So...
  1. Extract any SGF file.
  2. Replace the content of the sole XHTML file inside the OEBPS folder with any HTML content you wish.
  3. [optional] Edit the OPF file with any metadata or whatever.
  4. Zip the OEBPS and META-INF folders into a ZIP archive, changing the extension to SGF. Don't bother with the "mimetype" file, Sigil doesn't care.
  5. Open in 0.2.0.
  6. ...
  7. Profit!
If you have any images, you can add those to the SGF directly (don't forget to list them in the OPF), or you could just add them in the Book Browser.

That's the best I have for you now.
Valloric is offline   Reply With Quote
Old 03-02-2010, 05:13 PM   #28
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,827
Karma: 921169
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
Quote:
Originally Posted by Valloric View Post
I just thought of a way: create an SGF. SGF is just an epub with one large XHTML file with the chapter break code instead of many different chapters.

So...
  1. Extract any SGF file.
  2. Replace the content of the sole XHTML file inside the OEBPS folder with any HTML content you wish.
  3. [optional] Edit the OPF file with any metadata or whatever.
  4. Zip the OEBPS and META-INF folders into a ZIP archive, changing the extension to SGF. Don't bother with the "mimetype" file, Sigil doesn't care.
  5. Open in 0.2.0.
  6. ...
  7. Profit!
If you have any images, you can add those to the SGF directly (don't forget to list them in the OPF), or you could just add them in the Book Browser.

That's the best I have for you now.
i will keep that in mind. thanks for the solution.
zelda_pinwheel is offline   Reply With Quote
Old 03-02-2010, 05:14 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,644
Karma: 5433388
Join Date: Nov 2009
Device: many
> But there should be a way to do the split from the Code View. Add it to the tracker.

Done as an enhancement request: Issue 262

http://code.google.com/p/sigil/issues/detail?id=262

Thanks!

KevinH
KevinH is offline   Reply With Quote
Old 03-02-2010, 05:28 PM   #30
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by bobcdy View Post
Usually when starting with a Project Gutenberg text file, I open it with Word 2003, correct spelling, etc., enter the html tags, and save it as a utf-8 text. I then open it with Notepad++ and save it as an html file. Finally, I open it with Sigil 0.1.9 and save as epub. Sigil has automatically split all the chapters for the epub so when I open it with Sigil 0.2.0 all the files are present.
You seem to be using Sigil as an automatic converter. That's not the intended use case.

Also, Sigil would never split the HTML file automatically.

Quote:
Originally Posted by bobcdy View Post
If I open the html file with Sigil 0.2.0 then save it as epub, when I close and reopen it, the html file has not be split into chapters, style sheets, etc. and the html file is the only file present. It is not a proper epub, and on reopening it with Sigil 0.1.9 I find that the styles have been deleted. With Sigil 0.2.0 I must somehow split the file into chapters, style sheet, images, etc. - but how do I do this? How do I even know what files are necessary?
What do you mean by "the styles have been deleted"? And if your HTML file references images or stylesheets, those should have been picked up on import, even in 0.2.0. If they haven't, that's a bug report.

Quote:
Originally Posted by bobcdy View Post
As a dedicated Sigil 0.1.9 user, it appears on first use that Sigil has lost the advantage it had with the simple interface of the previous version, and now there is only a small advantage to using Sigil compared to simply starting from scratch with an html file, splitting it manually into the proper files, and zipping the final result.
I'm sorry you feel that way. I've gotten the message that the users want a way to split chapters using only the Code View, and this should make things easier for you.
Valloric is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sigil 0.2.4 Valloric Sigil 16 09-09-2010 11:04 AM
sigil 0.2.0 bobcdy Sigil 16 03-09-2010 08:31 AM
Sigil v0.1.9 Valloric Sigil 10 02-18-2010 04:00 PM
Sigil v0.1.2 Valloric Sigil 52 08-18-2009 03:15 AM
calibre 0.6 betas now available kovidgoyal Calibre 665 07-24-2009 11:11 PM


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


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