Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-02-2024, 09:11 AM   #1
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,544
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
A problem (?) with the .opf file

I have a lot of files not included in the .opf file (I know the files since they are there due to me). Of course, those files are ignored when the epub is opened, and I want them enabled. Normally, I would open the epub in Sigil and would put those files there, in the proper folder. But I can't do that because the files are .js and they can't be in the Misc folder, they must be in a specific folder. I have already created it, inside OEBPS/../../MyFolder and I put the files there (I worked with the epub unziped). Now, is there a way that those files were included automatically in the .opf file? If I have to do it by hand is a lot of work because they are about 50.

Many thanks in advance for any info you can give me.
RbnJrg is offline   Reply With Quote
Old 02-02-2024, 09:35 AM   #2
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,645
Karma: 5433388
Join Date: Nov 2009
Device: many
Remember, those folder names in Sigil's BookBrowser are just "virtual folders" where files are grouped by file types. The files in them can actually exist in any place in the epub.

In Sigil you can easily create new folders/bookpaths and move files between real folders using Sigil's interface.

That will not change the virtual grouping name they appear under.

To aid in this, make sure you set Sigil Preferences to show the full bookpath of all files in BookBrowser.

So after creating a bookpath to a new folder, you can bulk select some files and move them to that newly created folder using the Move menu/command.

This is how Restructure to Sigil Norm is done as well.

But to your case ... do not add the files manually to the epub. Add the new folder using BookBrowser, then just import the files normally, and they will be added to the manifest. Then use Move command to move them to where you want.

Once a folder gets enough files of the same type, it should automagically become the default destination folder for all files of that type when importing existing files.

Last edited by KevinH; 02-02-2024 at 09:49 AM.
KevinH is offline   Reply With Quote
Advert
Old 02-02-2024, 10:14 AM   #3
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,544
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by KevinH View Post

In Sigil you can easily create new folders/bookpaths and move files between real folders using Sigil's interface.
How? I can't see how to it.
RbnJrg is offline   Reply With Quote
Old 02-02-2024, 10:33 AM   #4
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,645
Karma: 5433388
Join Date: Nov 2009
Device: many
Here is the easiest way to deal with a set of js files that need a specific home:

1. Use Add Existing to add all of the js files. They will show up in the OEBPS/Misc folder.

2. Select them in BookBrowser and right click to select Move ...

3. It will prompt you for epub bookpath for the destination folder. You can use the pull down to pick any existing folder or simply type in a full bookpath for your new destination folder:

In this case I typed "OEBPS/js"

Once the move is complete, the js files will be present in only that OEBPS/js/ folder.
The opf will be appropriately updated.

They will still appear under the Misc virtual Folder in BookBrowser but showing the full book relative path will show you where those files are physically located.

Last edited by KevinH; 02-02-2024 at 10:35 AM.
KevinH is offline   Reply With Quote
Old 02-02-2024, 10:35 AM   #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,645
Karma: 5433388
Join Date: Nov 2009
Device: many
You can also start with a custom empty epub layout of your own design.

Create one by using the Tools-> "Create a Custom Empty Epub" menu and you can design the layout of actual physical folders you want for creating an epub from scratch.

I use this feature most often to hand merge two epubs into one when file names would otherwise clash. I unzip both epubs and use add existing to pull in the pieces of one and move it to its folders before repeating the process for the other one.

Last edited by KevinH; 02-02-2024 at 11:00 AM.
KevinH is offline   Reply With Quote
Advert
Old 02-02-2024, 11:08 AM   #6
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,544
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Thanks Kevin! A last question; when I want to add a file whose name is the same as the other file, but in a different folder, I receive the message "Unable to load..." "A file with this name already exist in the book". Of course, I can change names before adding, and once added, rename again, but is there a way to avoid that? TIA.
RbnJrg is offline   Reply With Quote
Old 02-02-2024, 11:18 AM   #7
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,645
Karma: 5433388
Join Date: Nov 2009
Device: many
Sorry, but because Sigil must run on case insensitive file systems and adding files can come from any external path (ie only the filename itself is valid/unique when selecting an external file) duplicate names (even if case sensitively unique) must be changed to allow the add or move to happen. Otherwise with image files it will prompt you to overwrite them.

Once the file's full bookpath is unique, you can rename it back to what you want.

I typically rename the problem file to some unrelated temp name first to prevent issues.

Yes that can be a pain in the ass but occurs rarely enough I have not fought the code to try and change it.

Last edited by KevinH; 02-02-2024 at 11:27 AM.
KevinH is offline   Reply With Quote
Old 02-02-2024, 12:44 PM   #8
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,544
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
When I design a custom epub, I can save the layout as .ini file. How must I do to open a new epub with that layout without rewriting sigil.ini? This is a question for the Sigil forum but...
RbnJrg is offline   Reply With Quote
Old 02-02-2024, 05:52 PM   #9
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,645
Karma: 5433388
Join Date: Nov 2009
Device: many
The sigil ini file is not written to. A separate ini file is generated. You control the ini file name when you save the design.

Last edited by KevinH; 02-02-2024 at 08:37 PM.
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
error metawidget file object has no attribute ''opf file'' noemiri Conversion 5 01-10-2024 02:52 PM
Problem with accents in the OPF file silviolorusso ePub 4 05-08-2013 03:51 AM
I made my .opf file w/ Text Wranger; could that be a problem? petercrowell Kindle Formats 14 05-02-2012 04:00 PM
TWO OPF files or something like Media Queries in the OPF file for KF8 and MOBI? DHahn Kindle Formats 3 04-17-2012 04:06 AM
OPF file OPS/package.opf is missing Run2Eat ePub 2 05-31-2011 06:52 PM


All times are GMT -4. The time now is 09:49 AM.


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