API#

Typically use for urlfwd is through the Gh actions or CLI

This API is also useful for extending the CLI. Many of these functions offer flexible processing of basic information that could be used to create additional CLI functionality beyond what is already implemented.

Generators#

urlfwd.genpage.create_landing(config_in, base_path, full_dict=None, index=False)#

create a landing page at base_path/index.html

Parameters config_in : dictionary

configurations to overwrite defaults with

base_pathstrign or path

where to write the index.html file

full_dictdictionary

from links.yml for making index

indexbool

creat index

urlfwd.genpage.files_from_dict(pages_to_create, overwrite=True, base_path='docs', genQRs=False, qrTOC='gallery', logging=False, config_in=None)#

given a dictionary, create html files

Parameters:
  • pages_to_create (dictionary) – keys are names of pages, values are urls to redirect to

  • overwrite (bool) – overwrite files that exist

  • base_path (path or string) – where to store generated site default(docs)

  • logging (bool) – verbose mode or not

  • config_in (dict) – configurations to overwrite default with

urlfwd.genpage.qrs_from_dict(pages_to_create, overwrite=True, flyer_pages=True, flyer_template_input='default', base_path='docs', logging=False, config_in=None)#

given a dictionary, create qr codes to each url and a flyer page for each

Parameters:
  • pages_to_create (dictionary) – keys are names of pages, values are urls to redirect to

  • overwrite (bool) – overwrite files that exist

  • flyer_pages (bool) – to create an html file for each QR or not

  • flyer_template_input (string) – name of a stock flyer template (default, detailed) or html to use as the tempalte

  • base_path (path or string) – where to store generated site default(docs)

  • logging (bool) – verbose mode or not

  • config_in (dict) – configurations to overwrite default with