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

Strive for complete paper titles at Wikisource #15

Open
Daniel-Mietchen opened this issue Jul 28, 2014 · 2 comments
Open

Strive for complete paper titles at Wikisource #15

Daniel-Mietchen opened this issue Jul 28, 2014 · 2 comments
Assignees

Comments

@Daniel-Mietchen
Copy link
Member

There is a maximum length for page titles at MediaWiki - 255 bytes according to https://www.mediawiki.org/wiki/Manual:Page_table#page_title . At the OAMI, we have opted to take the first 100 characters of a paper title before we append portions of the DOI.
This has worked fine so far.

For Wikisource, this is not the best approach, though, and I think we should try to accommodate as much of the article title in the page name. Example:
https://en.wikisource.org/wiki/Wikisource:WikiProject_Open_Access/Programmatic_import_from_PubMed_Central/A_cladistically_based_reinterpretation_of_the_taxonomy_of_two_Afrotropical_tenebrionid_genera_Ectateus_Koch_1956_and_Selinus_Mulsant_%26_Rey_1853_%28 .

@wrought
Copy link
Member

wrought commented Sep 14, 2014

I believe currently the first 255 bytes are used here and the rest are truncated:

233         if len(self.wikisource_title) > 255:
234                 self.wikisource_title = self.wikisource_title[:255]

Does that work?

@Daniel-Mietchen
Copy link
Member Author

I had put the 255 in there, and I think it works as expected. Not sure, though, how to handle cases where the title length exceeds that limit - perhaps best to move to a sensible page title manually.

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

No branches or pull requests

3 participants