Giter VIP home page Giter VIP logo

enkacard's Introduction

About me:

  • Country: Ukraine.
  • Age: 25 years.
  • Main programming language: Python.
  • Hobby: Program bots, Photoshop.
  • Description:
I am familiar with Photoshop at the professional level, I have been doing Photoshop since
I was 12 years old, I have been programming bots since 2018. I am fully familiar with the 
VK documentation, also with the documentation Telegram and Discord by 50%.
I love to play games. My favorite genre is Fantasy

My projects:

Genshin Description HonkaiStarRaill Description
EnkaCard Generating Character Cards StarRaillCard Generating Character Cards
EnCard Addon to EnkaCard HSRCard Addon to StarRaillCard
GenshinPyRail Generating images for Genshin and Honkai Star Rail StarRailCardUA Translation of StarRailCard into Ukrainian
EnkaNetworkV2.py Updated EnkaNetwork.py shell with fixes for receiving data from HonkaiRail A wrapper for the MiHoMo API to get information about characters
EnkaCardData Assets StarRailCardData Assets

Contact me | Support me:

enkacard's People

Contributors

deviantua avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

enkacard's Issues

API not working in js

i tried accessing the api but encountered a weird error:

const url = "https://web-production-32d8.up.railway.app/api/card";

const headers = new Headers();
headers.append("Content-Type", "application/json")

const data = { "uid": 819946168 };

fetch(url, {
    method: "POST",
    body: JSON.stringify(data),
    headers: {
        "Content-Type": "application/json"
    }
}).then((response) => console.log(response.json()))

Response:

{
    "enc": {
        "error": {
            "code": 101,
            "text": "Required parameter not specified: uid"
        }
    }
}

It's weird that when i tried using python requests library, it worked

Pillow Antialias depreciation warning

A warning is thrown by Pillow when trying to generate character card.

[15:16:29] WARNING  [py.warnings] C:\Users\Raiden\redenv\lib\site-packages\aioenkanetworkcard\src\utils\FunctionsPill.py:31: DeprecationWarning: ANTIALIAS is deprecated and will be removed in Pillow 10 (2023-07-01). Use LANCZOS or Resampling.LANCZOS instead.
  new_image = imgs.resize((fixed_width, height), Image.ANTIALIAS)

Output of python --version

Python 3.9.13

Result of pip show pillow:

Name: Pillow
Version: 9.4.0
Summary: Python Imaging Library (Fork)
Home-page: https://python-pillow.org
Author: Alex Clark (PIL Fork Author)
Author-email: [email protected]
License: HPND
Location: c:\users\raiden\redenv\lib\site-packages
Requires: 
Required-by: aioenkanetworkcard

Usage:

        async def get_character_card(uid, char_name):
            async with encbanner.ENC(
                lang="en", splashArt=True, characterName=char_name
            ) as encard:
                ENCpy = await encard.enc(uids=uid)
                return await encard.creat(ENCpy, 2)
                
        async def generate_char_info(uid, char_name):
            """Generate character info"""
            with io.BytesIO() as image_binary, ctx.typing():
                char_card = await get_character_card(uid, char_name)
                if not char_card:
                    return await ctx.send("Character card not found.")
                temp_filename = str(time.time()).split(".")[0] + ".png"
                log.debug(char_card)
                char_card[uid][char_name].save(
                    image_binary, "PNG", optimize=True, quality=95
                )
                image_binary.seek(0)
                return await ctx.send(
                    file=discord.File(fp=image_binary, filename=temp_filename)
                )

Additionally, the Discord invite link on readme is also invalid.

Baizu

image

Error while using example UID: 884360403

Aint working some Uids

Traceback (most recent call last): 2023-09-30T12:25:41.802923+00:00 app[worker.1]: File "/app/cocomodules/mycharacter.py", line 149, in mycharacter 2023-09-30T12:25:41.802923+00:00 app[worker.1]: profile = await encard.profile(enc = ENCpy) 2023-09-30T12:25:41.802923+00:00 app[worker.1]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2023-09-30T12:25:41.802924+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.11/site-packages/enkacard/encbanner.py", line 145, in profile 2023-09-30T12:25:41.802924+00:00 app[worker.1]: itog = await creatUserProfile(image,profile,self.translateLang,self.hide,uid,self.assets,teample) 2023-09-30T12:25:41.802925+00:00 app[worker.1]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2023-09-30T12:25:41.802925+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.11/site-packages/enkacard/src/utils/userProfile.py", line 186, in creatUserProfile 2023-09-30T12:25:41.802926+00:00 app[worker.1]: picturesProfile = await imagSize(link = player.avatar.icon.url,fixed_width = 179) 2023-09-30T12:25:41.802926+00:00 app[worker.1]: ^^^^^^^^^^^^^^^^^^^^^^ 2023-09-30T12:25:41.802927+00:00 app[worker.1]: AttributeError: 'NoneType' object has no attribute 'url'

Refrence uid = 877877740

TypeError: argument of type 'NoneType' is not iterable

from enkacard import encbanner
import asyncio

async def card():
async with encbanner.ENC(uid = "811455610") as encard:
return await encard.creat()

result = asyncio.run(card())

print(result)

ERROR:
return await encard.profile(card=True)
File "/home/heckfy/python/test/venv/lib/python3.10/site-packages/enkacard/encbanner.py", line 251, in profile
data["card"] = await profile_teample_one.ProfileCard(self.enc.player,self.translateLang,self.character_art,self.hide_uid,self.uid,background).start()
File "/home/heckfy/python/test/venv/lib/python3.10/site-packages/enkacard/src/generator/profile_teample_one.py", line 136, in start
self.charter = await asyncio.gather(*task)
File "/home/heckfy/python/test/venv/lib/python3.10/site-packages/enkacard/src/generator/profile_teample_one.py", line 84, in creat_charter
if str(key.id) in self.img:
TypeError: argument of type 'NoneType' is not iterable

simple code from the documentation causes an error

CD>CR?

photo_2023-02-12_13-56-08

lib:
Crit Rate after crit DMG is it possible to make cards with crit rate being before than Crit dmg

api:
It has same as lib but at theres more like Max hp at 3rd, def at 1st

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.