Code Monkey home page Code Monkey logo

genshin-wish-export-uigf-converter's Introduction

Anurag's GitHub stats

Hey, this is Masterain. Thanks for checking out my GitHub profile.

I'm a new graduated student from SCU, MS in Information Systems program. I focus on data analysis works, programming is my hobby. Practicality, compatibility, and automation extensibility are things I consider more when designing programs, because what usually drives me to design programs are the boring things in life that need to be done repeatedly. Similarly, standardized processes and automated validation are my approach to managing projects, as I see these as lessons learned and best practices in real action.

I'm currently involved in the DGP-Studio/Snap.Hutao project, responsible for data processing, network design, CI/CD and some of the back-end services used to support the project. UIGF-Org is an extension of the project that standardizes our data model and exposes it to the open-source community, and I'm happy to see it being adopted by some other programs at the moment.

genshin-wish-export-uigf-converter's People

Contributors

masterain98 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

genshin-wish-export-uigf-converter's Issues

使用genshin-wish-export 导出的UIGF Json进行转换

GWE事实上保存了已知的id字段。

其导出的JSON格式UIGF文件不符合标准的地方仅在于 原本就不存在id字段的祈愿(1.3版本前)的处理方式是直接导出空字符串,1.3版本之后的祈愿id值是正确的。
因此对于JSON格式只需要补齐这部分缺失的id。
用代码简单测试了一下

 with open(file=path, mode="r+", encoding="utf-8") as fp:
        obj = json.load(fp)
        min_id = min([eval(record["id"]) for record in obj["list"] if record["id"] != ""])
        obj["list"] = list(obj["list"])
        obj["list"].reverse()
        for record in obj["list"]:
            if record["id"] == "":
                record["id"] = str(min_id-1)
                min_id -= 1
                print(record)
        fp.seek(0)
        json.dump(obj, fp)

修复后使用snap.genshin导入成功,不会与后续刷新冲突。
image
如果需要UIGF格式的excl文件,也应当从JSON中获取正确的id来避免后续更新冲突或者舍弃近六个月记录。

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.