Skip to content
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

Add 0.1 version of import_goodreads #105

Merged
merged 8 commits into from Sep 2, 2015
Merged

Add 0.1 version of import_goodreads #105

merged 8 commits into from Sep 2, 2015

Conversation

jjconti
Copy link
Contributor

@jjconti jjconti commented Sep 2, 2015

No description provided.

@jjconti
Copy link
Contributor Author

jjconti commented Sep 2, 2015

@jjconti
Copy link
Contributor Author

jjconti commented Sep 2, 2015

I thought of the idea (and I was going to open an issue) of having a generic import plugin from which this and other plugins can extend. It would not go away, just be refactored.

@ralsina
Copy link
Member

ralsina commented Sep 2, 2015

There is one, it's called BasicImport ImportMixin and you are already using it?

needs_config = False
doc_usage = "[options] rss_url"
doc_purpose = "import a Goodreads RSS"
cmd_options = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ImportMixin already has cmd_options so you don't need to repeat them here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I repeated it because I wanted to change the default value.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you probably don't want to default to "posts"... it will try to see if there's a "posts/conf.py" and do crazy stuff.

os.path.join(self.output_folder, slug + '.html'),
content)

@staticmethod
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you change post_date a few lines before, then you don't need this method at all


It:

* users the date the user ends to read the book as post date
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/users/uses/

jjconti added a commit that referenced this pull request Sep 2, 2015
Add 0.1 version of import_goodreads
@jjconti jjconti merged commit 37631cd into master Sep 2, 2015
for item in channel.entries:
self.process_item(item)

def process_item(self, item):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you move the if into import_posts you don't need to reimplement process_item

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants