Skip to content

Commit

Permalink
Add zh release calendar workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinfall committed Jan 18, 2024
1 parent b689e46 commit bd9d39e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: gen-en-calendar
name: release-calendar

on:
schedule:
Expand Down Expand Up @@ -26,7 +26,7 @@ jobs:
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: execute py script
- name: make en & ja release calendar
run: python vndb-calendar.py -f "0572171_4YsVe122gen2gjaN48721gwcomplete-" -t 0

- name: upload artifact to release
Expand All @@ -40,3 +40,19 @@ jobs:
omitNameDuringUpdate: True
artifacts: "output/vndb-*"
token: ${{ secrets.GITHUB_TOKEN }}

- name: make zh & ja release calendar
run: python vndb-calendar.py -f "0572171_4YsVe132gja2wzh_dHans-2wzh_dHant-N48721gwcomplete-" -t 0

- name: upload artifact to release
uses: ncipollo/release-action@v1
with:
allowUpdates: True
prerelease: False
tag: "zh"
omitBody: True
omitBodyDuringUpdate: True
omitNameDuringUpdate: True
artifacts: "output/vndb-*"
token: ${{ secrets.GITHUB_TOKEN }}

7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Intro

This tiny tool allows you to create a calendar of [VNDB](https://vndb.org) [upcoming releases](https://vndb.org/r?f=01731;o=a;s=released). Everything is supposed to be automated via GitHub Actions after initial setup. If you choose to publish the `ICS` file, you can just subscribe it in any calendar app that supports iCalendar. A highly customized example including ja, zh-Hans & zh-Hant releases (not very suitable for en readers) is avaialable [here](https://raw.githubusercontent.com/Vinfall/VNDB-RelCalendar/main/output/vndb-rel-calendar.ics).
This tiny tool allows you to create a calendar of [VNDB](https://vndb.org) [upcoming releases](https://vndb.org/r?f=01731;o=a;s=released). Everything is supposed to be automated via GitHub Actions after initial setup. If you choose to publish the `ICS` file, you can just subscribe it in any calendar app that supports iCalendar. An example including en & ja releases is avaialable [here](https://github.com/Vinfall/VNDB-RelCalendar/releases/download/en/vndb-rel-calendar.ics).

## Why

Expand All @@ -14,8 +14,6 @@ This is created as a workaround (just in ICS rather than RSS) for personal use a

## Usage

The results should be similar to the one you would see in [this release query on VNDB](https://vndb.org/r?f=0672171_4YsVe132gja2wzh_dHans-2wzh_dHant-N48721gwcomplete-N480281UJ81Xkx), except that I expand the release window 14 days earlier to avoid missing VNs.

To customize the query, run the script with optional parameters:
- `python vndb-calendar.py -f {customized_compact_filter} -p {max_page} -t {shift_time}`
- Example of generic filters for en & ja upcoming releases: `python vndb-calendar.py -f "0572171_4YsVe122gen2gjaN48721gwcomplete-" -t 0`
Expand All @@ -30,8 +28,9 @@ To customize the query, run the script with optional parameters:
- [x] Better handling of incomplete date like `2026` and `2024-02`
- [x] Filter out BLG/Otome game & other tags I wish to avoid
- [x] Add filters arguments (you can use [compact filters](https://api.vndb.org/kana#filters) to quickly customize the results)
- [ ] Generic filter for en & ja release (probably in a tagged automated release, low priority as DIY instructions are given in [#Usage](#usage))
- [x] Make calendar with generic en & ja releases (in a tagged automated release)
- [ ] Find out why many filters would make responses 400, and add more info in calendar events afterwards
- [ ] Do not use alternative title in en tagged release (low priority, I assume people would prefer literal title instead of confusing Romaji)
- [ ] User wishlist, just like SteamWishlistCalendar (low priority as I don't use VNDB this way)
- [ ] Add external links (Getchu/DMM/DLsite/Steam/Official website etc.) to event description (maybe not possible w/o refactoring)

Expand Down
7 changes: 3 additions & 4 deletions README_zh-Hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
这是一个创建 [VNDB](https://vndb.org) [upcoming releases](https://vndb.org/r?f=01731;o=a;s=released) 日历的小工具。
初始化后即可由 GitHub Actions 自动更新。
如果公开 `ICS` 文件,那么可以在任意支持 iCalendar 的日历应用中订阅。
[点击这里](https://raw.githubusercontent.com/Vinfall/VNDB-RelCalendar/main/output/vndb-rel-calendar.ics)获取包含中日双语视觉小说的(高度自定义)示例文件
[点击这里](https://github.com/Vinfall/VNDB-RelCalendar/releases/download/zh/vndb-rel-calendar.ics)获取包含中日双语视觉小说的示例文件

## 目的

Expand All @@ -15,11 +15,9 @@ VNDB 目前只对 *Recent Changes* 提供 RSS,*Upcoming Releases* 和 *Just Re

## 使用

运行结果应该近似 [这则 VNDB 搜索](https://vndb.org/r?f=0672171_4YsVe132gja2wzh_dHans-2wzh_dHant-N48721gwcomplete-N480281UJ81Xkx),但我为了不错过新发行视觉小说而把起始发售日往前挪了 14 天。

你可以通过(可选)参数运行脚本来自定义结果:
- `python vndb-calendar.py -f {自定义的 compact filter} -p {最大页数}`
- 以中日视觉小说为例`python vndb-calendar.py -f "0572171_4YsVe132gja2wzh_dHans-2wzh_dHant-N48721gwcomplete-"`
- 以中日未发售视觉小说为例`python vndb-calendar.py -f "0572171_4YsVe132gja2wzh_dHans-2wzh_dHant-N48721gwcomplete-" -t 0`
- `-f``--filter`:自定义 [compact filters](https://api.vndb.org/kana#filters),默认为我高度自定义的个人方案
- `-p``--max-page`:搜索结果的最大页数,默认为 `2`
- `-t``--shift-time`:显示 X 天前发售到尚未发售的视觉小说,设置为 `0` 才是真正的「即将发售作品」,默认为 `14`
Expand All @@ -31,6 +29,7 @@ VNDB 目前只对 *Recent Changes* 提供 RSS,*Upcoming Releases* 和 *Just Re
- [x] 优化不完整日期(比如 `2026``2024-02`)的处理
- [x] 排除带有 BLG、乙女游戏和其他预期外标签的视觉小说
- [x] 允许通过运行参数自定义搜索(具体参见 VNDB API 文档的 [compact filters](https://api.vndb.org/kana#filters) 部分)
- [x] (自动化发布)通用的中日视觉小说发售日历
- [ ] Find out why many filters would make responses 400, and add more info in calendar events afterwards
- [ ] User wishlist, just like SteamWishlistCalendar (low priority as I don't use VNDB this way)
- [ ] Add external links (Getchu/DMM/DLsite/Steam/Official website etc.) to event description (maybe not possible w/o refactoring)
Expand Down

0 comments on commit bd9d39e

Please sign in to comment.