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-27-2020, 01:27 AM   #1
songuyento
Junior Member
songuyento began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2020
Device: kindle
rearrange paragraph

Hi there,
I have a book like that:
<p id="2">paragraph 1</p>
<p id="5">paragraph 2</p>
<p id="1">paragraph 3</p>
...
I want to edit it back to an id increase order like this:
<p id="1">paragraph 3</p>
<p id="2">paragraph 1</p>
...
<p id="5">paragraph 2</p>
Does anybody know how to do it?
Thanks in advance
songuyento is offline   Reply With Quote
Old 01-27-2020, 01: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: 24,574
Karma: 34133263
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(RIP), Galaxy Tab A, Kobo Aura2
By hand, using the Editor (or alternate).

This is so far into the far edge of requests that I have seen hear over the years.

I would almost believe, you are trying to fix a PDF conversion that ended up, typically bad.
theducks is offline   Reply With Quote
Advert
Old 01-27-2020, 04:23 AM   #3
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: 1,434
Karma: 7010385
Join Date: Jul 2012
Device: Kobo Forma, Nook
Paste it into a site like Text Mechanic:

https://textmechanic.com/text-tools/...rt-text-lines/

and do a Natural Sort on it.

You can also use any other program that sorts too... like spreadsheet programs (Excel, LibreOffice Calc, Google Sheets, etc.)
Tex2002ans is online now   Reply With Quote
Old 01-27-2020, 07:56 AM   #4
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 songuyento View Post
Does anybody know how to do it?
If you have basic Python skills, you could use the Beautiful Soup Python library to manipulate the file.
Doitsu is offline   Reply With Quote
Old 01-27-2020, 08:44 AM   #5
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
I would just use the Incremental IDs plugin.

If it doesn't overwrite the current ID, you can have it make an incremental 'title='...then basic regex search/replace to swap 'title' to 'id'.
Turtle91 is online now   Reply With Quote
Advert
Old 01-27-2020, 09:05 AM   #6
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 fwiw ids should really not start with a numerical digit.
KevinH is offline   Reply With Quote
Old 01-27-2020, 09:52 AM   #7
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 10,729
Karma: 61278503
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Quote:
Originally Posted by KevinH View Post
And fwiw ids should really not start with a numerical digit.
Are there any non numerical digits?
PeterT is offline   Reply With Quote
Old 01-27-2020, 10:12 AM   #8
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,746
Karma: 118513678
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
The problem is that they want to actually reorder the paragraphs in the document, according to the id number. This isn't about rewriting/reorganizing ids, I'm pretty sure it's about rearranging actual content based on the ids.
DiapDealer is online now   Reply With Quote
Old 01-27-2020, 10:43 AM   #9
songuyento
Junior Member
songuyento began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2020
Device: kindle
Quote:
Originally Posted by DiapDealer View Post
The problem is that they want to actually reorder the paragraphs in the document, according to the id number. This isn't about rewriting/reorganizing ids, I'm pretty sure it's about rearranging actual content based on the ids.
Yes, it’s exactly what I wanted to do. And Tex2002ans’ suggestion site solved my problem.
Thank you all so much
songuyento is offline   Reply With Quote
Old 01-27-2020, 10:59 AM   #10
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: 24,574
Karma: 34133263
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(RIP), Galaxy Tab A, Kobo Aura2
Quote:
Originally Posted by Tex2002ans View Post
Paste it into a site like Text Mechanic:

https://textmechanic.com/text-tools/...rt-text-lines/

and do a Natural Sort on it.

You can also use any other program that sorts too... like spreadsheet programs (Excel, LibreOffice Calc, Google Sheets, etc.)
I missed the wanted the ID to be sequential
I just thought the order was changing
theducks is offline   Reply With Quote
Old 01-27-2020, 10:59 AM   #11
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,746
Karma: 118513678
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by songuyento View Post
Yes, it’s exactly what I wanted to do. And Tex2002ans’ suggestion site solved my problem.
Thank you all so much
It looked like his was the one that might work.
DiapDealer is online now   Reply With Quote
Old 01-27-2020, 03:48 PM   #12
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
Quote:
Originally Posted by PeterT View Post
Are there any non numerical digits?

Yes the digits on each of my hands for example. ;-)
KevinH is offline   Reply With Quote
Old 01-27-2020, 04:15 PM   #13
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 168
Karma: 984696
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by KevinH View Post
Yes the digits on each of my hands for example. ;-)
Roman numerals?
hobnail is offline   Reply With Quote
Old 01-27-2020, 05:44 PM   #14
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: 1,434
Karma: 7010385
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by songuyento View Post
Yes, it’s exactly what I wanted to do. And Tex2002ans’ suggestion site solved my problem.
Thank you all so much
I'm scratching my head over what you're actually using this for though.

What are you trying to accomplish?

Do you have a large collection of quotations + page numbers?

If you let us know the surrounding context, there may be even better solutions out there.

Quote:
Originally Posted by KevinH View Post
Yes the digits on each of my hands for example. ;-)

Last edited by Tex2002ans; 01-27-2020 at 06:54 PM.
Tex2002ans is online now   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
How can I rearrange chapters? laundmo Editor 3 12-18-2018 05:16 PM
Cannot rearrange files in Book Browser BartB Sigil 3 12-18-2011 12:52 PM
Preference: Paragraph indent or a little paragraph spacing? 1611mac General Discussions 48 11-11-2011 01:43 AM
Classic Rearrange touchscreen icons on Classic? ynot Barnes & Noble NOOK 2 05-08-2011 06:40 PM
rearrange pic order in gallery MULTIZ321 Barnes & Noble NOOK 16 01-15-2011 02:22 AM


All times are GMT -4. The time now is 03:59 PM.


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