generated from yunwei37/archive-file-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6c8d912
Showing
32 changed files
with
845 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/bin/bash | ||
|
||
# Exit on any error | ||
set -e | ||
export OPENAI_TEMPERATURE=0.7 | ||
rm -rf docs/* | ||
rm -rf workspace/download/* | ||
|
||
# rename files | ||
python .github/scripts/file/rename.py | ||
|
||
echo "Files renamed successfully!" | ||
|
||
# update encoding | ||
|
||
.github/scripts/file/encoding/fix_encoding.sh | ||
|
||
# detect entry | ||
python .github/scripts/config/hierarchy/detect_entry.py | ||
|
||
echo "Entry detected successfully!" | ||
|
||
# generate directory meta | ||
python .github/scripts/ai/archive/gen_dir_meta.py | ||
|
||
echo "Directory meta generated successfully!" | ||
|
||
# make sure the global catalog is up to date | ||
python .github/scripts/others/catalog.py | ||
|
||
echo "Global catalog generated successfully!" | ||
|
||
# generate md5 list | ||
python .github/scripts/others/get_md5_list.py | ||
|
||
echo "MD5 list generated successfully!" | ||
|
||
# generate page | ||
python .github/scripts/page/gen_page.py | ||
|
||
echo "Page generated successfully!" | ||
|
||
# generate file meta | ||
python .github/scripts/ai/archive/gen_file_meta.py | ||
# echo "File meta generation skipped!" | ||
echo "File meta generated successfully!" | ||
|
||
# add metadata to page if not exists, such as link and archived date | ||
python .github/scripts/file/add_config.py | ||
|
||
echo "Metadata added successfully!" | ||
|
||
python .github/scripts/page/embed_text.py | ||
|
||
echo "add file info" | ||
|
||
# Generate table of contents | ||
python .github/scripts/toc/her_toc.py | ||
|
||
echo "Table of contents generated successfully!" | ||
|
||
# temporially workaround? | ||
python .github/scripts/file/add_config_from_page.py | ||
# why first time not successful? | ||
|
||
python .github/scripts/file/gen_search_index.py | ||
python .github/scripts/file/analysis_search_index.py | ||
|
||
echo "Search index generated successfully!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.: | ||
name: . | ||
description: 根目录,按照内容与来源分类 | ||
测试: | ||
name: 测试 | ||
description: '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
测试.txt: | ||
name: 测试.txt | ||
path: 测试/测试.txt | ||
md5: 418e2c7fb040367d77776c3dbd200164 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
这里是跨性别中文数字档案馆,我们收录任何与广义的中文跨性别/酷儿/ | ||
多元性别认同与性别表达相关的内容,包括但不限于: | ||
|
||
- 生命故事与过渡经历 | ||
- 医疗资源与经验分享 | ||
- 法律政策与社会环境 | ||
- 数据统计与研究资料 | ||
- 反映生存现状的记录 | ||
- 文学艺术与创作表达 | ||
|
||
我们执行了一些搜索引擎的关键词查询查询,需要你进一步检查每个查询结果是否确实与跨性别 | ||
(mtf、ftm 等)、CDTS、酷儿、Trans、人妖、性转、变性、易性癖、两性畸形、易装/变装、男娘、伪娘、 | ||
男性女性化、女装大佬、娘炮、反串、自宫、非二元性别等相关, | ||
如果相关,请给出 True,否则请给出 False。如果不确定,请给出 NotSure。我们会根据你的判断 | ||
对网页进行访问和收录。 | ||
|
||
## Query Result | ||
|
||
- title: {title} | ||
- link: {link} | ||
- snippet: {snippet} | ||
|
||
## Instructions | ||
|
||
请检查查询结果是否与跨性别相关,如果相关,请给出 True,否则请给出 False。 | ||
如果不确定,请给出 NotSure。由于搜索引擎中可能有大量的垃圾数据,只有在明确相关, | ||
例如文中的一部分明确涉及跨性别相关的议题时,请给出 True,否则请给出 False 或者 | ||
NotSure。有很多文本可能是大量的无关信息的堆砌,需要排除。请尽可能做出判断。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
这里是跨性别中文数字档案馆,我们需要你帮忙标记每个目录的分类信息, | ||
用中文撰写对应的描述信息、和标签。 | ||
|
||
本仓库是伪娘 TS 变身与跨性别相关漫画的档案仓库,我们收集各种二次元性转漫画、 | ||
伪娘或男娘漫画、变身漫画、跨性别漫画等。 | ||
|
||
性转漫画是指描绘角色性别转换的漫画作品。 | ||
伪娘/男娘漫画通常描绘生理性别为男性但以女性形象出现的角色。 | ||
变身漫画涉及角色外表或性别的改变情节。 | ||
跨性别漫画围绕性别认同与生理性别不一致的人物展开故事。 | ||
|
||
这些作品可能涉及性别认同、自我探索等主题。 | ||
|
||
以下是对应的一些目录信息: | ||
|
||
## Directory Information | ||
|
||
- **Directory Path**: {directory_path} | ||
- **Directory Files**: | ||
``` | ||
{directory_files} | ||
``` | ||
## Instructions | ||
|
||
请为上述目录生成以下元数据: | ||
|
||
- **描述**:提供目录内容的摘要和介绍,尽可能详细。 | ||
- **标签**:列出描述目录内容或主题的相关标签或关键词。 | ||
|
||
确保元数据准确。描述应为详细、信息丰富的几段话,尽可能详细、具体地讲解目录中的内容, | ||
适当摘抄文中出现的句子和内容。标签应相关且具体。所有的标签和描述信息均应为中文。如果 | ||
你已知的信息不足以判断对应的标签和描述信息,请填写“未知”,或表明这是某个资料的一部分。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
这里是跨性别中文数字档案馆,我们需要你帮忙分类每个相关的文本文件, | ||
用中文撰写对应的详细的描述信息和摘要、元数据和标签,并且记录下该资料可能的时间。 | ||
|
||
本仓库是伪娘 TS 变身与跨性别相关漫画的档案仓库,我们收集各种二次元性转漫画、 | ||
伪娘或男娘漫画、变身漫画、跨性别漫画等。 | ||
|
||
性转漫画是指描绘角色性别转换的漫画作品。 | ||
伪娘/男娘漫画通常描绘生理性别为男性但以女性形象出现的角色。 | ||
变身漫画涉及角色外表或性别的改变情节。 | ||
跨性别漫画围绕性别认同与生理性别不一致的人物展开故事。 | ||
|
||
这些作品可能涉及性别认同、自我探索等主题。 | ||
|
||
## File Information | ||
|
||
- **File Path**: {file_path} | ||
- **File Content**: | ||
``` | ||
{file_content} | ||
``` | ||
- **Type**: {type} | ||
- **Format**: {format} | ||
|
||
## Instructions | ||
|
||
请为上述文件生成以下元数据: | ||
|
||
- **描述**:提供文件内容的摘要和介绍,尽可能详细。 | ||
- **日期**:指定文件的原始创建或发布日期,以 YYYY-MM-DD 格式。月份或日期若不确定可以省略。若完全没有日期信息,请填写“未知”。 | ||
- **作者**:指定文件的主要作者或发布者、发布组织。若完全未知,请填写“未知”。 | ||
- **地区**:指定文件的主要地区,例如中国大陆、香港、台湾、美国等。若完全未知,请填写“未知”。 | ||
- **标签**:列出描述文件内容或主题的相关标签或关键词。 | ||
|
||
确保元数据准确。描述应为详细、信息丰富的几段话,尽可能详细、具体地讲解文件中的内容, | ||
适当摘抄文中出现的句子和内容。标签应相关且具体。所有的标签和描述信息均应为中文。如果 | ||
你已知的信息不足以判断对应的标签和描述信息,请填写“未知”,或表明这是某个资料的一部分。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
这里是跨性别中文数字档案馆,我们需要你帮忙分类每个跨性别相关的文本文件, | ||
我们会给你一些文件的对应信息,以及当前的分类和目录结构。你需要在回答中选择 | ||
一个合适的目录路径来放置它。如果没有合适的目录,输出 "未知"。 | ||
|
||
我们收录任何与中文跨性别相关的内容,包括但不限于: | ||
|
||
- 生命故事与过渡经历 | ||
- 医疗资源与经验分享 | ||
- 法律政策与社会环境记录 | ||
- 数据统计与研究资料 | ||
- 反映生存现状的真实记录 | ||
- 文学艺术与创作表达 | ||
|
||
以下是对应的一些文件信息: | ||
|
||
## File Information | ||
|
||
- **File Name**: {file_name} | ||
- **File Content**: | ||
``` | ||
{file_content} | ||
``` | ||
|
||
## Current Directory Structure | ||
|
||
{current_dir_structure} | ||
|
||
## Instructions | ||
|
||
返回需要将这个文件放置的目录路径,如果没有合适的目录,输出 “未知”。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
这里是跨性别中文数字档案馆,你是一个志愿者,我们现在从网络上收集到了一些可能和 | ||
跨性别相关的文件,需要你帮忙判断每个文件的主要内容是否和跨性别相关,对于相关程度 | ||
从 1 到 5 进行评分,1 表示完全不相关,5 表示完全相关。同时撰写一些你对於这个文件 | ||
的评价,是否适合收录在档案馆中。 | ||
|
||
我们会给你一些文件的对应信息, | ||
我们收录任何与中文跨性别相关的内容,包括但不限于: | ||
|
||
- 生命故事与过渡经历 | ||
- 医疗资源与经验分享 | ||
- 法律政策与社会环境记录 | ||
- 数据统计与研究资料 | ||
- 反映生存现状的真实记录 | ||
- 文学艺术与创作表达 | ||
|
||
我们希望尽可能广泛的收集和保存中文跨性别相关的文件,但如果其中只有一两句 | ||
跨性别/变性手术相关的内容,我们可能不会收录。我们希望文本的主题或至少部分章节段落 | ||
与跨性别/变性手术/多元化的性别认同与性别表达/易性癖和易装癖等相关。 | ||
|
||
以下是对应的一些文件信息: | ||
|
||
## File Information | ||
|
||
- **File Name**: {file_name} | ||
- **Related Snippet**: {related_snippet} | ||
- **File Content**: | ||
``` | ||
{file_content} | ||
``` | ||
|
||
|
||
## Instructions | ||
|
||
返回你对这个文件的评价,是否适合收录在档案馆中,以及相关程度评分。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from textwrap import dedent | ||
import urllib.parse | ||
import re | ||
|
||
x_intent = "https://x.com/intent/tweet" | ||
fb_sharer = "https://www.facebook.com/sharer/sharer.php" | ||
# include = re.compile(r"blog/[1-9].*") | ||
|
||
def on_page_markdown(markdown, **kwargs): | ||
page = kwargs['page'] | ||
config = kwargs['config'] | ||
# if not include.match(page.url): | ||
# return markdown | ||
|
||
page_url = config.site_url+page.url | ||
page_title = urllib.parse.quote(page.title+'\n') | ||
|
||
return markdown + "\n\n" + dedent(f""" | ||
[Share on :simple-x:]({x_intent}?text={page_title}&url={page_url}){{ .md-button }} | ||
[Share on :simple-facebook:]({fb_sharer}?u={page_url}){{ .md-button }} | ||
""") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
site_name: 档案template | ||
repo_url: https://transchinese.org/ | ||
site_url: https://xxx.transchinese.org/ | ||
site_description: '档案馆template' | ||
site_author: 多元性别中文数字图书馆 | ||
copyright: '多元性别中文数字图书馆 2024' | ||
theme: | ||
name: material | ||
custom_dir: overrides | ||
features: | ||
- search.suggest | ||
- search.highlight | ||
- search.share | ||
# - content.action.edit | ||
- navigation.footer | ||
- navigation.instant | ||
- navigation.instant.progress | ||
- navigation.tabs | ||
- navigation.tabs.sticky | ||
- navigation.expand | ||
- navigation.path | ||
- navigation.top | ||
- navigation.prune | ||
- navigation.indexes | ||
- navigation.tracking | ||
palette: | ||
# Palette toggle for automatic mode | ||
- media: "(prefers-color-scheme)" | ||
toggle: | ||
icon: material/brightness-auto | ||
name: Switch to light mode | ||
|
||
# Palette toggle for light mode | ||
- media: "(prefers-color-scheme: light)" | ||
scheme: default | ||
toggle: | ||
icon: material/brightness-7 | ||
name: Switch to dark mode | ||
|
||
# Palette toggle for dark mode | ||
- media: "(prefers-color-scheme: dark)" | ||
scheme: slate | ||
toggle: | ||
icon: material/brightness-4 | ||
name: Switch to system preference | ||
language: zh | ||
plugins: | ||
- search | ||
- social: | ||
cards_layout_options: | ||
font_family: Noto Sans SC | ||
- rss: | ||
match_path: ".*" | ||
date_from_meta: | ||
as_creation: date.created | ||
as_update: date.updated | ||
- git-authors | ||
- git-revision-date-localized: | ||
enable_creation_date: true | ||
extra: | ||
analytics: | ||
provider: google | ||
property: G-NLEYWPXZ47 | ||
social: | ||
- icon: /fontawesome/regular/envelope | ||
name: send me an email | ||
link: mailto:[email protected] | ||
- icon: fontawesome/brands/x-twitter | ||
link: https://x.com/transchineseorg | ||
extra: | ||
homepage: https://transchinese.org | ||
hooks: | ||
- hooks/socialmedia.py | ||
markdown_extensions: | ||
- attr_list | ||
- pymdownx.emoji: | ||
emoji_index: !!python/name:material.extensions.emoji.twemoji | ||
emoji_generator: !!python/name:material.extensions.emoji.to_svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% if true %} | ||
<script src="https://giscus.app/client.js" | ||
data-repo="project-polymorph/trans-digital-cn" | ||
data-repo-id="R_kgDOHD-S9w" | ||
data-category="Announcements" | ||
data-category-id="DIC_kwDOHD-S984Cjxgx" | ||
data-mapping="url" | ||
data-strict="0" | ||
data-reactions-enabled="1" | ||
data-emit-metadata="0" | ||
data-input-position="top" | ||
data-theme="preferred_color_scheme" | ||
data-lang="zh-CN" | ||
crossorigin="anonymous" | ||
async> | ||
</script> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
# Exit on any error | ||
set -e | ||
|
||
python .github/scripts/others/check_files.py | ||
|
||
echo "Files checked and remove large files successfully!" | ||
|
||
# Create docs directory if it doesn't exist | ||
mkdir -p docs | ||
|
||
# Copy markdown files to docs directory | ||
# Enable extended globbing if needed | ||
shopt -s extglob | ||
cp -r !(docs) docs/ | ||
rm -f docs/CODE_OF_CONDUCT.md | ||
rm -f docs/CONTRIBUTING.md | ||
|
||
# Copy all files from .github/site to root directory | ||
cp -r .github/site/* ./ | ||
|
||
echo "Files copied successfully!" |
Oops, something went wrong.