Metadata-Version: 2.1
Name: hsr-pic-parcer
Version: 1.0.1
Summary: parser to get images from hsr mana
Home-page: https://github.com/vano979797/hsr_pic_parser
Author: vano979797
Author-email: vano979797@gmail.com
Project-URL: Documentation, https://github.com/vano979797/hsr_pic_parser/blob/4a0309d617f93c56714fe206753119f690109219/README.md
Keywords: python parse hsr
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENCE.txt
Requires-Dist: requests >=2.25.1
Requires-Dist: beautifulsoup4 >=4.12.3

# hsr_pic_parser

## Introduction

This is a Python library for getting pictures of characters, light cones, relics and planetaries with names from [starrail.mana](https://starrail.mana.wiki/).


## Installation

```python
pip install hsr-pic-parcer
```

## Available functionality

```python
get_char_pic(name) # returns binary picture of the character and full name of the character
get_char_icon_pic(name) # returns binary icon picture of the character and full name of the character
get_cone_pic(number) # returns binary picture of the light cone and full name of the light cone
get_cone_icon_pic(number) # returns binary icon picture of the light cone and full name of the light cone
get_relic_icon_pic(number) # returns binary icon picture of the relic or planetary and full name of the relic or planetary
```

## Examples

You can get picture of character using the following code:

```python
from hsr_pic_parser import get_char_pic

picture, name = get_char_pic('argenti')
```
The name of the character should be identical to the one used on [starrail.mana](https://starrail.mana.wiki/).

You can get picture and the name of the light cone:

```python
from hsr_pic_parser import get_cone_pic

picture, name = get_cone_pic(20000)
```
The code of the light cone should be equivalent to the one used on [starrail.mana](https://starrail.mana.wiki/).

```python
from hsr_pic_parser import get_relic_icon_pic

picture, name = get_relic_icon_pic(101)

def save_image_as_png(image_data, output_file_path):
    with open(output_file_path, "wb") as png_file:
        png_file.write(image_data)

save_image_as_png(picture, f"${name}.png")
```
