|
|
#1 |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Feb 2022
Device: Kobo Clara HD
|
special character managemenet in device filenames
calibre has a tendency to replace special characters with _ for filesystem comaptibility reasons. I have a lot of books with multiple special characters (colons, apostrophes, and other punctuation) in both the title and series names, and I tend to use the underlying filesystem to navigate my library on managed devices.
Is there an easy way to change the mapping of many special characters? Regex works well, but single-function mode means that you can only do one character swap per field (unless there's a chaining syntax I couldn't find), and I don't necessarily want to enter a full programming environment just to swap some characters. |
|
|
|
|
|
#2 |
|
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,404
Karma: 80956223
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I would not advise using illegal characters but if you want to switch all the underscores to something else safe like a period, see this thread.
I am not sure how you'd go about doing multiple replacements though, at least without a composite column. Last edited by ownedbycats; 02-03-2022 at 07:07 AM. |
|
|
|
| Advert | |
|
|
|
|
#3 | |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Feb 2022
Device: Kobo Clara HD
|
Quote:
|
|
|
|
|
|
|
#4 |
|
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,404
Karma: 80956223
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Yes, I misunderstood your post at first. Sorry.
|
|
|
|
|
|
#5 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Code:
{title:'re(re($,"[os]","f"),"[bdcH]","a")'}
Code:
program: title = re($title,"[os]","f"); title = re(title,"[bdcH]","a"); strcat(current_library_name(), '/', $author_sort, '/', title, ' - ', $author) |
|
|
|
|
| Advert | |
|
|
|
|
#6 | |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Feb 2022
Device: Kobo Clara HD
|
Quote:
Cool, I didn't realize Template mode this much flexibility. Thank you! |
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Transforming Filenames With Special Characters | Rand Brittain | Library Management | 8 | 01-21-2022 01:55 PM |
| Forma Can't read .cbz files with special characters in the .jpg filenames | JawadLeLogeur | Kobo Reader | 3 | 06-24-2021 10:53 AM |
| Insert special character: some niggles | Phssthpok | Editor | 2 | 11-19-2016 01:55 PM |
| Special Character searches | ElMiko | Calibre | 2 | 09-05-2011 11:52 PM |
| CBR/Z character-support for inner filenames | drMerry | Calibre | 3 | 05-11-2011 04:16 PM |