Metadata-Version: 2.1
Name: hsrcard
Version: 1.0.3
Summary: Module for generating Honkai Star Rail character cards
Home-page: https://github.com/DEViantUA/StarRailCard
Keywords: honkai,cards,generation,honkaistarraill,raill,starraill,builds
Author: None
Requires-Python: >=3.9,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: Pillow (>=10.0.1,<11.0.0)
Requires-Dist: honkairail (>=1.1.1,<2.0.0)
Project-URL: Repository, https://github.com/DEViantUA/StarRailCard
Description-Content-Type: text/markdown

<p align="center">
 <img src="https://raw.githubusercontent.com/DEViantUA/HSRCard/main/Documentation/Banner.png" alt="Banner"/>
</p>

# HSRCard
Add-on module for generating Honkai Star Rail character cards in EnkaNetwork style

* [EnkaNetwork](https://enka.network/)
* [MiHoMo](https://discord.gg/SXwqeEqeEY)
* [StarRailCard](https://github.com/DEViantUA/StarRailCard)

---
* Python 3.9 
* Pillow 10.0.1 
* cachetools 5.3.1
* honkairail 1.1.0
---

## Installation:
```
pip install hsrcard
```

## Launch:
```py
# Import necessary modules
from hsrcard import hsr
import asyncio

# Define the main function that fetches information about a player using a specified UID
async def main(uid):
  async with hsr.HonkaiCard() as hmhm:
    result = await hmhm.creat(uid)
  print(result)

asyncio.run(main(700649319))
```

<details>
<summary>print(result)</summary>

  * Output explanation:
  * settings:
   * uid=800293940 - UID (unique identifier) of the player is 800293940.
   * lang='en' - the game language is set to English.
   * hide=False - player profile information is not hidden.
   * save=True - information saving setting is enabled.
   * background=None - no background image.
  ---
  * player:
  * uid='700649319' - player's UID is 700649319.
  * nickname='Korzzex' - player's nickname is "Korzzex".
  * level=69 - player's level is 69.
  * avatar - information about the player's avatar:
  * id='201212' - avatar identifier.
  * name='Jingliu' - avatar name is "Jingliu".
  * icon - URL of the avatar image.
  * signature="----".
  * friend_count=39 - the player has 39 friends.
  * world_level=6 - player's world level is 6.
  ---
  * card (list of player's character cards):
  * Card(id='1212', name='Jingliu', rarity=5, card=<PIL.Image.Image ...): Information about the "Jingliu" character card:
  * id='1212' - card identifier.
  * name='Jingliu' - character name.
  * rarity=5 - card rarity is 5.
  * card - card image.
  * (similar entries for other character cards).
  ---
  * name - list of character names separated by commas: "Jingliu, Silver Wolf, Seele, Luocha".
  ---
  * id - list of character card identifiers separated by commas: "1212, 1006, 1102, 1203".
</details>


# Example
<details>
<summary>Example Splash Art</summary>
  
[![Adaptation][1]][1]
  
[1]: https://raw.githubusercontent.com/DEViantUA/HSRCard/main/Documentation/splash.png
  
</details>

<details>
<summary>Example User Art</summary>
  
[![Adaptation][2]][2]

[2]: https://raw.githubusercontent.com/DEViantUA/HSRCard/main/Documentation/adapt.png

</details>


## Languages Supported
| Languege    |  Code   | Languege    |  Code   | Languege    |  Code   |
|-------------|---------|-------------|---------|-------------|---------|
|  English    |     en  |  русский    |     ru  |  Chinese    |    chs  |
|  Tiếng Việt |     vi  |  ไทย        |     th  | Taiwan     |    cht  |
|  português  |     pt  | 한국어      |     kr  | deutsch    |     de  |
|  日本語      |     jp  | 中文        |     zh  | español    |     es  |
|  中文        |     zh  | Indonesian |     id  | français   |     fr  |
|  Українська        |     ua  |  |       |    |       |


# Thank the author for the code: 
* **Patreon**: https://www.patreon.com/deviantapi


