-
Notifications
You must be signed in to change notification settings - Fork 462
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
Implement #2262 #2292
Implement #2262 #2292
Conversation
@@ -827,7 +827,7 @@ def __init__(self, **config): | |||
# Set persistent state facility | |||
self.state = Persistor(os.path.join('state_data.json')) | |||
|
|||
# Set cache facility | |||
# Set cache 0facility |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what’s a 0facility?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a "Roberto has really fat fingers"
"tags": ','.join(tags), | ||
} | ||
meta.update(other_meta) | ||
if self.onefile: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not pass self.onefile
as another argument to write_post
, so that all importer plugins can use write_post
for both single and non-single file output? Now all importer plugins which want to support both ways have to do such a rather long and tedious if
-then
-else
statement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because compilers don't support saving in 2 files and I don't want to chase
that right now.
El mar., mar. 8, 2016 19:38, Felix Fontein notifications@github.com
escribió:
In nikola/plugins/command/import_wordpress.py
#2292 (comment):
title, meta_slug, post_date, description, tags, **other_meta)
self.write_content(
os.path.join(self.output_folder,
out_folder, out_content_filename),
content,
rewrite_html)
meta = {
"title": title,
"slug": meta_slug,
"date": post_date,
"description": description,
"tags": ','.join(tags),
}
meta.update(other_meta)
if self.onefile:
Why not pass self.onefile as another argument to write_post, so that all
importer plugins can use write_post for both single and non-single file
output? Now all importer plugins which want to support both ways have to do
such a rather complex if-then-else statement.—
Reply to this email directly or view it on GitHub
https://github.com/getnikola/nikola/pull/2292/files#r55441307.
Duly noted the problem of classmethods and the need to make write_post support both 1 and 2-file saves but those problems are not really related to this branch. Merging. |
Adds the --one-file option to the wordpress importer to make it use one-file posts.