Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Signed-off-by: Deviant <[email protected]>
  • Loading branch information
DEViantUA authored Apr 29, 2024
1 parent 4162590 commit 6886cbc
Show file tree
Hide file tree
Showing 32 changed files with 1,811 additions and 487 deletions.
68 changes: 34 additions & 34 deletions LICENSE
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.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
recursive-include starrailcard/src *
165 changes: 77 additions & 88 deletions README.md
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
23 changes: 12 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "starrailcard"
version = "2.0.0"
version = "2.1.5"
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."
authors = ["DEViantUA <[email protected]>"]
license = "MIT License with Additional Restrictions"
Expand All @@ -13,17 +13,18 @@ homepage = "https://github.com/DEViantUA/StarRailCard"
keywords = ["honkai", "cards", "generation", "honkaistarraill","raill", "starraill", "builds", "honkairail", "honkai"]

[tool.poetry.dependencies]
Pillow = "^10.0.1"
Pillow = "*"
python = "^3.9"
aiofiles = "^0.7.0"
aiohttp = "^3.8.1"
cachetools = "^5.3.1"
imageio = "^2.14.0"
moviepy = "^1.0.3"
more-itertools = "^8.9.0"
numpy = "^1.21.2"
pydantic = "^1.9.0"
beautifulsoup4 = "^4.12.3"
aiofiles = "*"
aiohttp = "*"
cachetools = "*"
imageio = "*"
moviepy = "*"
more-itertools = "*"
numpy = "*"
pydantic = "*"
beautifulsoup4 = "*"
anyio = "*"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
11 changes: 11 additions & 0 deletions requirements.txt
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
42 changes: 42 additions & 0 deletions setup.py
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="[email protected]",
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
)
43 changes: 43 additions & 0 deletions starrailcard/__init__.py
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 *
Loading

0 comments on commit 6886cbc

Please sign in to comment.