-
Notifications
You must be signed in to change notification settings - Fork 80
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
added schedule and items commands #66
Conversation
@@ -24,6 +24,8 @@ def cli(): | |||
"deploy_reqs": [], | |||
"logout": [], | |||
"version": [], | |||
"items": ["hubstorage"], |
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.
hubstorage should be a required dependency, and shipped with shub tool.
These commands should always work, not like deploy that requires scrapy to be present.
@@ -0,0 +1,45 @@ | |||
from ConfigParser import NoSectionError, NoOptionError |
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.
In Python 3 ConfigParser has been renamed to configparser.
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.
I'd recommend using configparser
from six
.
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.
When our dependencies add py3 support we might do the same for shub
; so I think we should keep new code py3-compliant.
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.
+1 @bertinatto
|
||
@click.command(help='Schedule a spider to run on Scrapy Cloud') | ||
@click.pass_context | ||
@click.argument("spider", type=click.STRING) |
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.
Just a nitpick, but I think we should be consistent in the use of single or double quotes.
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.
👍
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.
wow, that's a real nitpick. :D
I stopped worrying about single quotes vs double quotes when I stopped doing Perl and PHP. :)
Nice work, @stummjr ! |
added schedule and items commands
Thanks @stummjr, well done indeed! ;D |
+1 |
Thank you guys for the help! |
The
shub schedule
andshub items
commands were added. Here is how they work:shub schedule
Schedule a spider for execution. Example:
shub items
Fetch items from a given job. Example: