Quantcast
Channel: MobileRead Forums - Calibre
Viewing all articles
Browse latest Browse all 31491

Export to disk, using functions

$
0
0
Hi all,

I export all my ebooks to a file system, structed by folders. I have 2 ruleset for exporting :
- Export by name :
Code:

{authors:.1}/{authors}{series:| - |/{series_index:0>2s}} - {title}
- Export by series (when multiple authors work on same series) :
Code:

-Series-/{series}/{series_index:0>2s} - {title} \[{authors}\]
To seperate both, I added a tag : "By series"

Now, I would like to do all of this at one time, and I tried to look over functions, but somehow, when the query gets complicated, the export crashes :
This works
Code:

{tags:contains(By_series,-Series-/,{authors:.1}/)}{title}
In bold, the added statement which makes it not not work anymore
Code:

{tags:contains(By_series,-Series-/,{authors:.1}/{title}/)}{title}
Throwing the following error
Code:

calibre, version 0.9.1
ATTENTION : Impossible d’enregistrer certains livres: Impossible d’enregistrer certains livres, Cliquer le bouton afficher les détails pour voir lesquels.

Le Gardien de la Pierre
        Traceback (most recent call last):
          File "site-packages\calibre\library\save_to_disk.py", line 434, in save_serialized_to_disk
          File "site-packages\calibre\library\save_to_disk.py", line 306, in do_save_book_to_disk
        ValueError: A échoué à calculer le chemin pour enregistrer sur le disque. Modèle : {tags:contains(Export_Par_Serie,-Series-/,{authors:.1}/{title}/)}{title}
        Erreur : Incorrect number of arguments for function contains

... And 1 block like this for every ebook ...

Of course, what I would have liked to be able to do was (added return for better read) :
Code:

{tags:contains(By_series,
-Series-/{series}/{series_index:0>2s} - {title} \[{authors}\],
{authors:.1}/{authors}{series:| - |/{series_index:0>2s}} - {title})

Maybe I should not use tags ? Maybe I should use another function ? If any one could advise me, I would greatly thanks him/her.

Best regards,
Thomas

Viewing all articles
Browse latest Browse all 31491

Trending Articles