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
Built Distribution
File details
Details for the file wkmanager-0.1.3.tar.gz
.
File metadata
- Download URL: wkmanager-0.1.3.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.10.4 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c06db90a1080acae2ba72903661dffdbc70d0f7136a16d6e1b706e23f638e02d |
|
MD5 | 08e8094f4c7bd75252424101d85bef8e |
|
BLAKE2b-256 | ea36baae680ee87d25df5f8498863b9abd26cc202918b3c59892f83997d95b6f |
File details
Details for the file wkmanager-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: wkmanager-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.10.4 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1959b2badc21756428f0c4c79e7278548c9a377acdf167c0093a530f9e40dbb6 |
|
MD5 | 6575187410021710da035aaa4d5ce037 |
|
BLAKE2b-256 | 49029ac8ef6045a1ca069fef8eef904506d85aadd6e83a092c7b485a7c869d19 |