User Interface#

Rich and plain-text terminal UIs.

class litsync.ui.UI[source]#

Bases: object

Plain-text fallback UI (no colors, no progress bars).

planning(name)[source]#
Parameters:

name (str)

planned(total, sources)[source]#
Parameters:
run_progress(total)[source]#
Parameters:

total (int)

extract_progress(total)[source]#
Parameters:

total (int)

extract(rel_path)[source]#
Parameters:

rel_path (str)

summary(started, finished, stats, per_source, mirror, source_urls, bytes_downloaded, articles_downloaded)[source]#
Parameters:
  • started (str)

  • finished (str)

  • stats (dict)

  • per_source (dict)

  • mirror (dict)

  • source_urls (dict)

  • bytes_downloaded (int)

  • articles_downloaded (int)

extract_summary(started, finished, stats)[source]#
Parameters:
class litsync.ui.RichUI[source]#

Bases: UI

Rich-based progress bars and tables.

planning(name)[source]#
Parameters:

name (str)

planned(total, sources)[source]#
Parameters:
run_progress(total)[source]#
Parameters:

total (int)

extract_progress(total)[source]#
Parameters:

total (int)

extract(rel_path)[source]#
Parameters:

rel_path (str)

summary(started, finished, stats, per_source, mirror, source_urls, bytes_downloaded, articles_downloaded)[source]#
Parameters:
  • started (str)

  • finished (str)

  • stats (dict)

  • per_source (dict)

  • mirror (dict)

  • source_urls (dict)

  • bytes_downloaded (int)

  • articles_downloaded (int)

extract_summary(started, finished, stats)[source]#
Parameters:
litsync.ui.print_banner()[source]#
Return type:

None

litsync.ui.new_src_stats()[source]#
Return type:

dict