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

Zenodo Hardcover ISBN can't be gathered from \ISBNhardcover #19

Open
kopeckyf opened this issue Feb 17, 2021 · 2 comments
Open

Zenodo Hardcover ISBN can't be gathered from \ISBNhardcover #19

kopeckyf opened this issue Feb 17, 2021 · 2 comments
Assignees
Labels
zenodo Issues concerning zenodo.py and registerzenodo.py

Comments

@kopeckyf
Copy link
Contributor

zenodo.py seems to depend on this format:

\renewcommand{\lsISBNhardcover}{978-3-.....}

This could become an issue since we use the command \ISBNhardcover[]{} since commit langsci/langscibook@48e29e5 in order to accommodate EAN+2 ISBN addons.

zenodo.py does not recognise ISBNs from \ISBNhardcover[]{} and results in an error.

@kopeckyf kopeckyf added the zenodo Issues concerning zenodo.py and registerzenodo.py label Feb 17, 2021
@Glottotopia
Copy link
Contributor

For Zenodo, the main functionality is to point to the digital ISBN, since this is, well, digital.
The hardcover ISBN is also related, true, but I cannot see any practical use for that.
The fact that we fail to retrieve and hence fail to link the hardcover ISBN will probably have zero consequences.

@kopeckyf
Copy link
Contributor Author

kopeckyf commented Sep 7, 2021

My bug report was not very clear.

langscibook.cls defines \ISBNdigital, \ISBNhardcover, etc.:

https://github.com/langsci/langscibook/blob/bcd22af301323f44c47a57deac2a3ae40f3e5f5e/langscibook.cls#L82

When these are used in a localmetadata.tex to configure the ISBNs of the book, registerzenodo.py does not work, because it seems to be looking for \renewcommand{\lsISBNhardcover}, which is a different way of inputting the ISBN. The error message is this:

Traceback (most recent call last):
  File "/home/felix/Github/280/registerzenodo.py", line 30, in <module>
    book = zenodo.Book(extracommunities=extracommunities)
  File "/home/felix/Github/pypi/langsci/langsci/zenodo.py", line 73, in __init__
    self.getBookMetadata()
  File "/home/felix/Github/pypi/langsci/langsci/zenodo.py", line 112, in getBookMetadata
    self.digitalisbn = ISBNP.search(localmetadata).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

The issue is that sometimes you want to input the ISBN via the user-level command \ISBNhardcover instead of going through \renewcommand{\lsISBNhardcover}. One example where this happens is when you want to functionalities of \ISBNhardcover such as giving the EAN+2 as optional arguments.

So it would be good if registerzenodo.py could scan for either the user-level command or the \renewcommand way of providing ISBNs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
zenodo Issues concerning zenodo.py and registerzenodo.py
Projects
None yet
Development

No branches or pull requests

2 participants