03-08-2023, 01:51 AM | #1 |
JCL Punch-Card Collector
Posts: 50
Karma: 10
Join Date: Jun 2014
Location: Antarctica
Device: Aggressively Device Independent
|
Split File at Cursor?
I'm probably overlooking something obvious...
I have a bad mobi source converted to ePub. I want to manually place my cursor at locations in the (7.5mb!) index.html file and split at that point. Because it's a conversion from mobi, I cannot use an xpath expression -- the option offered when placing the cursor where I want to split and then right-clicking -- to tell it where to convert (you really don't want to see some of the goofy code). Neither the Tools nor the Edit menus offer anything other than Split at Multiple Locations. So what am I missing? |
03-08-2023, 02:07 AM | #2 |
Wizard
Posts: 1,166
Karma: 4917720
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
|
Advert | |
|
03-08-2023, 02:28 AM | #3 |
JCL Punch-Card Collector
Posts: 50
Karma: 10
Join Date: Jun 2014
Location: Antarctica
Device: Aggressively Device Independent
|
I was afraid of that.
The only other option I can see is to manually drop fake-code markers like <p class="splitbabyhere"></p> into the index.xhtml file at the desired split points -- but then I still can't be sure that an xpath statement would work correctly. Since I don't use xpath for anything else, I'd almost certainly screw it up even if that's the right approach, especially working on a new machine with an oversensitive touchpad. |
03-08-2023, 03:08 AM | #4 | |
Wizard
Posts: 2,091
Karma: 8796704
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
|
Look under the file preview of teh editor.
bernie Quote:
|
|
03-08-2023, 03:17 AM | #5 |
null operator (he/him)
Posts: 20,683
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
Advert | |
|
03-08-2023, 03:30 AM | #6 |
JCL Punch-Card Collector
Posts: 50
Karma: 10
Join Date: Jun 2014
Location: Antarctica
Device: Aggressively Device Independent
|
I apparently wasn't clear enough. I don't want to split appearance in the editor; I want to actually split the files, so that I don't have an epub consisting of a "cover" and a 7.5mb "index.xhtml."
I went ahead and did the fake-code kludge, which sort of worked. This is what I get for dealing with very-first-generation mobi files made from government documents. Now I only have seventeen other types of artifacts that make the file darned near impossible to actually read to clean up. Being able to point-and-split-the-file-not-just-the-view would be a useful feature, though. On the other hand, the fake-code kludge sure beats the excessive file-splitting that results when converting heavily-illustrated/filled-with-tables Kindle books to epubs. |
03-08-2023, 03:37 AM | #7 |
Wizard
Posts: 1,166
Karma: 4917720
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
|
03-08-2023, 03:40 AM | #8 |
null operator (he/him)
Posts: 20,683
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Last edited by BetterRed; 03-08-2023 at 03:43 AM. |
03-08-2023, 10:07 AM | #9 |
Guru
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
Eee gods! I never noticed that split feature in the Editor's Preview window either. And, thanks from me, too!
|
03-08-2023, 11:01 AM | #10 |
Well trained by Cats
Posts: 29,981
Karma: 56143930
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
03-08-2023, 11:08 AM | #11 | |
Well trained by Cats
Posts: 29,981
Karma: 56143930
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
It works just fine Just do whatever to place the split point markers. The Right-click in the code:split at multiple locations: Code:
//h:div[re:test(@class, "split_here", "i")] |
|
03-08-2023, 09:09 PM | #12 | |
JCL Punch-Card Collector
Posts: 50
Karma: 10
Join Date: Jun 2014
Location: Antarctica
Device: Aggressively Device Independent
|
Quote:
I respectfully suggest that whoever designed that icon for the split-via-preview feature is both insane and has far better vision than I do. That is not an intuitive icon... and doing the split from the preview window risks incorrectly splitting other code (like the ends of tables; I did try... after someone pointed this out... and it left a hanging </table> at the top of the file because the source file doesn't have consistent vertical spacing and linebreaks). So if it's possible to do in the preview editor, I'd like to do it in the code window, too. But I suspect that's not a high priority. |
|
03-08-2023, 11:33 PM | #13 |
null operator (he/him)
Posts: 20,683
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
If I don't like the result of a Preview split, I go to the Edit menu and choose the first item which will be something like "Revert to "Before: Split index_split_001.html"
If I don't know what an icon button does (given I'm a card-carrying iconoclast, that is 90% of the time) I hover the mouse and read the tooltip, calibre's tooltips are considerably better than most applications. I also recommend spending time viewing the Editor video, it covers many of non-obvious features - like checkpoint/reversion of significant events - such as preview splits. And its one of the few "how to" videos I can bear to watch. BR |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
File split question | gtriever | Conversion | 6 | 09-09-2021 10:05 AM |
can I split a file at headings? | gennaro | Sigil | 3 | 12-28-2020 04:42 PM |
Split at Cursor sometimes inserts multiple pages?? | nzdeni | Sigil | 6 | 01-11-2020 10:36 AM |
File split sometimes shows more split lines | DrChiper | Editor | 1 | 12-23-2013 05:38 PM |
Can I split one epub into more than one file? | ChrisKaos | ePub | 10 | 04-05-2012 06:05 AM |