Hey,
It seems relatively easy to export any section of a Wikisource book with the "download" button, but there is no way to export just the preface / title page. If you press "download" on the title page, the section name is just the book name, so you download the entire book instead of just the preface.
For example: https://en.wikisource.org/wiki/Little_Essays_of_Love_and_Virtue
Is this intentional? Is there any good way to export the plaintext of just the preface, via some command / functionality / API?
Thank you, Julius
The WS Export tool can't export just a single page, no.
You could get the HTML from e.g. https://en.wikisource.org/api/rest_v1/page/html/Little_Essays_of_Love_and_Vi... and process it into the form you want. I suspect that most plain text forms of those title and contents pages will not look great though, as they're often full of different font sizes, images, tables, etc.
Out of interest, what are you trying to do? Perhaps there's another way to get what you need.
—Sam
On 22/9/22 01:47, Julius Hamilton wrote:
Hey,
It seems relatively easy to export any section of a Wikisource book with the "download" button, but there is no way to export just the preface / title page. If you press "download" on the title page, the section name is just the book name, so you download the entire book instead of just the preface.
For example: https://en.wikisource.org/wiki/Little_Essays_of_Love_and_Virtue
Is this intentional? Is there any good way to export the plaintext of just the preface, via some command / functionality / API?
Thank you, Julius
Mediawiki-api mailing list -- mediawiki-api@lists.wikimedia.org To unsubscribe send an email to mediawiki-api-leave@lists.wikimedia.org
Thanks.
Right now I am trying to download sections of WikiSource texts from a command line (because I want to translate them mobilely in Termius) and reupload the translations to Wikisource.
Explored using ws-export, looks good but so far a little stuck on the installation.
As for the API I am still learning the ropes. For example this command also does not return text as I was hoping:
https://de.wikisource.org/w/api.php?action=query&prop=revisions&rvpr...
Is it just impossible to use the API on Wikisource?
What about “parse”?
Thanks, Julius
On Thu 22. Sep 2022 at 06:34, Sam Wilson sam@samwilson.id.au wrote:
The WS Export tool can't export just a single page, no.
You could get the HTML from e.g.
https://en.wikisource.org/api/rest_v1/page/html/Little_Essays_of_Love_and_Vi... and process it into the form you want. I suspect that most plain text forms of those title and contents pages will not look great though, as they're often full of different font sizes, images, tables, etc.
Out of interest, what are you trying to do? Perhaps there's another way to get what you need.
—Sam
On 22/9/22 01:47, Julius Hamilton wrote:
Hey,
It seems relatively easy to export any section of a Wikisource book with the "download" button, but there is no way to export just the preface / title page. If you press "download" on the title page, the section name is just the book name, so you download the entire book instead of just the preface.
For example: https://en.wikisource.org/wiki/Little_Essays_of_Love_and_Virtue
Is this intentional? Is there any good way to export the plaintext of just the preface, via some command / functionality / API?
Thank you, Julius
Mediawiki-api mailing list -- mediawiki-api@lists.wikimedia.org To unsubscribe send an email to mediawiki-api-leave@lists.wikimedia.org
Mediawiki-api mailing list -- mediawiki-api@lists.wikimedia.org To unsubscribe send an email to mediawiki-api-leave@lists.wikimedia.org
mediawiki-api@lists.wikimedia.org