Skip to content

Issues with string interpolation #2220

Answered by toots
johnmoxley asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for your question. String interpolation is outdated and should be replaced by proper string getters now. I have added a ticket to fully remove it from the code base here: #2221

To answer your question here, the issues comes from the fact that this:

output.file(%mp3,
        output_base_path ^ output_filename % [("day",output_day()),("min",output_min())],
        input,
        reopen_when={0m or 30m})

Means that the line output_base_path ^ output_filename % [("day",output_day()),("min",output_min())] is executed only once, when the script is initially called. It is never executed again and, so, the suffix remains the same.

The solution is to make the whole thing a string getter, i.…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by johnmoxley
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@toots
Comment options

toots Mar 6, 2022
Maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants