rmcrackan / Libation

Libation: Liberate your Library
GNU General Public License v3.0
2.56k stars 138 forks source link

Unable to use name list formaters and text formaters in same tag #979

Open nlafevers opened 2 weeks ago

nlafevers commented 2 weeks ago

Describe the bug Unable to use name list formaters and text formaters in same tag. Trying to format the author name to be last name, first name, AND maxiumum of one author, AND all lowercase. The first two can be done together, but I don't see how to also make it lowercase.

To Reproduce <author[format({L},_{F}) max(1)][L]>-<series[L]>-<series#[00.00]>-<-if series><title short[L]>

  1. Go to Settings > Download/Decrypt > Edit Custom File Naming
  2. Enter in the textbox: <author[format({L},_{F}) max(1)][L]>-<series[L]>-<series#[00.00]>-<-if series><title short[L]>
  3. See error in preview (or in downloaded files)

Expected behavior Format author name in all lowercase, while also limiting to one author and displaying last name first.

Platform Windows 10

rmcrackan commented 1 week ago

Sorry for my confusing formats. <-if series> must be used as part of a pair: <if series-> ... <-if series> and the stuff in between is what is printed only when the book is part of a series. I assume you want something similar to: <author[format({L},_{F}) max(1)][L]><if series->-<series[L]>-<series#[00.00]>-<-if series><title short[L]>.

For a non-series book, the above will act like this

<author[format({L},_{F}) max(1)][L]><title short[L]>.

And for a series book it will act like this

<author[format({L},_{F}) max(1)][L]>-<series[L]>-<series#[00.00]>-<title short[L]>.

nlafevers commented 1 week ago

The tags are working for me. It is trying to combine formatters that isn't working. I can get text to be all lowercase, with the exception of the author. When I try to use the author name ordering formatter with the lowercase formatter, it doesn't work. Is my syntax wrong? <author[format({L},_{F}) max(1)][L]>

rmcrackan commented 6 days ago

Thank you for clarifying. You're correct; currently format() and the simple lower-case formatters are not combine-able in this way. I'll reopen this ticket and change to an enhancement.

I can't promise when/if I'll get around to it. Every time we add a feature to the naming templates, it adds considerable complexity and takes it one step closer to basically being a bad programming language. This is not a destination I'm not comfortable with.