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

OPDS generation command #284

Merged
merged 1 commit into from Dec 17, 2020
Merged

OPDS generation command #284

merged 1 commit into from Dec 17, 2020

Conversation

samwilson
Copy link
Member

Bug: T268424

@@ -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 = '' ) {
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

$this->api->setLang( $lang );
$provider = new BookProvider( $this->api, [ 'categories' => false, 'images' => false ] );

$exportPath = 'https://wsexport.toolforge.org/';
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep! Fixed.

@dayllanmaza
Copy link
Member

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

@dayllanmaza
Copy link
Member

I've created https://phabricator.wikimedia.org/T270441 to deal with the xhtml invalid format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants