core.update module

Update handling.

class core.update.DFFDUpdater[source]

Bases: core.update.Updater

Updater class for DFFD-hosted downloads.

get_check_url()[source]

Returns the URL used to check for updates.

get_direct_filename()[source]

Returns the filename that should be used for direct downloads.

get_direct_url()[source]

Returns a URL pointing directly to the update, for download by the program.

get_download_url()[source]

Returns a URL from which the user can download the update.

get_version()[source]

Returns the version listed at the update URL. Must be overridden by subclasses.

class core.update.JSONUpdater[source]

Bases: core.update.Updater

Updater class which uses a JSON object to locate the version (and optionally also the download URLs).

get_direct_filename()[source]

Returns the filename that should be used for direct downloads.

get_direct_url()[source]

Returns a URL pointing directly to the update, for download by the program.

get_download_url()[source]

Returns a URL from which the user can download the update.

get_version()[source]

Returns the version listed at the update URL. Must be overridden by subclasses.

class core.update.RegexUpdater[source]

Bases: core.update.Updater

Updater class which uses regular expressions to locate the version (and optionally also the download URLs).

get_direct_url()[source]

Returns a URL pointing directly to the update, for download by the program.

get_download_url()[source]

Returns a URL from which the user can download the update.

get_version()[source]

Returns the version listed at the update URL. Must be overridden by subclasses.

class core.update.Updater[source]

Bases: object

General class for checking for updates.

get_check_url()[source]

Returns the URL used to check for updates.

get_direct_filename()[source]

Returns the filename that should be used for direct downloads.

get_direct_url()[source]

Returns a URL pointing directly to the update, for download by the program.

get_download_url()[source]

Returns a URL from which the user can download the update.

get_version()[source]

Returns the version listed at the update URL. Must be overridden by subclasses.

update_needed()[source]

Checks if an update is necessary.

core.update.check_update()[source]

Checks for updates using the URL specified in PyLNP.json.

core.update.direct_download_pack()[source]

Directly download a new version of the pack to the current BASEDIR

core.update.download_df_baseline(immediate=False)[source]

Download the current version of DF from Bay12 Games to serve as a baseline, in LNP/Baselines/

core.update.extract_archive(fname, target)[source]

Extract the archive fname to dir target, avoiding explosions.

core.update.extract_new_pack(_, fname, bool_val)[source]

Extract a downloaded new pack to a sibling dir of the current pack.

core.update.next_update(days)[source]

Sets the next update check to occur in <days> days.

core.update.perform_update_check()[source]

Performs the actual update check. Runs in a thread.

core.update.prepare_updater()[source]

Returns an Updater object for the configured updater.

core.update.start_update()[source]

Launches a webbrowser to the specified update URL.

core.update.updates_configured()[source]

Returns True if update checking have been configured.