Wrapper module for enkanetwork.py for creating character cards.
Project description
EnkaNetworkCard
Wrapper for EnkaNetwork.py creation to create character cards in Python.
Navigation
- Installation
- Dependencies
- Launch
- Description of arguments
- Languages Supported
- Sample Results
Installation:
pip install enkanetworkcard
Or you can copy the given repository.
Dependencies:
Dependencies that must be installed for the library to work:
- googletrans-3.1.0a0
- Pillow
- requests
- io
- math
- threading
- datetime
- random
- enkanetwork
- logging
Launch:
from enkanetworkcard import encbanner
ENC = encbanner.EnkaGenshinGeneration()
result = ENC.start(uids = 724281429)
print(result)
Description of arguments:
Main class: EnkaGenshinGeneration
Contains the following arguments lang
,img
,charterImg
,name
,adapt
,randomImg
,hide
,dowload
Class argument description::
lang
- Takes one value to define the language. Supported languages are listed below in the documentation. The default is Russian.- Values: str
- Example str:
EnkaGenshinGeneration(lang = "en")
img
- If you want to use your image on the card, then pass this argument.- Values str: Image link or the path to the file.
- Values PIL.ImageFile: Image opened with Image.open()
- Values list: Image link, the path to the file or PIL.ImageFile
- Example str the path to the file:
EnkaGenshinGeneration(img = "img.png")
- Example str image link:
EnkaGenshinGeneration(img = "https//...image.png")
- Example PIL.ImageFile:
EnkaGenshinGeneration(img = Image.open("img.png"))
- Example list:
EnkaGenshinGeneration(img = [Image.open("img.png"), "img.png", "https//...image.png"])
- list only works with the argument:randomImg
.
charterImg
- Give each character a custom image.- Values dict: Can take all values from the img argument except list.
- Example dict:
EnkaGenshinGeneration(charterImg = {"Klee": Image.open("img.png"), "Albedo": "img.png", "Xiao": "https//...image.png"})
name
- Needed if you want to get certain characters.- Values: str
- Example str one character:
EnkaGenshinGeneration(name = "Klee")
- Example str two or more characters:
EnkaGenshinGeneration(name = "Klee, Albedo, ...")
adapt
- Adapt background to custom image.- Values: bool
- Example bool:
EnkaGenshinGeneration(img = "img.png", adapt = True)
randomImg
- Random selection of custom images from the list.- Values: bool
- Example bool:
EnkaGenshinGeneration(img = [Image.open("img.png"), "img.png"], randomImg = True)
- If img is not a list, then randomImg is ignored.
hide
- Hide the UID on the character card.- Values: bool
- Example bool:
EnkaGenshinGeneration(hide = True)
dowload
- Will return ready images for further work with them. (If not specified, then the finished results will be saved in the directory of the executable file in the folder and return None:EnkaImg
)- Values: bool
- Example bool:
EnkaGenshinGeneration(dowload = True)
The main function of the class: start
takes a uids
argument
Function argument description::
uids
- Game UID in the game Genshin Impact.- Values: int, str
- Example int:
EnkaGenshinGeneration().start(uids = 757562748)
- Example str one UID:
EnkaGenshinGeneration().start(uids = "757562748")
- Example str two or more UID:
EnkaGenshinGeneration().start(uids = "757562748,544523587,874385763")
Languages Supported
Languege | Code |
---|---|
English | en |
русский | ru |
Tiếng Việt | vi |
ไทย | th |
português | pt |
한국어 | kr |
日本語 | jp |
中文 | zh |
Indonesian | id |
français | fr |
español | es |
deutsch | de |
Taiwan | cht |
Chinese | chs |
Sample Results:
The result of a custom images and adaptation.
Usual result.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
enkanetworkcard-0.1.4.tar.gz
(12.8 MB
view details)
Built Distribution
File details
Details for the file enkanetworkcard-0.1.4.tar.gz
.
File metadata
- Download URL: enkanetworkcard-0.1.4.tar.gz
- Upload date:
- Size: 12.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.15 CPython/3.6.0 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51a8cc8928f17d30429b3c745ad89163b0d805e6a29a364e4ab22599ce416be1 |
|
MD5 | cbc01dc5f19491972a5f049757e4fbcf |
|
BLAKE2b-256 | d2261894edfd91e23ba53661e2b6e27210a97136dee1ae08f123d1b320283813 |
File details
Details for the file enkanetworkcard-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: enkanetworkcard-0.1.4-py3-none-any.whl
- Upload date:
- Size: 12.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.15 CPython/3.6.0 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e9f6ab63a9e66db45300ffe491b52afc0d96a717ae00b46597ad69792b74197 |
|
MD5 | e59a9c41e9a809a420edeeac94c3ce79 |
|
BLAKE2b-256 | 21ab616567864a3bf9f235e0189471bf271c04622ca6ea9c5ce5fa3a6602fb93 |