10-02-2016, 06:27 PM | #1 |
Leftcoast, USA
Posts: 38
Karma: 500010
Join Date: Dec 2012
Location: SF Bay Area
Device: Pixel 2 XL, Basic Kindle
|
Exported book names prefixed with forward slash
I use Calibre with Linux (Ubuntu, and Mint). Often, my books end up with a forward slash as the first letter of the book's name - not in the metadata, but in exported books.
I get books from the library in a couple of ways, both of which exhibit this symptom. I connect to the content server from my Android reader, Moon+ Reader, or I export books to a USB-attached Kindle reader. This can cause a problem if I want to find information on the book from the app, as the book will not be found unless I am able to edit the name to delete the forward slash. FWIW, I have a duplicate library on Dropbox that i use to connect from my Android devices using Calibre Companion, and it doesn't seem to have this problem. Has anyone had this problem? If so, did you solve it? EDIT: I found the source of this problem (see post at end). It was caused by having installed, then uninstalled the DeDRM plugin. Last edited by Tech Guy; 10-03-2016 at 09:24 PM. Reason: Solved problem |
10-02-2016, 10:09 PM | #2 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I'm not sure I understand what you are saying. Since the forward slash is a path separator, how can it be part of a filename? Can you post a couple of examples of exactly what you are seeing?
|
Advert | |
|
10-02-2016, 10:45 PM | #3 | |
Leftcoast, USA
Posts: 38
Karma: 500010
Join Date: Dec 2012
Location: SF Bay Area
Device: Pixel 2 XL, Basic Kindle
|
Quote:
/The Devil of Nanking Mo Hayder .................................... 1% /Book by Book Michael Dirda .............. 0% Music Theory: From Beginner to Expert Nicolas Carter ......... 0% The first two were transferred from Calibre to the Kindle via USB. The 3rd was an Amazon freebie. I've seen the same results using my Android app Moon+ Reader, for some but not all books transferred via the content server. If I search for info on one of these books, it says it couldn't find the book (unless I can erase the leading backslash). I hope this is clear. |
|
10-02-2016, 10:48 PM | #4 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Those names come from the metadata, not filenames. So either the metadata is already like that in calibre, or you have a metadata plugboard setup in Preferences->Metadata plugboards that is doing that.
|
10-03-2016, 12:38 AM | #5 | |
Leftcoast, USA
Posts: 38
Karma: 500010
Join Date: Dec 2012
Location: SF Bay Area
Device: Pixel 2 XL, Basic Kindle
|
Quote:
The standard format I use is epub. When I transferred a book to the Kindle, it created a mobi format. I opened both of those formats in calibre, and checked the metadata using the info icon, and there was no slash. But on the Kindle, it has a slash. I just started up the content server, and downloaded a book to my phone. I noticed it showed up in the file manager with a leading underscore, but in Moon+ reader, it had a leading slash. Next, I went into Calibre, and chose "Test Server", which connects to the library using a browser (Firefox). I clicked on a book, and got the book information page. I then clicked on "Get", and it shows an open dialog, with the name of the file showing a leading underscore. However, looking at the actual files on my hard disk, there is no leading underscore for any filenames. So, it seems to be something to do with the content server, and whatever is used for transferring files to the Kindle. Are they related? |
|
Advert | |
|
10-03-2016, 11:48 AM | #6 |
Well trained by Cats
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
My suggestion is to rename your Calibre configuration folder, then start Calibre, which will recreate it with 'factory settings'
Note: Underscores are SUBSTITUTED when a OS meaningful character is encountered in the filename (like / or wildcards) could you have // (escaped /) in a template? a single /, is make a folder level Preference (Add/Send) settings only affect First use You need to make REVISIONS down im Preferences PLugins OR (simpler) With the device connected: Right click the Device Icon: Configure |
10-03-2016, 12:18 PM | #7 | |
Wizard
Posts: 3,450
Karma: 10484861
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
|
Quote:
Please explain where the forward slash '/' is. Is it in the filename or in Metadata of an exported book? How do you 'export' the book. Do you use "save to disk" function? Do you use "send to device"? Please check template in the "Saving books to disk". This is an example of working template for filenames: Code:
{author_sort:.1}/{authors}/{series:|# |}/{series_index:0>3s|| - }{title} - {authors}/{series_index:0>3s|| - }{title} - {authors} If that doesn't work, can you upload an example of such file for me to check and send me PM with the address? I will try to import the file into my instance of Calibre and see whether I can reproduce the problem with your book. It is possible to create filename beginning with a forward slash or containing other funky characters on Linux. Not even difficult. It is just very strongly discouraged - so very few Unix/Linux manuals write about how to do it. |
|
10-03-2016, 01:29 PM | #8 | |
Leftcoast, USA
Posts: 38
Karma: 500010
Join Date: Dec 2012
Location: SF Bay Area
Device: Pixel 2 XL, Basic Kindle
|
Quote:
However, I did check through some settings, and have come up with new info in my future post, if that helps. |
|
10-03-2016, 01:31 PM | #9 | |
Leftcoast, USA
Posts: 38
Karma: 500010
Join Date: Dec 2012
Location: SF Bay Area
Device: Pixel 2 XL, Basic Kindle
|
Quote:
|
|
10-03-2016, 01:40 PM | #10 | |
Wizard
Posts: 2,082
Karma: 8796704
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
|
Quote:
bernie |
|
10-03-2016, 01:55 PM | #11 |
Leftcoast, USA
Posts: 38
Karma: 500010
Join Date: Dec 2012
Location: SF Bay Area
Device: Pixel 2 XL, Basic Kindle
|
New information after playing with content server and browser
I started the content server from the preferences, and used the "test server" button to experiment within Firefox.
I found that when I click on the "Get" button in Firefox, I can see the name of the file that will be downloaded. They mostly have a leading underscore, mostly being an interesting word here. What I finally found was that the files that are part of a series do not have the mangled filename, and they are prefixed by the series name followed by an underscore. The name used by the server is not the same as the filename in the library, nor is it the same as the metadata filename. This made it hard to figure out. So, the filename as presented by the content server is: "series_Title - Author Name_nnnn.xxx", with nnnn being the number assigned by Calibre. Apparently, if there is no series, it is generating "_Title - Author Name_nnn.xxx", without detecting that the series name is blank. I added a series ("X") to a book that had the leading forward slash on my Kindle, and the result was "X/Title - Author Name". So, that is the source of the forward slash. I'm a bit surprised that only my installations do this, but I attribute this to bad luck and trouble, which is my middle name. Or names, I guess. :-( |
10-03-2016, 02:00 PM | #12 | |
Leftcoast, USA
Posts: 38
Karma: 500010
Join Date: Dec 2012
Location: SF Bay Area
Device: Pixel 2 XL, Basic Kindle
|
Quote:
|
|
10-03-2016, 02:02 PM | #13 |
Leftcoast, USA
Posts: 38
Karma: 500010
Join Date: Dec 2012
Location: SF Bay Area
Device: Pixel 2 XL, Basic Kindle
|
Thanks. I found that it's coming from code that uses the metadata, creating the name from valid metadata in such a way as to make it unusable for functions that use the file name.
|
10-03-2016, 03:01 PM | #14 | |
Wizard
Posts: 3,450
Karma: 10484861
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
|
Quote:
Everything works the way it is supposed to. Are you sure you have no Metadata Plugboard set up for device called "Content server"? If I put '/' string here it gets included in the downloaded file name (or replaced with an undescore in case of Firefox) It is possible to put together a template language example that would insert '/' into the beginning of the "Title" field for books with non-existing series using template language as described here: https://manual.calibre-ebook.com/template_lang.html Code:
Go to Options, Metadata Plugboard Add a new plugboard: Format: any format Device: content_server Source template: {series:ifempty(/)|| - }{series_index:0>3s|| - }{title} - {authors} Destination field: title If your plugboard is empty and Calibre still behaves the way you describe, try to create a new one plugboard as described above, set Source template: {title} and observe results. The Calibre is AMAZING. I keep discovering unbelievable features. I never had the need to have a closer look at the advanced features of the Template language and the plugboards until today. And I am blown away. *Again*. Thank you Kovid. |
|
10-03-2016, 03:34 PM | #15 | |
Leftcoast, USA
Posts: 38
Karma: 500010
Join Date: Dec 2012
Location: SF Bay Area
Device: Pixel 2 XL, Basic Kindle
|
Quote:
So, are you saying you set up the content server, and tested the "get'' function for a book that is not part of a series, and the resulting filename did not have anything added? Did you try it with a book that is part of a series? I'm wondering if it added the series name to the beginning of the book name, as mine does. Personally, I would prefer it not to do that - it seems silly. I don't want to go in to add a workaround unless I find out that there is no other way, as in the future, it will get lost, and I'll have to figure out what I did to recreate it. I would rather find the code that is causing the problem, and either confirm that it's a bug, or find out why it's doing this. I really find it pretty hard to believe that I'm the only one with this problem since there is nothing unusual about my installation. |
|
Tags |
export, naming |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
File names and slash / in the title | Joanna | Calibre Companion | 4 | 12-29-2015 05:04 AM |
variable width font with slash/dot zero glyph | rem736 | General Discussions | 3 | 07-28-2015 03:02 PM |
What book on your TBR list are you looking forward to the most? | desert dog | General Discussions | 28 | 10-14-2014 11:11 PM |
Wrong sort order when slash (/) in ebook name | rfog | Calibre | 4 | 07-31-2012 09:55 AM |
randomness in series_index prefixed to title | thecyberdeaf | Library Management | 4 | 04-03-2012 09:57 AM |