![]() |
#1 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,483
Karma: 5703586
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? |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
![]() |
#4 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,909
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
FWIW Once all splitting is done, I just bulk rename the selected group (yes, you can skip)
P1 C01 C02 P2 |
![]() |
![]() |
![]() |
#5 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Quote:
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:
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:
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):
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:
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. |
||
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,483
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Pull Requests and/or patches welcome. O
|
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |