adsfolio.gui.config

Persistent configuration for the adsfolio desktop application.

class adsfolio.gui.config.GuiConfig(version=4, roots=<factory>, last_root=None, last_view='all', combined_view=False, combined_roots=None, search_exact=False, search_wildcards=False, search_highlight=True, export_format='bibtex', export_exclude_fields=<factory>, search_fields=<factory>, watch_sound='silent', window_geometry=None, window_state=None, column_widths=<factory>, column_fonts=<factory>, column_alignments=<factory>, table_column_order=<factory>, hidden_table_columns=<factory>, detail_fonts=<factory>, timestamp_format='iso8601', sort_column='first_seen_at', sort_descending=True, secondary_sort_column=None, tertiary_sort_column=None, expand_abstracts=False, table_row_height=None, detail_row_spacing=None, detail_label_bold=True, detail_label_width=None, detail_compact_rows=True, sidebar_visible=True, detail_visible=True, check_updates_automatically=True, skipped_update_version=None, remembered_recheck_prompt_version=None, show_edit_buttons=True, show_lock_buttons=True, filename_click_action='open', link_activation='double', pdf_viewer_command=None, web_browser_command=None, splitter_sizes=<factory>, detail_row_order=<factory>, detail_hidden_rows=<factory>, citation_styles=<factory>, identify_scopes=<factory>, rename_scopes=<factory>)[source]

Bases: object

Serializable GUI preferences and registered library roots.

Parameters:
check_updates_automatically: bool = True
citation_styles: list[adsfolio.citations.CitationStyle]
column_alignments: dict[str, str]
column_fonts: dict[str, dict[str, Any]]
column_widths: dict[str, int]
combined_roots: list[str] | None = None
combined_view: bool = False
detail_compact_rows: bool = True
detail_fonts: dict[str, dict[str, Any]]
detail_hidden_rows: list[str]
detail_label_bold: bool = True
detail_label_width: int | None = None
detail_row_order: list[str]
detail_row_spacing: int | None = None
detail_visible: bool = True
expand_abstracts: bool = False
export_exclude_fields: list[str]
export_format: str = 'bibtex'
filename_click_action: str = 'open'
hidden_table_columns: list[str]
identify_scopes: dict[str, str]
last_root: str | None = None
last_view: str = 'all'
pdf_viewer_command: str | None = None
remembered_recheck_prompt_version: str | None = None
rename_scopes: dict[str, str]
roots: list[adsfolio.gui.config.RootEntry]
search_exact: bool = False
search_fields: list[str]
search_highlight: bool = True
search_wildcards: bool = False
secondary_sort_column: str | None = None
show_edit_buttons: bool = True
show_lock_buttons: bool = True
sidebar_visible: bool = True
skipped_update_version: str | None = None
sort_column: str = 'first_seen_at'
sort_descending: bool = True
splitter_sizes: list[int]
table_column_order: list[str]
table_row_height: int | None = None
tertiary_sort_column: str | None = None
timestamp_format: str = 'iso8601'
version: int = 4
watch_sound: str = 'silent'
web_browser_command: str | None = None
window_geometry: str | None = None
window_state: str | None = None
class adsfolio.gui.config.RootEntry(path, label='', recursive=False, watch_on_start=False, auto_process_new_pdfs=False)[source]

Bases: object

A PDF library root registered in the GUI.

Parameters:
  • path (str)

  • label (str)

  • recursive (bool)

  • watch_on_start (bool)

  • auto_process_new_pdfs (bool)

auto_process_new_pdfs: bool = False
label: str = ''
path: str
recursive: bool = False
watch_on_start: bool = False
adsfolio.gui.config.config_path()[source]

Return the path of the GUI configuration file.

Return type:

pathlib.Path

adsfolio.gui.config.load_config()[source]

Load GUI preferences, returning defaults when unavailable or invalid.

Returns:

Loaded preferences, or a default configuration when the file is missing, malformed, or unreadable.

Return type:

GuiConfig

adsfolio.gui.config.save_config(config)[source]

Atomically save GUI preferences and return the destination path.

Parameters:

config (GuiConfig) – Preferences to serialize.

Returns:

The path of the saved configuration.

Return type:

pathlib.Path