![]() |
#1 | ||
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,708
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
I went off topic in this thread ==>> [Enhancement] calibre:// show-details option, on the subject of 'attachments'.
I'll copy the relevant posts from the other thread to here in a moment. An issue I had Count Pages has triggered some further thoughts. Quote:
Last edited by BetterRed; 04-04-2023 at 08:14 PM. |
||
![]() |
![]() |
![]() |
#2 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,416
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,932
Karma: 74999999
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I believe SQLite supports blob (or none?) data but that probably isn't too practical
|
![]() |
![]() |
![]() |
#4 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,708
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Have to dash BR |
|
![]() |
![]() |
![]() |
#5 | |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,932
Karma: 74999999
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |||
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,708
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Quote:
The actions I envisage calibre performing on the Attachments folder are….
Beyond that I don't envisage the calibre library manager doing anything with the files in the Attachments folder. ** IMO the way Remove books works needs to be reconsidered, for Windows at least. Firstly the Are you sure message is quite emphatic: Quote:
However, the Recycle Bin Restore tools cannot be used to put the book back where it came from (i.e. within an author folder in a calibre library folder). I understand why - as well as restoring the book folder the database needs to be updated accordingly. Maybe a plugin could be developed that would intercept Remove Book actions and move the book into a Remainder Bin (probably within the library folder) which was equipped with a tool to restore a book folder and its database record directly. There'd need to be something (close library plugin ?) to hard delete removed books from Remainder Bin after a user defined time period. BR |
|||
![]() |
![]() |
![]() |
#7 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,708
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
So, what happened in Count Pages.
I created a 'book' by adding a CBZ file to a calibre library in which there were almost 200 books with a lone CBZ. But for this 'book' I had a number of small MP4 video clips (animations) I wanted to store with alongside the CBZ so I put them in a RAR and added that to the book. I then ran the Count Pages (CP) plugin - it didn't update my Pages/#pages custom column ![]() I reported the issue in the CP thread. When a new version of CP was released, the problem was still evident; assuming it had been overlooked (there had been a flurry of other posts immediately after mine) I posted a reminder. The response was "Your problem is caused by you using .RAR files - quite simply, don't ![]() So I renamed it back to BAR, set Windows to open BAR files with WinRAR, and added a bar.png (WinRAR's icon) to %AppData%\calibre\resources\images\mimetypes. Which made me think - why not have a calibre tool that can create a zip-like container for a book with a fixed name, e.g. book.attachments (a'la cover.jpg & metadata.opf) with options for basic file operations (add, delete, rename, OS open with), and maybe move files from the book folder into the book.attachments archive and vice-versa. And unpack to a folder and pack a folder as an book.attachments container. Could it be a plugin. Have to dash - again. pacemaker grease and oil change. BR Last edited by BetterRed; 04-04-2023 at 09:53 PM. |
![]() |
![]() |
![]() |
#8 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,318
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
This is on my long term TODO list. It will likely be a folder that calibre will move around/delete/export in save to disk. Beyond that you will use the OS file manager to manage it. Then main blocker is as usual windows and its absurd mandatory file locking and path length limitations which make implementing moves in a performant and robust manner (avoiding file copying) particularly hairy.
In particular these wont have database entries, which means you wont be able to search for books having them or particular files or similar. |
![]() |
![]() |
![]() |
#9 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,708
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Windows file locking is not mandatory, it's up to the application to use or not use.
Example: if I change the Author of a book whilst Notepad++ has the book's TXT format file open, it pops an error message right after calibre does the move, viz: Sigil & Calibre Editor are similar: they pop an error message when the EPUB that is being edited is saved with a Ctrl+S. I know I suggested an "Attachments" folder, but on thinking about it I wondered if it could open a can of worms if users were allowed to put .lnk files, windows reparse points (symlinks, folder junctions, mount points etc), hardlinks etc, into the folder. BR Last edited by BetterRed; 04-05-2023 at 01:52 AM. |
![]() |
![]() |
![]() |
#10 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,932
Karma: 74999999
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Shortcut files did use to add directly (I remember running into this when adding a manual from the start menu), but this was changed.
|
![]() |
![]() |
![]() |
#11 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,195
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
For books that have a supplementary material, I use the Action Chains plugin to handle and open the folder/file as follows:
Notes:
Edit: I have never gone through a restore process. My presupposition here is that it restores the ids of the books as well. (seeing that the book folders have the book is in the folder name) So, before others adopt a system like that, it is worth knowing what happens with books ids and how to make this compatible with calibre restore Last edited by capink; 04-05-2023 at 04:21 AM. |
![]() |
![]() |
![]() |
#12 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,708
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
If you 'View' the LNK file, Windows will open the target in the default program for the link target file type - e.g. a shortcut to a PDF in Acrobat, to an ODT in Writer, to a folder in File Explorer. One of the downsides is that there's no visibility of the target file type within calibre - you need to open the book folder to see that. But if you only used shortcuts for supplementary folders you could find a png of a folder in chains and put that in the mimetype folder as lnk.png ![]() BR |
|
![]() |
![]() |
![]() |
#13 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,708
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
![]() |
![]() |
![]() |
#14 | |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,318
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
In contrast in POSIX file locking is advisory, opening files does not lock them unless the application asks for them to be locked and both applications have to ask for the lock for locking to work. |
|
![]() |
![]() |
![]() |
#15 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,708
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quick update to where I'm at with this - I am bundling the files I want to attach to a 'book' into a .RAR file with WinRAR, renaming it to .CAL-ATTACH and adding that to the book. I have configured Windows to open CAL-ATTACH with WinRAR.
I can add, rename and remove files, I can open files with the default programs i.e. epub's with ebook-viewer, pdfs with PDFXchange, DOCX with Word (and replace on Save), images with IrfanView, video's with VLC etc The thing I miss most is Open With… which means I can't open an epub with Sigil or a cbz with WinRAR - I can drag them out of the CAL-ATTACH, do what I want and drag them back into the CAL-ATTACH. If anyone knows of Windows archiver with an Open With... feature perhaps they could let me know. Some might find this 10+ year old thread of interest ==>> Supplementary material. BR |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
kepub - supplementary font turned on - annoying poup | black | Kobo Reader | 8 | 06-24-2022 12:25 PM |
Supplementary material | darq | Library Management | 29 | 06-14-2016 06:57 AM |
Firmware 3.16.0 Discussion | davidfor | Kobo Reader | 240 | 08-14-2015 11:52 AM |