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
OPDS generation command #284
Conversation
@@ -40,18 +40,23 @@ class OpdsBuilder { | |||
* @param string $lang | |||
* @param string $exportBasePath | |||
*/ | |||
public function __construct( BookProvider $bookProvider, $lang, $exportBasePath = '' ) { | |||
public function __construct( BookProvider $bookProvider, Api $api, string $lang, $exportBasePath = '' ) { |
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.
Nit: missing docs for Api $api
param
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.
Done.
src/Command/OpdsCommand.php
Outdated
$this->api->setLang( $lang ); | ||
$provider = new BookProvider( $this->api, [ 'categories' => false, 'images' => false ] ); | ||
|
||
$exportPath = 'https://wsexport.toolforge.org/'; |
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.
Should this be https://wsexport.wmflabs.org
instead?
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.
Yep! Fixed.
One thing I noticed is that the xhtml format fails but I guess that's beyond the scope of this patch. I had a couple of nits but I'm happy to merge this and address those later on so things go back to working like before |
Bug: T268424
4c09039
to
62bbd8b
Compare
I've created https://phabricator.wikimedia.org/T270441 to deal with the xhtml invalid format |
Bug: T268424