adsfolio.user_profile

Global publication-profile settings for the current user.

class adsfolio.user_profile.UserProfile(orcid='', author_names=(), first_publication_year=None, last_publication_year=None, ads_library_ids=())[source]

Bases: object

Identity used to prefetch the current user’s ADS publications.

Parameters:
  • orcid (str)

  • author_names (tuple[str, ...])

  • first_publication_year (int | None)

  • last_publication_year (int | None)

  • ads_library_ids (tuple[str, ...])

ads_library_ids: tuple[str, ...] = ()
author_names: tuple[str, ...] = ()
first_publication_year: int | None = None
classmethod from_mapping(payload, *, fallback=None)[source]

Normalize canonical or legacy profile fields from a mapping.

Parameters:
Return type:

adsfolio.user_profile.UserProfile

last_publication_year: int | None = None
orcid: str = ''
publication_profile()[source]

Return the PDF-prefetch representation of this profile.

Return type:

PublicationProfile

to_mapping()[source]

Return the canonical JSON-compatible representation.

Return type:

dict[str, object]

adsfolio.user_profile.normalize_orcid(value)[source]

Return a checked ORCID iD, or an empty string for an empty value.

A pasted https://orcid.org/ URL is reduced to the iD. The last character is the ISO 7064 MOD 11-2 check digit defined by ORCID.

Raises:

ValueError – If the value does not have the ORCID form or its check digit fails.

Parameters:

value (str)

Return type:

str