-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Deviant <112615715+DEViantUA@users.noreply.github.com>
- Loading branch information
Showing
32 changed files
with
1,811 additions
and
487 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
MIT License with Additional Restrictions: | ||
|
||
Copyright (c) 2024 Deviant | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
1. Redistributions of the Software in source code or any form must retain the | ||
above copyright notice, this list of conditions and the following additional | ||
restrictions. | ||
|
||
2. Redistributions of the Software are not allowed to be modified or | ||
distributed under a different name without prior written permission of the | ||
copyright holder. | ||
|
||
3. Redistributions of the Software or derivative works based on the Software | ||
are not allowed to be sold or used for commercial purposes without prior | ||
written permission of the copyright holder. | ||
|
||
4. Redistributions of the Software or derivative works based on the Software | ||
are not allowed to be copied, reproduced, or distributed without prior written | ||
permission of the copyright holder. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
MIT License with Additional Restrictions: | ||
Copyright (c) 2024 Deviant | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
1. Redistributions of the Software in source code or any form must retain the | ||
above copyright notice, this list of conditions and the following additional | ||
restrictions. | ||
2. Redistributions of the Software are not allowed to be modified or | ||
distributed under a different name without prior written permission of the | ||
copyright holder. | ||
3. Redistributions of the Software or derivative works based on the Software | ||
are not allowed to be sold or used for commercial purposes without prior | ||
written permission of the copyright holder. | ||
4. Redistributions of the Software or derivative works based on the Software | ||
are not allowed to be copied, reproduced, or distributed without prior written | ||
permission of the copyright holder. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
recursive-include starrailcard/src * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,77 @@ | ||
<p align="center"> | ||
<img src="https://raw.githubusercontent.com/DEViantUA/StarRailCard/main/Examples/image/starRailCardBanner.png" alt="Баннер"/> | ||
</p> | ||
|
||
[![PyPi](https://img.shields.io/pypi/v/starrailcard?label=PyPi)](https://pypi.org/project/starrailcard/) | ||
[![Telegram](https://img.shields.io/badge/Telegram-gray)](https://t.me/enkacardchat) | ||
[![License](https://img.shields.io/badge/License-MIT%20with%20Additional%20Restrictions-blue)](https://github.com/DEViantUA/StarRailCard/blob/main/LICENSE) | ||
![GitHub size](https://img.shields.io/github/repo-size/DEViantUA/StarRailCard?label=GitHub%20size&branch=main) | ||
![GitHub issues](https://img.shields.io/github/issues/DEViantUA/StarRailCard?label=Issues%20Count) | ||
![GitHub pull requests](https://img.shields.io/github/issues-pr/DEViantUA/StarRailCard?label=Pull%20Count) | ||
![GitHub stars](https://img.shields.io/github/stars/DEViantUA/StarRailCard?label=Stars%20Count) | ||
![GitHub forks](https://img.shields.io/github/forks/DEViantUA/StarRailCard?label=Forks%20Count) | ||
|
||
|
||
|
||
## StarRailCard | ||
<details> | ||
<summary> | ||
Description: | ||
</summary> | ||
<br> | ||
Welcome to the world of StarRailCard – your magical guide to the universe of Honkai Star Rail! This Python module provides the ability to create captivating character cards based on player data from Honkai Star Rail, obtained through their unique user identifiers (UIDs). StarRailCard streamlines the process of generating personalized character assembly cards, relying on the information provided by players. | ||
|
||
--- | ||
|
||
* **Easy Installation:** Set up StarRailCard in just a few simple steps to start using it without any hassle. | ||
* **Support for Other Programming Languages:** StarRailCard provides support for multiple programming languages, making it accessible to a wide range of developers. | ||
* **Color Adaptation:** StarRailCard seamlessly adapts its color scheme to match the user's custom images, ensuring a harmonious blend between character cards and background images. | ||
* **Flexible Configuration:** Customize StarRailCard according to your preferences with flexible configuration options, allowing you to tailor the generation process to your liking. | ||
* **Multi-Language Support:** With support for all languages available in the game, including Ukrainian, StarRailCard can generate character cards in any language. | ||
* **Personalized Character Cards:** Create character assembly cards based on specific player data to highlight their uniqueness and individuality. | ||
* **Animation Support:** StarRailCard supports animated elements, adding extra vitality and dynamism to character cards. | ||
* **Custom Fonts and Images:** Use custom fonts and character images to create character cards with a unique style. | ||
* **Instant Data Update and Retrieval:** Get updated character and player profile data instantly, ensuring the information on cards is always up-to-date. | ||
* **Integration with MiHoMo API Wrapper:** Seamlessly integrate StarRailCard with the MiHoMo API wrapper for quick access to game and character data. | ||
</details> | ||
|
||
* [Documentation](https://github.com/DEViantUA/StarRailCard/wiki/Documentation) | ||
* [View cards](https://github.com/DEViantUA/StarRailCard/wiki/View-cards) | ||
* [API](https://github.com/DEViantUA/StarRailCard/wiki/StarRailCard-API) | ||
* [Languages-Supported](https://github.com/DEViantUA/StarRailCard/wiki/Languages-Supported) | ||
* [F.A.Q.](https://github.com/DEViantUA/StarRailCard/wiki/F.A.Q.) | ||
* [PyPi](https://pypi.org/project/starrailcard/) | ||
* [Telegram](https://t.me/enkacardchat) | ||
* [Patreon](https://www.patreon.com/deviantapi) | ||
* [GitHub](https://github.com/DEViantUA/StarRailCard) | ||
|
||
### Api: | ||
> You can use the API to generate cards if you are using a different programming language. | ||
[Documentation](https://github.com/DEViantUA/StarRailCard/wiki/StarRailCard-API) | ||
|
||
## Installation: | ||
``` | ||
pip install starrailcard | ||
``` | ||
|
||
## Launch: | ||
``` python | ||
import asyncio | ||
import starrailcard | ||
|
||
async def main(): | ||
async with starrailcard.Card() as card: | ||
data = await card.creat(700649319, style=2) | ||
print(data) | ||
|
||
asyncio.run(main()) | ||
``` | ||
|
||
<details> | ||
<summary>Create a profile card.</summary> | ||
|
||
``` python | ||
import asyncio | ||
import starrailcard | ||
|
||
async def main(): | ||
async with starrailcard.Card() as card: | ||
data = await card.creat_profile(700649319) | ||
print(data) | ||
|
||
asyncio.run(main()) | ||
``` | ||
</details> | ||
|
||
# Thank the author for the code: | ||
* **Patreon**: https://www.patreon.com/deviantapi | ||
* **Ko-Fi**: https://ko-fi.com/dezzso | ||
<p align="center"> | ||
<img src="https://raw.githubusercontent.com/DEViantUA/StarRailCard/main/Examples/image/starRailCardBanner.png" alt="Баннер"/> | ||
</p> | ||
|
||
## StarRailCard | ||
<details> | ||
<summary> | ||
Description: | ||
</summary> | ||
<br> | ||
Welcome to the world of StarRailCard – your magical guide to the universe of Honkai Star Rail! This Python module provides the ability to create captivating character cards based on player data from Honkai Star Rail, obtained through their unique user identifiers (UIDs). StarRailCard streamlines the process of generating personalized character assembly cards, relying on the information provided by players. | ||
|
||
--- | ||
|
||
* **Easy Installation:** Set up StarRailCard in just a few simple steps to start using it without any hassle. | ||
* **Support for Other Programming Languages:** StarRailCard provides support for multiple programming languages, making it accessible to a wide range of developers. | ||
* **Color Adaptation:** StarRailCard seamlessly adapts its color scheme to match the user's custom images, ensuring a harmonious blend between character cards and background images. | ||
* **Flexible Configuration:** Customize StarRailCard according to your preferences with flexible configuration options, allowing you to tailor the generation process to your liking. | ||
* **Multi-Language Support:** With support for all languages available in the game, including Ukrainian, StarRailCard can generate character cards in any language. | ||
* **Personalized Character Cards:** Create character assembly cards based on specific player data to highlight their uniqueness and individuality. | ||
* **Animation Support:** StarRailCard supports animated elements, adding extra vitality and dynamism to character cards. | ||
* **Custom Fonts and Images:** Use custom fonts and character images to create character cards with a unique style. | ||
* **Instant Data Update and Retrieval:** Get updated character and player profile data instantly, ensuring the information on cards is always up-to-date. | ||
* **Integration with MiHoMo API Wrapper:** Seamlessly integrate StarRailCard with the MiHoMo API wrapper for quick access to game and character data. | ||
</details> | ||
|
||
* [Documentation](https://github.com/DEViantUA/StarRailCard/wiki/Documentation) | ||
* [View cards](https://github.com/DEViantUA/StarRailCard/wiki/View-cards) | ||
* [API](https://github.com/DEViantUA/StarRailCard/wiki/StarRailCard-API) | ||
* [Languages-Supported](https://github.com/DEViantUA/StarRailCard/wiki/Languages-Supported) | ||
* [F.A.Q.](https://github.com/DEViantUA/StarRailCard/wiki/F.A.Q.) | ||
* [PyPi](https://pypi.org/project/starrailcard/) | ||
* [Telegram](https://t.me/enkacardchat) | ||
* [Patreon](https://www.patreon.com/deviantapi) | ||
* [GitHub](https://github.com/DEViantUA/StarRailCard) | ||
|
||
### Api: | ||
> You can use the API to generate cards if you are using a different programming language. | ||
[Documentation](https://github.com/DEViantUA/StarRailCard/wiki/StarRailCard-API) | ||
|
||
## Installation: | ||
``` | ||
pip install starrailcard | ||
``` | ||
|
||
## Launch: | ||
``` python | ||
import asyncio | ||
import starrailcard | ||
|
||
async def main(): | ||
async with starrailcard.Card() as card: | ||
data = await card.creat(700649319, style=2) | ||
print(data) | ||
|
||
asyncio.run(main()) | ||
``` | ||
|
||
<details> | ||
<summary>Create a profile card.</summary> | ||
|
||
``` python | ||
import asyncio | ||
import starrailcard | ||
|
||
async def main(): | ||
async with starrailcard.Card() as card: | ||
data = await card.creat_profile(700649319) | ||
print(data) | ||
|
||
asyncio.run(main()) | ||
``` | ||
</details> | ||
|
||
# Thank the author for the code: | ||
* **Patreon**: https://www.patreon.com/deviantapi | ||
* **Ko-Fi**: https://ko-fi.com/dezzso |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
aiofiles | ||
aiohttp | ||
cachetools | ||
imageio | ||
moviepy | ||
more-itertools | ||
numpy | ||
Pillow | ||
pydantic | ||
beautifulsoup4 | ||
anyio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import setuptools | ||
import re | ||
|
||
with open('starrailcard/__init__.py') as f: | ||
""" | ||
Get version from utils.py | ||
Ref: https://github.com/Rapptz/discord.py/blob/52f3a3496bea13fefc08b38f9ed01641e565d0eb/setup.py#L9 | ||
""" | ||
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.M).group(1) | ||
|
||
setuptools.setup( | ||
name="starrailcard", | ||
version=version, | ||
author="DeviantUa", | ||
author_email="deviantapi@gmail.com", | ||
description= "This Python module provides the ability to create captivating character cards based on player data from Honkai Star Rail, obtained through their unique user identifiers (UIDs). StarRailCard streamlines the process of generating personalized character assembly cards, relying on the information provided by players.", | ||
long_description=open("README.md", "r", encoding="utf-8").read(), | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/DEViantUA/StarRailCard", | ||
keywords = ["honkai", "cards", "generation", "honkaistarraill","raill", "starraill", "builds", "honkairail", "honkai"] , | ||
packages=setuptools.find_packages(), | ||
classifiers=[ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
], | ||
install_requires=[ | ||
"pydantic", | ||
"aiohttp", | ||
"cachetools", | ||
"Pillow", | ||
"aiofiles", | ||
"imageio", | ||
"moviepy", | ||
"more-itertools", | ||
"numpy", | ||
"beautifulsoup4", | ||
"anyio" | ||
], | ||
python_requires=">=3.9", | ||
include_package_data=True | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,46 @@ | ||
""" | ||
MIT License with Additional Restrictions: | ||
Copyright (c) 2024 Deviant | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
1. Redistributions of the Software in source code or any form must retain the | ||
above copyright notice, this list of conditions and the following additional | ||
restrictions. | ||
2. Redistributions of the Software are not allowed to be modified or | ||
distributed under a different name without prior written permission of the | ||
copyright holder. | ||
3. Redistributions of the Software or derivative works based on the Software | ||
are not allowed to be sold or used for commercial purposes without prior | ||
written permission of the copyright holder. | ||
4. Redistributions of the Software or derivative works based on the Software | ||
are not allowed to be copied, reproduced, or distributed without prior written | ||
permission of the copyright holder. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
""" | ||
|
||
__title__ = 'StarRailCard.py' | ||
__author__ = 'DeviantUa' | ||
__version__ = '2.1.6' | ||
__license__ = 'MIT' | ||
__copyright__ = 'Copyright 2024-present DeviantUa' | ||
|
||
from .client import * | ||
from .utils import * | ||
from .src.tools.enums import * |
Oops, something went wrong.