Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 04-21-2017, 11:24 PM   #1
teh603
Autism Spectrum Disorder
teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.
 
teh603's Avatar
 
Posts: 1,212
Karma: 6244877
Join Date: Sep 2011
Location: Coastal Texas
Device: Android Phone
Multiple Text File Problem

I'm having a bit of a problem with Sigil and my writing style. I write in .txt, with each chapter being a separate file. Chapter 001.txt, Chapter 002.txt, and so forth.

When I try the Calibre trick (zipping the files, converting them to an ePUB with Calibre, and then opening the resulting file in Sigil) has gotten me inconsistent results. Calibre seems to only convert what it thinks is the first chapter, and then purges the rest.

I tried the OO import plugin, but it had some stylesheet problems.

Anyone got a solution? Preferably an elegant one?
teh603 is offline   Reply With Quote
Old 04-22-2017, 02:29 AM   #2
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 teh603 View Post
When I try the Calibre trick (zipping the files, converting them to an ePUB with Calibre, and then opening the resulting file in Sigil) has gotten me inconsistent results. Calibre seems to only convert what it thinks is the first chapter, and then purges the rest.
This seems like a Calibre "issue" and doesn't really have anything to do with Sigil.

Quote:
Originally Posted by teh603 View Post
I write in .txt, with each chapter being a separate file. Chapter 001.txt, Chapter 002.txt, and so forth.

Anyone got a solution? Preferably an elegant one?
A:

Concatenate all of your text files into a single one using the commandline:

http://www.wikihow.com/Merge-Text-(....Command-Prompt

then convert that using Calibre?

B:

Use Calibre to batch convert each text file to EPUBs, then use the EPUB Merge plugin?

https://www.mobileread.com/forums/sh...d.php?t=169744

That will merge your Chapter 001 EPUB + Chapter 002 EPUB + [...] together into one.

C:

If using Microsoft Word, there is Import > Object > Text from File:

https://support.office.com/en-us/art...f-3d8b585e03f1

Then save as whatever format (DOCX) and have Calibre convert it for you.

Quote:
Originally Posted by teh603 View Post
I tried the OO import plugin, but it had some stylesheet problems.
Stylesheet? Aren't your input files just plain text files? What stylesheet are you talking about?

And since you know your input was plain text, you could just throw out all useless HTML and get yourself back down to this with some Search/Replace:

Code:
<p>Paragraph 1.</p>
<p>Paragraph 2.</p>

Last edited by Tex2002ans; 04-22-2017 at 02:36 AM.
Tex2002ans is offline   Reply With Quote
Advert
Old 04-22-2017, 03:42 AM   #3
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,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
In addition to Tex2002ans's excellent suggestions, you might want to also consider one of the following options:

1. Use a dedicated authoring tool for fiction writers, e.g., Scrivener, which allows you to generate epub and Kindle books.

2. Use an epub editor for users without HTML/CSS skills, e.g. Jutoh or Atlantis Word Processor.

3. If you're not afraid of using the terminal/command line, check out pandoc, which will convert markdown text files to epub files (and many other file formats).
Doitsu is offline   Reply With Quote
Old 04-22-2017, 05:47 AM   #4
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@teh603 - I'm assuming you use Windows.

For simplicity I would opt for Tex2002ans' option A.

But rather than using the command line I would probably use this gadget - TXTcollector - Text file merging tool

BR
BetterRed is offline   Reply With Quote
Old 04-22-2017, 06:29 AM   #5
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
Quote:
Originally Posted by teh603 View Post
Anyone got a solution? Preferably an elegant one?
Not elegant, to be sure, but why don't you just open Sigil in Book View and paste your first chapter into it? Then switch to Code View and get rid of the non-breaking spaces ( &nbsp; ) that Sigil puts in.

Now add your style sheet and link to it, something like this, before the <body> tag:

<head>
<title>Your Book Title Here</title>
<link href="../Styles/epub.css" rel="stylesheet" type="text/css"/>
</head>

Now create a new file by placing your mouse cursor after the last character in the file and clicking on the Split at Cursor icon in the second menu line. The new file will contain the <head> tag you created above.

Und so weiter through the book.
Notjohn is offline   Reply With Quote
Advert
Old 04-22-2017, 09:07 AM   #6
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
Quote:
Originally Posted by Notjohn View Post
Then switch to Code View and get rid of the non-breaking spaces ( &nbsp; ) that Sigil puts in.
That WHO puts in?
I've copied tons of plain text into Book View with no &nbsp;s being put in.
DiapDealer is offline   Reply With Quote
Old 04-22-2017, 09:39 AM   #7
teh603
Autism Spectrum Disorder
teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.
 
teh603's Avatar
 
Posts: 1,212
Karma: 6244877
Join Date: Sep 2011
Location: Coastal Texas
Device: Android Phone
Quote:
Originally Posted by BetterRed View Post
@teh603 - I'm assuming you use Windows.
MacOS, actually.

The reason I'm asking here is because several years ago, I remember being able to convert .txt files to .xhtml within Sigil, but I can't seem to figure out how to do it anymore.

Doitsu- I tend to prefer writing in .txt because "actual" word processors can have up to a full second of lag between when I start typing, and the keystrokes actually showing up on the screen. That's why I haven't been trying harder to fix the OO/LO plugin.

Last edited by teh603; 04-22-2017 at 09:45 AM.
teh603 is offline   Reply With Quote
Old 04-22-2017, 11:03 AM   #8
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: 29,781
Karma: 54830978
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 teh603 View Post
MacOS, actually.

The reason I'm asking here is because several years ago, I remember being able to convert .txt files to .xhtml within Sigil, but I can't seem to figure out how to do it anymore.

Doitsu- I tend to prefer writing in .txt because "actual" word processors can have up to a full second of lag between when I start typing, and the keystrokes actually showing up on the screen. That's why I haven't been trying harder to fix the OO/LO plugin.
Get a PC

Seriously: There is something odd going on with your setup.
Are you using a Wireless Keyboard?
Do you have other things (media player) running in background (VLC is playing music as I type this)

Or are you just one of those OMG fast typists
theducks is online now   Reply With Quote
Old 04-22-2017, 11:32 AM   #9
teh603
Autism Spectrum Disorder
teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.
 
teh603's Avatar
 
Posts: 1,212
Karma: 6244877
Join Date: Sep 2011
Location: Coastal Texas
Device: Android Phone
I'm an OMG fast typist. My fiancee won't allow me to have a mechanical keyboard because I make enough noise on a regular one. And on pretty much every system I've had, OO/LO has noticeable typing lag.

That having been said, I also haven't tried "serious" writing in OO/LO since before I upgraded to 8 gigs of RAM, so it could be less of an issue now.
teh603 is offline   Reply With Quote
Old 04-22-2017, 12:36 PM   #10
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,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by teh603 View Post
I'm an OMG fast typist. My fiancee won't allow me to have a mechanical keyboard because I make enough noise on a regular one. And on pretty much every system I've had, OO/LO has noticeable typing lag.
AFAIK, there are lots of distraction-free editors for macOS with Markdown support and Markdown files can be easily converted to epubs with pandoc and calibre.
Doitsu is offline   Reply With Quote
Old 04-22-2017, 01:32 PM   #11
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,635
Karma: 5433388
Join Date: Nov 2009
Device: many
Have you tried Sigil's "Add Existing Files" (right click in FileBrowser) and then change the Filter to "All Files" and then muli-select the text files.

Does that work?
KevinH is offline   Reply With Quote
Old 04-22-2017, 01:38 PM   #12
teh603
Autism Spectrum Disorder
teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.
 
teh603's Avatar
 
Posts: 1,212
Karma: 6244877
Join Date: Sep 2011
Location: Coastal Texas
Device: Android Phone
Quote:
Originally Posted by KevinH View Post
Have you tried Sigil's "Add Existing Files" (right click in FileBrowser) and then change the Filter to "All Files" and then muli-select the text files.

Does that work?
It imports them successfully, but they go into the Misc folder. Even when I move them into the correct folder, I can't find an obvious way to convert them to .xhtml.

I guess this is where a plugin would be nice, but I haven't written functional code since the Apple II was still a thing.
teh603 is offline   Reply With Quote
Old 04-22-2017, 05:59 PM   #13
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by teh603 View Post
MacOS, actually.
The scarcity of 'gadgets' like TXTCollector is one of the main reasons I would never buy an Apple Mac.

BR
BetterRed is offline   Reply With Quote
Old 04-22-2017, 06:08 PM   #14
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,635
Karma: 5433388
Join Date: Nov 2009
Device: many
OSX is a full BSD unix,

cd YOURFOLDER
cat *.txt > ../combined.txt

Will concatinate the files in file name sort order. If you want a different order you can do things one by one as well.
KevinH is offline   Reply With Quote
Old 04-23-2017, 12:27 AM   #15
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 Notjohn View Post
Not elegant, to be sure, but why don't you just open Sigil in Book View and paste your first chapter into it?
Indeed, that is also one of the helpful uses of Book View.

You could either copy/paste one chapter at a time, or concatenate and paste the entire text file into Book View. That should get you the very basic <p> tags, then you could work from there.

Quote:
Originally Posted by teh603 View Post
Doitsu- I tend to prefer writing in .txt because "actual" word processors can have up to a full second of lag between when I start typing, and the keystrokes actually showing up on the screen. That's why I haven't been trying harder to fix the OO/LO plugin.
It definitely isn't normal to have such a delay between keystrokes. Do you have a wireless keyboard? Does it happen in any other programs?

And which plugin are you talking about exactly?

Quote:
Originally Posted by teh603 View Post
I'm an OMG fast typist. My fiancee won't allow me to have a mechanical keyboard because I make enough noise on a regular one.
Mechanical keyboards can be quiet. Just avoid getting the super loud clicky ones (like MX Blues)!

https://www.reddit.com/r/MechanicalK...oard_overviews

Your fingers will thank you!

Quote:
Originally Posted by BetterRed View Post
The scarcity of 'gadgets' like TXTCollector is one of the main reasons I would never buy an Apple Mac.
There are plenty of tools for all OSes. And you can always find ways to run other tools if needed (like using Wine in Linux to run a ton of Windows stuff).

Quote:
Originally Posted by DiapDealer View Post
That WHO puts in?
I've copied tons of plain text into Book View with no &nbsp;s being put in.
Could be because of the initial &nbsp; in a blank document:

Code:
<body>
<p>&nbsp;</p>
</body>
When I copy/pasted this post from Notepad++ into Book View, it kept it:

Code:
<p>&nbsp;blahblahblah</p>
but one of the first steps I ever do when I work on a book is convert any and all &nbsp; -> normal spaces.

Last edited by Tex2002ans; 04-23-2017 at 12:30 AM.
Tex2002ans is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I made my .opf file w/ Text Wranger; could that be a problem? petercrowell Kindle Formats 14 05-02-2012 04:00 PM
diff & automerge multiple text files SBT Workshop 3 04-25-2012 10:47 AM
Converting multiple text files to xhtml? Spotnik Sigil 19 04-12-2011 10:37 PM
Convert zip with multiple text files to MOBI mindfire Calibre 1 03-27-2010 10:19 AM
How best to handle multiple edits to original text KAM Calibre 2 02-08-2009 11:09 AM


All times are GMT -4. The time now is 01:17 PM.


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