Closed felixfontein closed 6 years ago
Ok, first working version.
(requires getnikola/nikola#3068 to work)
+1, not familiar with the section killing, so going with Kw's opinion there.
Now the tests also no longer fail, thanks to 42d6e2b38bf01976b44af29480f4e1c09f42c230.
@Kwpolska how do you want to proceed with this one?
(I guess for a v8 beta, this one should be available.)
Did you test this with YAML or other tricky edge cases?
Tags as list work now. What doesn't work are two-file posts, it seems. They don't work, because no extractor is stored for them. get_metadata_from_meta_file
simply doesn't return it. Is this intentional?
(YAML and TOML work fine, at least outside two-files.)
Fixed on master (getnikola/nikola@c2044a2e)
LOL, you were faster. I just pushed a branch for that :)
Now two-file posts work as well. METADATA_MAPPING
support also seems to work.
I think it should be fine now.
There were two bugs I found while fixing chriswarrick.com
:
Traceback (most recent call last):
File "/Users/kwpolska/virtualenvs/nikola/lib/python3.6/site-packages/doit/doit_cmd.py", line 172, in run
return command.parse_execute(args)
File "/Users/kwpolska/virtualenvs/nikola/lib/python3.6/site-packages/doit/cmd_base.py", line 127, in parse_execute
return self.execute(params, args)
File "/Users/kwpolska/git/nikola/nikola/plugin_categories.py", line 147, in execute
return self._execute(options, args)
File "/Users/kwpolska/website/plugins/upgrade_metadata_v8/upgrade_metadata_v8.py", line 105, in _execute
with io.open(fname, "r", encoding="utf-8-sig") as meta_file:
FileNotFoundError: [Errno 2] No such file or directory: 'posts/2017/09/02/spawning-subprocesses-smartly-and-securely.pl.rst'
I fixed both in commit f79b5c5.
Ah, that's what -sig
is for. I copied the open
command from post.py
(and changed it from read to write), and forgot to think about the encoding specified there... Sorry for that!
Thanks for fixing this.
Companions #3068.