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 04-16-2018, 03:00 AM   #1
Maui
Connoisseur
Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.
 
Maui's Avatar
 
Posts: 57
Karma: 600000
Join Date: Jan 2018
Device: Galaxy Tab S2
Splitting files: two different namings

Hi,

there are two ways to split files in Sigil:

1) Split at cursor

The resulting filename will be of type Sectionxxxx.html where xxxx is the next free number.

2) Split at markers

The resulting filenames will be of type sourcefilename_xxxx where sourcefilename is the filename where the split occurs and xxxx the next free number.

Can this be consolidated in one of the next versions of Sigil? I like the naming (2) much much more.

|\/|aui
Maui is offline   Reply With Quote
Old 04-16-2018, 10:06 AM   #2
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: 3,031
Karma: 1931746
Join Date: Nov 2009
Device: many
Split At Cursor is different in that it uses CodeView locally to make one split. Split at markers grabs complete control and the uses QtConcurrent to create multiple new sections in parallel using multiple threads to do the splitting and copying.

The use of different naming schemes has more to do ith what information is passed to the concurrent routine, than anything else.

Why does this matter when typically after a split the user normally renumbers/renames things anyway?
KevinH is offline   Reply With Quote
Advert
Old 04-16-2018, 10:26 AM   #3
Maui
Connoisseur
Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.
 
Maui's Avatar
 
Posts: 57
Karma: 600000
Join Date: Jan 2018
Device: Galaxy Tab S2
Hi,

i'm renaming the files in a very first step to get an overview of what is in the ebpug and how it is structured.

After that maybe i split the files, in many cases i do not rename the files any more after splitting at markers cause thats fine for me, but i'm renaming the file always after a split at cursor.

In my small programming world i thought that function (1) is requesting the filename by a certain module and it just needs to query the filename from another module which al already in place.

So in my case your assumption is wrong: i'm not typically rename the files always in case of a marker based split.

|\/|aui
Maui is offline   Reply With Quote
Old 04-16-2018, 12:01 PM   #4
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: 22,007
Karma: 22086756
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab A
FWIW Once all splitting is done, I just bulk rename the selected group (yes, you can skip)
P1
C01
C02

P2
theducks is offline   Reply With Quote
Old 04-16-2018, 01:18 PM   #5
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,027
Karma: 5860817
Join Date: Jul 2012
Device: Nook
Quote:
Originally Posted by Maui View Post
Can this be consolidated in one of the next versions of Sigil? I like the naming (2) much much more.
I agree.

Quote:
Originally Posted by KevinH View Post
Why does this matter when typically after a split the user normally renumbers/renames things anyway?
For consistency.

Both have the same functionality: Splitting a file... but they result in different filenames.

A real-life usecase:

I typically work on HTML articles pulled from websites. Let's say it's:
  • Article_Name_1_-_Full_Author.xhtml
  • Article_Name_2_-_Full_Author.xhtml
  • [...]
  • Article_Name_20_-_Full_Author.xhtml

Split at Cursor

I may go through split large articles into two (or book-sized HTMLs into chapters). If I used Split At Cursor, I would get this:
  • Article_Name_1_-_Full_Author.xhtml
    • Section0001.xhtml
  • Article_Name_2_-_Full_Author.xhtml
    • Section0002.xhtml
  • [...]
  • Article_Name_20_-_Full_Author.xhtml
    • Section0020.xhtml

I see a few disadvantages of the Section#### method:

1. If I use Reports, these Section#### filenames are not helpful.
2. If I drag/drop articles into different positions, it is hard to know which Section#### belong to which articles.
3. I still have to manually rename each Section#### to be helpful to humans.

Split at Markers

If I used Split at Markers (which is the method I almost always do):
  • Article_Name_1_-_Full_Author.xhtml
    • Article_Name_1_-_Full_Author_0001.xhtml
  • Article_Name_2_-_Full_Author.xhtml
    • Article_Name_2_-_Full_Author_0001.xhtml
  • [...]
  • Article_Name_20_-_Full_Author.xhtml
    • Article_Name_20_-_Full_Author_0001.xhtml

These filenames are still meaningful, and using Reports is still helpful.

If you dragged/dropped files around, you can still tell which split piece belongs to which file.

A Mix

Section#### files rename on a per-book level, while the other renames on a per-file level.

Now, the inconsistencies come when you mix both methods AND you do them in different orders:
  • Article_Name_1_-_Full_Author.xhtml
    • Article_Name_1_-_Full_Author_0001.xhtml
    • Article_Name_1_-_Full_Author_0002.xhtml
    • Section0020.xhtml
    • Section0020_0001.xhtml
    • Section0020_0002.xhtml
  • Article_Name_2_-_Full_Author.xhtml
    • Article_Name_2_-_Full_Author_0001.xhtml
    • Section0001.xhtml
  • [...]
  • Article_Name_20_-_Full_Author.xhtml
    • Article_Name_20_-_Full_Author_0001.xhtml
    • Section0002.xhtml
    • Section0002_0001.xhtml
    • Section0005.xhtml

Depending on WHEN/HOW you do the splits, the filenames can become a hideous mixed nest. (You do a mass S/R to add markers after every <h1> in the book, F6. Then you individually go through and manually split any oddities, Ctrl+Enter. Then you notice a different pattern+S/R and do another F6.)

Last edited by Tex2002ans; 04-16-2018 at 01:27 PM.
Tex2002ans is offline   Reply With Quote
Advert
Old 04-16-2018, 02:46 PM   #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: 3,031
Karma: 1931746
Join Date: Nov 2009
Device: many
Pull Requests and/or patches welcome. O
KevinH is offline   Reply With Quote
Old 04-16-2018, 03:23 PM   #7
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,027
Karma: 5860817
Join Date: Jul 2012
Device: Nook
Quote:
Originally Posted by KevinH View Post
Pull Requests and/or patches welcome.
KevinH, you lazy bum!
Tex2002ans is offline   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
Splitting files LeonidasM Sigil 20 12-09-2017 12:47 PM
Renaming when splitting files rubeus Sigil 5 01-28-2016 12:32 PM
Splitting multiple html files? nqk Editor 5 11-27-2015 02:08 AM
splitting html files? NASCARaddicted ePub 8 01-22-2013 04:13 AM
Splitting files... or something? *Angie* Calibre 4 09-14-2009 07:42 PM


All times are GMT -4. The time now is 07:22 AM.


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