View Single Post
Old 09-21-2021, 09:53 PM   #1
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,035
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Slashes converted to underscores when column used in save path

I had a #kobopath composite used to categorize my books at the top level. The full save path is:

Code:
{#kobopath}/{author_sort:sublist(0,1,&)}/{title} - {authors}
Here's the template I was using for the column itself:

Code:
program:

# Returns 'Fanfiction/Fandom' (based on tags) for fanfics 
	if $$#fanficcat then
		re(sublist($tags, 0, 1, ','), '\.', '/')

# Returns 'PDF' for PDFs
	elif $formats == 'PDF' then
		'PDF'

# Returns 'Loans' for Loans
	elif $#kobostatus == 'On Loan' then
		'Loans'

# Returns blank for paperbooks
# This bit isn't needed anymore
#	elif $formats == 'PAPERBOOK' then
#		''

# Returns topmost tag for all other books
	else
		re(sublist($tags, 0, 1, ','), '^(.*?)($|\..*$)', '\1')

	fi

For fanfics, I used Fanfiction/Fandom entries to sort them into subfolders. This worked perfectly fine when it was a composite column.

However, I copied it all over to a text column (originally #kobopath2, but I dropped the 2 after deleting the composite) because it was impacting performance too much and I only needed it for books I want on the device.

It has the same Fanfiction/Fandom as before, but now Calibre turns the slashes into underscores and breaks the subfoldering:

Click image for larger version

Name:	2021-09-21 22_47_42-Window.png
Views:	186
Size:	1.9 KB
ID:	189345

I tried inverting the slash, but that didn't work - even if it did, it would cause my template (I use it to generate the column output with my send-to-device Action Chain) to error.

Any idea what I should do? I figure it's deliberate as it's technically an illegal character, but I'm not sure why it only affect non-composite columns.

My fallback plan would be to just entirely drop the second part. I'd rather not do this. Sending all those fanfics to device again would be a hassle.

Last edited by ownedbycats; 09-22-2021 at 09:03 AM.
ownedbycats is offline   Reply With Quote