Skip to main content

Lib to download wkhtmltopdf/wkhtmltoimage (wkhtmltox) based on OS.

Project description

Welcome to WkManager!

An unnoficial lib that facilitates the download of wkhtmltopdf/wkhtmltoimage (wkhtmltox), based on the characteristics of the system such as OS, architecture of the processor and also the availability of the software, also being possible to manually select this information.

WkManager

A class to validation of system characteristics to start downloading wkhtmltopdf/wkhtmltopdf (wkhtmltox) files from the official website (please consult directly for more information).

Attributes

Attribute Type
sys str
support str
arch str
extension str
  • system: the OS you are looking for, if None will be replace by checking your OS.

  • support: the support are looking for, like "XP", "Vista", "Debian", "Arch. if None wil be replaced by checking your OS.

  • arch: the OS architecture you are looking for, if None will be replace by checking your machine.

  • extension: the extension you looking for, if None will raise an ValueError with the avaliable extensions for you based on others attributes.

Example:

from wkmanager import WkManager

Wk = WkManager("Windows", "XP", "64bit", "7z")

If successful, you can use the get_wk method.

get_wk

Method to download the wkhtmltox files, being able to unzip it automatically (winrar required for 7z files).

Args

Attribute Type
path str
extract bool
winrar_path str
  • path: the path where the file will be saved, if None will saved on root.

  • extract: if True, the file will be extracted if it is 7z or Zip, by default it is False.

  • winrar_path: if a 7z file extension is selected and extract is True, it will be necessary to have Winrar installed and pass the path to winrar.exe for the file to be unpacked.

from wkmanager import WkManager

Wk = WkManager("Windows", "XP", "64bit", "7z")
wk_path = Wk.get_wk("wk_folder", True, "C:\Program Files\WinRAR\WinRAR.exe")

the if extract is True, the file will be full unpacked without internal folder.

Returns

Returns the path of folder with wk files.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wkmanager-0.1.1.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

wkmanager-0.1.1-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page