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-19-2021, 08:38 PM   #1
ayranism
Junior Member
ayranism began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2021
Device: sigil, calibre, erareader
I need help!

Hey, newbie here

So I have been trying to edit this epub on sigil but I'm having trouble with one thing...

So basically I have my "style" setteled down but on each paragraph so that's not a problem but i gotta do this "<p> ... </p>" by hand everytime and if you consider that there is over 5000 paragraphs its quite the hussle to do each one of them by hand



Can I automize this whole process?
ayranism is offline   Reply With Quote
Old 03-20-2021, 04:57 AM   #2
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,812
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
It is called a (linked) 'stylesheet'

p{ your style stuff here }


What that says is apply that to ALL 'p' tags

Now this is real basic and you will probably want more, but get OUT of the habit of inline style="blahblah' coding.
You will end up with a nightmare if you want to change, whereas there is ONE place to make a change with a stylesheet.
Take a ebook you like and look at the stylesheet
click once on the tag for a paragraph, then right click: Go to link or style.
Sigil will normally take you right there
theducks is offline   Reply With Quote
Advert
Old 03-20-2021, 06:09 AM   #3
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,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Sigil itself is not really the tool to help you take plain text and turn it into html (though there might be some plugins to help in that regard). Sigil is most commonly used to take html exported from another source and use it to create an epub (though I understand some have some success pasting small amounts of rich text into Sigil's Code View). But if I understand you correctly, Sigil's not really the right tool to help you wrap 5000 paragraphs of plain text with individual p tags.
DiapDealer is offline   Reply With Quote
Old 03-20-2021, 08:27 AM   #4
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,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by ayranism View Post
but i gotta do this "<p> ... </p>" by hand everytime and if you consider that there is over 5000 paragraphs its quite the hussle to do each one of them by hand
You can convert your txt files with Calibre to epub files. You might have to experiment with the conversion settings, though.

BTW, Calibre will automatically convert:

Spoiler:
Code:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ac tellus nunc. Phasellus imperdiet leo metus, et gravida lacus. Donec metus ligula, elementum at pellentesque pellentesque, suscipit ac nunc. Etiam lobortis, massa ac aliquam auctor, augue nisl sagittis urna, at dapibus tellus erat ullamcorper ligula.

Donec tellus augue, tempus sed facilisis sed, fringilla quis leo. Mauris vulputate, leo ac facilisis vulputate, enim orci interdum augue, in blandit quam turpis quis dui. Morbi dictum luctus velit nec faucibus. Cras vitae tortor purus, ut tincidunt mauris. Sed at velit nisl. 

Donec eu mauris tortor, interdum condimentum erat. Nam egestas turpis eget nibh laoreet pharetra. Suspendisse a sem eros, ut pulvinar enim. In sed elit eu nulla accumsan tincidunt eget sit amet ipsum. Nullam ut massa rutrum dolor placerat tempor accumsan eget purus.


to:

Spoiler:
Code:
  <p class="calibre1">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ac tellus nunc. Phasellus imperdiet leo metus, et gravida lacus. Donec metus ligula, elementum at pellentesque pellentesque, suscipit ac nunc. Etiam lobortis, massa ac aliquam auctor, augue nisl sagittis urna, at dapibus tellus erat ullamcorper ligula.</p>

  <p class="softbreak"></p>

  <p class="calibre1">Donec tellus augue, tempus sed facilisis sed, fringilla quis leo. Mauris vulputate, leo ac facilisis vulputate, enim orci interdum augue, in blandit quam turpis quis dui. Morbi dictum luctus velit nec faucibus. Cras vitae tortor purus, ut tincidunt mauris. Sed at velit nisl.</p>

  <p class="softbreak"></p>

  <p class="calibre1">Donec eu mauris tortor, interdum condimentum erat. Nam egestas turpis eget nibh laoreet pharetra. Suspendisse a sem eros, ut pulvinar enim. In sed elit eu nulla accumsan tincidunt eget sit amet ipsum. Nullam ut massa rutrum dolor placerat tempor accumsan eget purus.</p>


(To customize the epub output select, Preferences > Input options > TXT input.)
Doitsu is offline   Reply With Quote
Old 03-20-2021, 02:37 PM   #5
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,651
Karma: 5433388
Join Date: Nov 2009
Device: many
On import of text files, Sigil will use double newlines to mark paragraph boundaries and wrap them in p tags when imported.
KevinH is offline   Reply With Quote
Advert
Old 03-20-2021, 11:38 PM   #6
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,587
Karma: 4300000
Join Date: Mar 2015
Device: Kindle, iOS
I feel like I may be totally misunderstanding things here, but just in case this is useful ...

Quote:
Originally Posted by ayranism View Post
... but i gotta do this "<p> ... </p>" by hand everytime and if you consider that there is over 5000 paragraphs its quite the hussle to do each one of them by hand
Doitsu's nifty MarkdownImport plugin will import plain text files with or without markdown and wrap <p> tags around each paragraph.

(Again, I may be misunderstanding the goal here since Doitsu recommended Calibre instead of mentioning his plugin )

Quote:
Originally Posted by KevinH View Post
On import of text files, Sigil will use double newlines to mark paragraph boundaries and wrap them in p tags when imported.
I'm sure I'm doing or thinking something stupid, but when I use Add Existing to import a text file, I don't get any p tags ...
odamizu is offline   Reply With Quote
Old 03-21-2021, 04:50 AM   #7
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
Quote:
Originally Posted by odamizu View Post
I'm sure I'm doing or thinking something stupid, but when I use Add Existing to import a text file, I don't get any p tags ...
Use File>Open directly
Remember about the spacing between paragraphs in the text file.
BeckyEbook is offline   Reply With Quote
Old 03-21-2021, 12:39 PM   #8
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,587
Karma: 4300000
Join Date: Mar 2015
Device: Kindle, iOS
Quote:
Originally Posted by BeckyEbook View Post
Use File>Open directly
Ha! I knew I was doing something wrong. This is so cool (and very useful)! Thanks!
odamizu is offline   Reply With Quote
Reply


Forum Jump


All times are GMT -4. The time now is 03:25 AM.


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