adsfolio.pdf.rename_settings

Canonical settings shared by PDF Rename interfaces.

class adsfolio.pdf.rename_settings.RenameSettings(template='{authors}_{bibcode}-{title}', author_format='surname_initials', max_authors=3, authors_when_truncated=1, char_policy='keep', author_separator='+', author_truncation_suffix='+')[source]

Bases: object

Reusable PDF Rename behavior.

Parameters:
  • template (str)

  • author_format (str)

  • max_authors (int)

  • authors_when_truncated (int)

  • char_policy (str)

  • author_separator (str)

  • author_truncation_suffix (str)

author_format: str = 'surname_initials'
author_separator: str = '+'
author_truncation_suffix: str = '+'
authors_when_truncated: int = 1
char_policy: str = 'keep'
classmethod from_mapping(payload, *, fallback=None)[source]

Normalize persisted values independently.

Parameters:
Returns:

Normalized settings.

Return type:

RenameSettings

max_authors: int = 3
template: str = '{authors}_{bibcode}-{title}'
to_mapping()[source]

Return the canonical JSON-compatible representation.

Return type:

dict[str, object]