-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tagging with date_format #65
Comments
Hi, thanks for your report. You were right and I was wrong. It should be
to avoid interpolation errors, of course. Changing this in the config file, this seems to work in my tests. What is the problem you are seeing? Manolo |
You are correct, this does work. My problem was the config setting: So, this is a very minor issue caused by trying to tag with a modified date/time. |
Right, so the issue here is that, once you modify the date format, stagger complains, isn't it? One possible solution is to have a |
For my purposes, I am happy to not include the I think your solution makes the most sense. This is far from a critical item, but maybe could be introduced in the future. |
I am attempting to download a file using a custom name of the format: YYYYMMDD-filename.mp3
Here are the relevant settings:
date_format = %Y%m%d
file_to_tag = {date}-{filename_title}.mp3
downloadhandler = wget {link} -O {directory}/{date}-{filename_title}.mp3
When I run this, I receive the following error:
Traceback (most recent call last):
File "/usr/bin/greg", line 11, in
load_entry_point('Greg==0.4.7', 'console_scripts', 'greg')()
File "/usr/lib/python3.5/site-packages/greg/parser.py", line 138, in main
function(vars(args))
File "/usr/lib/python3.5/site-packages/greg/commands.py", line 176, in sync
downloaded = feed.download_entry(entry)
File "/usr/lib/python3.5/site-packages/greg/classes.py", line 325, in download_entry
placeholders = aux.check_directory(placeholders)
File "/usr/lib/python3.5/site-packages/greg/aux_functions.py", line 142, in check_directory
subdnametemplate, placeholders)
File "/usr/lib/python3.5/site-packages/greg/aux_functions.py", line 284, in substitute_placeholders
date=placeholders.date_string(),
File "/usr/lib/python3.5/site-packages/greg/classes.py", line 373, in date_string
date_format = self.feed.retrieve_config("date_format", "%Y-%m-%d")
File "/usr/lib/python3.5/site-packages/greg/classes.py", line 135, in retrieve_config
answer = self.config.get(section, value, fallback=default)
File "/usr/lib/python3.5/configparser.py", line 797, in get
d)
File "/usr/lib/python3.5/configparser.py", line 393, in before_get
self._interpolate_some(parser, option, L, value, section, defaults, 1)
File "/usr/lib/python3.5/configparser.py", line 443, in _interpolate_some
"found: %r" % (rest,))
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%Y%m%d'
The text was updated successfully, but these errors were encountered: