Skip to main content

Genshin, but no Genshin.

Project description

nogenshin 不要原神!

Are you a developer who's tired of seeing the same boring errors in your code? Want to turn debugging into an adventure? Look no further—nogenshin is here to save the day (and your sanity)!

你是那个已经厌倦了自己代码里那些千篇一律的报错的开发者吗?想把调试代码变成一次冒险之旅吗?别再找了——nogenshin 出场拯救你(和你的理智)了!

What is nogenshin? 什么是不要原神?

nogenshin is the Python library you never knew you needed. It's simple: whenever your code throws an error inside a function decorated with @nogenshin.start, it will launch Genshin Impact instead of leaving you staring at an ugly stack trace. Because if you're going to suffer, you might as well enjoy it!

nogenshin 是一个你从未意识到自己需要的 Python 库。它的原理很简单:每当你代码中某个被 @nogenshin.start 装饰器装饰的函数抛出错误时,它不会给你显示丑陋的堆栈信息,而是直接启动《原神》。因为,如果注定要受苦,那为什么不选择开心点呢?

Installation 安装

First, make sure you're ready for chaos:

首先,确保你已经做好迎接混乱的准备:

pip install git+https://github.com/Charley-xiao/nogenshin.git

And, of course, Genshin Impact must already be installed on your system. If it's not, what are you even doing here?

当然,你的电脑上必须已经安装了《原神》。如果还没有安装,你为什么不装?《原神》怎么你了?

Usage

Here's how you can embrace your inner Traveler (and bug-hunter):

以下是如何激发你内心旅行者(兼 bug 猎手)灵魂的操作:

import nogenshin

@nogenshin.start
def buggy_function():
    print("This will probably break...")
    raise ValueError("Oops!")

buggy_function()  # Prepare for adventure if it fails!

When an exception happens, instead of fixing the error, nogenshin will fire up Genshin Impact and let you chill in Teyvat while you contemplate your life choices.

当你的代码发生异常时,nogenshin 会自动启动《原神》,让你在提瓦特的美景中反思人生选择,而不是盯着报错发呆。

Why? 为什么?

Why not? Debugging is stressful. Go fight some hilichurls instead. Or go get that 5-star character you’ve been dreaming of while your bugs roam free.

为什么不呢?调试代码太压力山大了。去打打丘丘人,放松一下吧!或者去抽你梦寐以求的五星角色,让 bug 自由飞翔。

How It Works 它怎么工作的

Step 1: Write code.

Step 2: Wrap your error-prone functions with @nogenshin.start.

Step 3: When your code blows up, nogenshin launches Genshin Impact.

Step 4: ????

Step 5: Profit (or cry about not getting Zhongli again).

第一步: 写代码。

第二步: 用 @nogenshin.start 包裹那些容易出问题的函数。

第三步: 当代码崩溃时,nogenshin 启动《原神》。

第四步: ????

第五步: 水到渠成(或者继续哭着抱怨抽不到钟离)。

FAQ 常见问题

Q: Will this help me debug my code?

A: Not even a little.

Q: Why Genshin Impact?

A: Why not?

Q: What if I actually want to fix my bugs?

A: That’s a 'you' problem.

Q: Is there a way to choose different games?

A: No. You either launch Genshin, or you face your errors alone.

问: 这个库能帮我调试代码吗?

答: 完全不能。

问: 为什么是《原神》?

答: 为什么不是呢?

问: 如果我真的想修复 bug 怎么办?

答: 那是你的问题,不是我的。

问: 能选择其他游戏吗?

答: 不行。要么启动原神,要么面对自己那满屏的错误。

Disclaimer 免责声明

Use at your own risk. This library will absolutely not fix your code. But hey, at least you’ll have fun, right? And yes, this might reduce your productivity. But isn't that what coding is all about?

使用本库请自担风险。nogenshin 绝对不会帮你修复代码。但嘿,至少你可以玩得开心嘛!对,没错,这可能会大大降低你的工作效率。但编程不就是为了快乐吗?

nogenshin: Turning every error into an adventure. Now go out there and debug... or pull for characters. Your call.

nogenshin:让每一次报错都变成一场冒险。现在去吧,调试代码...还是抽卡,全看你了。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nogenshin-0.1.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

nogenshin-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file nogenshin-0.1.0.tar.gz.

File metadata

  • Download URL: nogenshin-0.1.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.16

File hashes

Hashes for nogenshin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 59998e86d7db746f917fb451ac06e5e89d74a531e6ed947d14f00071c5477cf9
MD5 567b0e1150a9e7880e0622b8b1b71bd4
BLAKE2b-256 570ae84dc80c9866b5aa1aa8affc681f6790b99794c9459e48cbaf4b9a4e7db5

See more details on using hashes here.

File details

Details for the file nogenshin-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nogenshin-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.16

File hashes

Hashes for nogenshin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ab482e47e52593bbd6ce67918b522cc389396f1dce0e08d1c623f083043338a
MD5 33989b57b5e05d828d09811b7fd0c728
BLAKE2b-256 13db48786dc2257ad75121f5bdfe7a056cd016353314ae8a9055b50ebe6607b0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page