Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rxliuli committed Nov 7, 2024
0 parents commit f1b9d99
Show file tree
Hide file tree
Showing 27 changed files with 7,144 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ao3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
on:
push:
branches: [main]
paths:
- 'books/zh-CN/**/*.md'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

jobs:
sync-to-ao3:
runs-on: ubuntu-latest
environment:
name: ao3
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.6.0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Cache node_modules based on Markdown files
uses: actions/cache@v2
with:
path: |
node_modules/.cache
key: ${{ runner.os }}-nodecache-${{ hashFiles('books/zh-CN/**/*.md') }}
restore-keys: |
${{ runner.os }}-nodecache-
- name: Publish to Ao3
run: |
echo "Publishing to Ao3, env: $AO3_COOKIE"
pnpm mark-magic --task publishToAo3
env:
AO3_COOKIE: ${{ secrets.AO3_COOKIE }}
120 changes: 120 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: Build, Release, and Deploy

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: write
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.6.0

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm i --frozen-lockfile

- name: Build
run: |
pnpm build
ls -l dist/epub
- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: dist/docs

- name: Configure Git
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Bump version
id: bump_version
run: |
# 获取最新的 tag
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
# 提取版本号并增加 patch 版本
CURRENT_VERSION=${LATEST_TAG#v}
IFS='.' read -ra VERSION_PARTS <<< "$CURRENT_VERSION"
MAJOR=${VERSION_PARTS[0]}
MINOR=${VERSION_PARTS[1]}
PATCH=$((VERSION_PARTS[2] + 1))
NEW_VERSION="v$MAJOR.$MINOR.$PATCH"
git add .
git commit -m "Build for release" || echo "No changes to commit"
git tag -a $NEW_VERSION -m "Bump version to $NEW_VERSION"
echo "new_version=${NEW_VERSION#v}" >> $GITHUB_OUTPUT
env:
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com

- name: Push changes
run: git push --follow-tags

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.bump_version.outputs.new_version }}
release_name: Release ${{ steps.bump_version.outputs.new_version }}
draft: false
prerelease: false

- name: Create Release and Upload Assets
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.bump_version.outputs.new_version }}
name: Release ${{ steps.bump_version.outputs.new_version }}
body: |
Release epub for version ${{ steps.bump_version.outputs.new_version }}
files: |
./dist/epub/Puella Magi Adfligo Systema.epub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build-and-release
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Dependencies
/node_modules

# Production
/build
dist/

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
cache
8 changes: 8 additions & 0 deletions .markdownlint.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
// 禁用行长度限制
"line-length": false,
// 禁用行级别的粗体警告
"no-emphasis-as-heading": false,
// 允许使用 <br/> 标签
"no-inline-html": false
}
58 changes: 58 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 贡献指南

管理 markdown 翻译源文件。

## 进度

| 原作 | 译文 |
| ---- | ---- |
| 原作 | 31 |
| 翻译 | |

## 参考

- [原作](https://parahumans.wordpress.com/)
- [繁体中文翻译](https://tsuki7781.pixnet.net/blog/post/119902815)
- [维基百科讨论: 格式手册](https://zh.wikipedia.org/zh-cn/Wikipedia_talk:%E6%A0%BC%E5%BC%8F%E6%89%8B%E5%86%8A/%E6%96%87%E5%AD%97%E6%A0%BC%E5%BC%8F/%E5%AD%98%E6%AA%94%E4%B8%80)

## 译名对照表

| 原文 | 译文 |
| ---------------- | ---------------- |
| 人名 | |
| Tattletale | 告密者 |
| Grue | 暗魇 |
| Bitch/Hellhound | 母狗/地狱猎犬 |
| Regent | 摄政王 |
| Armsmaster | 武器大师 |
| Lung ||
| Oni Lee | 李鬼 |
| Bakuda | 爆弹 |
| Scion | 赛扬 |
| Vikare | 海豹 |
| Andrew Hawke | 安德鲁・霍克 |
| Grace Lands | 格蕾丝・兰兹 |
| Taylor Hebert | 泰勒・赫伯特 |
| Danny Hebert | 丹尼・赫伯特 |
| Madison Clements | 麦迪森・克莱门茨 |
| Sophia | 索菲娅 |
| Emma Barnes | 艾玛・巴恩斯 |
| Gladly | 盖德利 |
| 组织 | |
| Protectorate | 保护者联盟 |
| Triumvirate | 三巨头 |
| PHQ | |
| PRT | |
| Ward | 监护者 |
| ABB | 亚裔坏小子 |
| E88 | |
| 地名 | |
| Brockton Bay | 布洛克顿湾 |
| Arcadia High | 阿卡迪亚高中 |
| 专有名词 | |
| Cape | 披风 |
| Tinker | 修补匠 |

### 问题

- [x] Grue 是按照常见音译 **格鲁** 还是按照意译 **暗魇**?一般而言披风的名字都应该意译,例如武器大师、告密者等,它们通常与超能力有所关联 -- 采用意译保持一致性
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 rxliuli

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 蠕虫

> **免责声明**
> This is purely a fan project and I/we lay no claim to the ideas, characters, or story. The real author is J.C. McCrae, aka ‘Wildbow’, and the original version can be found at <http://www.parahumans.wordpress.com> .
> 这纯粹是一个粉丝项目,我/我们对其中的想法、角色或故事不主张任何权利。真正的作者是 J.C. McCrae,又名'Wildbow',原版可以在 <http://www.parahumans.wordpress.com> 找到。
![banner](./static/banner.png)

主角是一个名叫泰勒・赫伯特的高中女生,是个失去母亲的黑发褐肤、性格阴郁的女孩。她在学校遭受霸凌,唯一支撑她活下去的希望是:不久前她经历了"触发事件",获得了控制昆虫的超能力。如果她能顺利参加"守卫计划",就能成为一个真正的超级英雄,为她那悲惨的人生增添一些意义...
18 changes: 18 additions & 0 deletions books/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { defineConfig } from 'vitepress'
import { generateSidebar } from 'vitepress-sidebar'
import taskLists from '@hackmd/markdown-it-task-lists'
import { cjk } from 'markdown-it-cjk-space-clean'

export default defineConfig({
themeConfig: {
sidebar: generateSidebar({
documentRootPath: '/books',
useTitleFromFileHeading: true,
}),
},
markdown: {
config(md) {
md.use(taskLists).use(cjk() as any)
},
},
})
Loading

0 comments on commit f1b9d99

Please sign in to comment.