diff --git a/.github/ISSUE_TEMPLATE/Fake-Open-Source-event.yml b/.github/ISSUE_TEMPLATE/Fake-Open-Source-event.yml deleted file mode 100644 index 49edc2e..0000000 --- a/.github/ISSUE_TEMPLATE/Fake-Open-Source-event.yml +++ /dev/null @@ -1,115 +0,0 @@ -name: 伪开源事件报告 / Fake Open Source event report -description: 报告一个伪开源事件 / Report a Fake Open Source event -title: "替换为事件的一句话描述 / Replace with an one-sentence description of the event" -labels: - - event - - documentation -body: - - type: markdown - attributes: - value: | - ## 免责声明 / Disclaimer - - - **隐私政策 / Privacy Policy**:施害过程中施害人暴露的个人信息不属于隐私,除此之外所有人均应受隐私保护。/ Personal information exposed by the perpetrator during the harmful process is not protected by privacy laws. Beyond that, all individuals should be protected by privacy rights. - - - **信息来源 / Information Source**:本平台仅提供基于 Git 的分布式信息存储,信息真实性由发布者负责,并由网友辨别、辟谣。/ This platform only provides decentralized information storage based on Git. The authenticity of information is the responsibility of the publisher, and is to be verified and fact-checked by the community. - - - type: input - id: tags - attributes: - label: 分类标签 / Category Tags - description: 请用英文逗号或空格分隔多个标签 / Please use English comma or space to separate multiple tags - placeholder: "用英文逗号或空格分隔,例如:malware, scam, plagiarism, trojan / Separated by comma or space, example: malware, scam, plagiarism, trojan" - validations: - required: true - - - type: input - id: start_time - attributes: - label: 发生时间 / Start Time - description: 事件开始的具体时间 / The specific date and time when the event started - placeholder: "例如:2024-01-15 / Example: 2024-01-15" - validations: - required: true - - - type: input - id: end_time - attributes: - label: 结束时间 / End Time - description: 事件结束的具体时间(如果事件已结束) / The specific date and time when the event ended (if applicable) - placeholder: "例如:2024-01-20 / Example: 2024-01-20" - - - type: input - id: location - attributes: - label: 发生地点 / Location - description: 线下地址、线上网址、某群聊名称等 / Offline address, online URL, chat group name, etc. - placeholder: "例如:某 GitHub 项目 | https://example.com | 某微信群 | 某 Discord 服务器 / Example: XYZ GitHub Project | https://example.com | WeChat Group XYZ | Discord Server XYZ" - validations: - required: true - - - type: textarea - id: hypocrite - attributes: - label: 伪开源人 / Hypocrite - description: 列出 @GitHub 账号、社交媒体个人主页网址、网名、姓名等 / List @GitHub accounts, social media profile links, usernames, names, etc. - placeholder: | - - @GitHub 账号 或 GitHub 个人主页 / @GitHub username or GitHub profile link - - 社交媒体账号或个人主页链接 / Social media account or personal profile link - - 网名、姓名 / Username, name - 例如: - - @user123 - - https://twitter.com/scammer - - 网名:诈骗王 / Username: scammer_xyz - validations: - required: true - - - type: textarea - id: event_details - attributes: - label: 事件经过 / Event Details - description: 用 Markdown 4 级及以上标题、项目列表等语法罗列,可贴网址、截图等证据 / Use Markdown level 4+ headings, bullet lists, etc. to describe the event. Include URLs, screenshots, and evidence. - placeholder: | - 请使用 Markdown 格式(4 级及以上标题、项目列表等语法)详细描述事件经过,可贴网址、截图等证据 / Please use Markdown format (level 4+ headings, bullet lists, etc.) to describe the event in detail. You can include URLs, screenshots, and other evidence. - - #### 事件时间线 / Timeline - - 时间点1:发生了什么 / Time point 1: What happened - - 时间点2:发生了什么 / Time point 2: What happened - - #### 关键证据 / Key Evidence - - [链接1](https://example.com) - - [链接2](https://example.com) - validations: - required: true - - - type: input - id: money - attributes: - label: 涉及资金 / Currency & Amount - description: 请直接填写类似“CNY ¥100”或“USD $200”的格式,用币种缩写+符号+数值 / Please enter in a format such as "CNY ¥100" or "USD $200", using currency abbreviation + symbol + value - placeholder: "例如:CNY ¥100 或 USD $200 / Example: CNY ¥100 or USD $200" - - - type: textarea - id: assets - attributes: - label: 涉及财物 / Involved Assets - description: 用 Markdown 4 级及以上标题、项目列表等语法罗列,可贴网址、截图等证据 / Use Markdown level 4+ headings, bullet lists, etc. to describe. Include URLs, screenshots, and evidence - placeholder: | - 请使用 Markdown 格式(4 级及以上标题、项目列表等语法)详细描述,可贴网址、截图等证据 / Please use Markdown format (level 4+ headings, bullet lists, etc.) to describe in detail. Include URLs, screenshots, and other evidence. - - #### 财物清单 / Assets List - - 财物类型:描述 / Asset type: description - - 财物类型:描述 / Asset type: description - - #### 相关证据 / Related Evidence - - [链接](https://example.com) - - - type: checkboxes - id: confirmation - attributes: - label: 我确认 / I Confirm - options: - - label: 我已阅读并同意隐私政策声明 / I have read and agree to the privacy policy statement - required: true - - label: 提供的信息真实准确 / The information provided is truthful and accurate - required: true diff --git a/.github/ISSUE_TEMPLATE/activity.yml b/.github/ISSUE_TEMPLATE/activity.yml new file mode 100644 index 0000000..4704bda --- /dev/null +++ b/.github/ISSUE_TEMPLATE/activity.yml @@ -0,0 +1,117 @@ +name: 提交公益活动 / Submit Activity +description: 提交一个公益活动、会议或竞赛 / Submit a public welfare activity, conference, or competition +title: "活动官方名称 / Official Activity Title" +labels: + - activity +body: + - type: markdown + attributes: + value: | + ## 提交说明 / Submission Guidelines + + 提交后会自动创建 pull request 给开源社群审核,并由仓库维护者合并,再由自动化流水线更新到网站。 + + After submission, a pull request will be automatically created for open source community review, merged by repository maintainers, and then updated to the website by the automated pipeline. + + - type: dropdown + id: type + attributes: + label: 活动类型 / Activity Type + description: 请选择活动类型 / Please select the activity type + options: + - meetup + - conference + - competition + validations: + required: true + + - type: textarea + id: description + attributes: + label: 活动简介 / Activity Description + description: 活动的简要介绍 / Brief description of the activity + placeholder: "请描述活动的主要内容、目的和意义 / Please describe the main content, purpose, and significance of the activity" + validations: + required: true + + - type: input + id: tags + attributes: + label: 分类标签 / Tags + description: 请用英文逗号分隔多个标签 / Please use commas to separate multiple tags + placeholder: "例如:志愿服务, 公益募捐, 上海, 线上活动 / Example: 志愿服务, 公益募捐, 上海, 线上活动" + validations: + required: true + + - type: input + id: id + attributes: + label: 唯一 ID / Unique ID + description: 活动的全局唯一标识符,建议使用英文小写和连字符 / Globally unique identifier for the activity, use lowercase English and hyphens + placeholder: "例如:yulin-heroic-deed-fundraising-2025" + validations: + required: true + + - type: input + id: link + attributes: + label: 活动链接 / Activity Link + description: 活动的官方链接或详情页面 / Official link or detail page of the activity + placeholder: "例如:https://mp.weixin.qq.com/s/... / Example: https://example.com/activity" + validations: + required: true + + - type: input + id: start_time + attributes: + label: 开始时间 / Start Time + description: 活动开始的具体时间 / The specific date and time when the activity starts + placeholder: "例如:2025-10-01 09:00:00 / Example: 2025-10-01 09:00:00" + validations: + required: true + + - type: input + id: end_time + attributes: + label: 结束时间 / End Time + description: 活动结束的具体时间 / The specific date and time when the activity ends + placeholder: "例如:2025-10-31 17:00:00 / Example: 2025-10-31 17:00:00" + validations: + required: true + + - type: textarea + id: timeline + attributes: + label: 活动日程 / Timeline + description: 活动各环节的关键时间节点,使用 Markdown 表格格式 / Key milestones of the activity in Markdown table format + value: | + | 关键日期 / Deadline | 说明 / Description | + | --- | --- | + | 2025-10-19T23:59:00 | 论文征集截止 | + | 2025-11-15T09:00:00 | 学术年会开始 | + + - type: input + id: timezone + attributes: + label: 时区 / Timezone + description: 请使用标准 IANA 时区名称 / Please use standard IANA timezone name + placeholder: "例如:Asia/Shanghai" + validations: + required: true + + - type: input + id: place + attributes: + label: 活动地点 / Place + description: 活动地点,线上活动直接填写"线上" / Location of the activity; write "线上" for online events + placeholder: "例如:中国,上海 或 线上 / Example: 中国,上海 or 线上" + validations: + required: true + + - type: checkboxes + id: confirmation + attributes: + label: 我确认 / I Confirm + options: + - label: 提供的信息真实准确 / The information provided is truthful and accurate + required: true diff --git a/.github/ISSUE_TEMPLATE/restaurant.yml b/.github/ISSUE_TEMPLATE/restaurant.yml new file mode 100644 index 0000000..3c0af36 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/restaurant.yml @@ -0,0 +1,103 @@ +name: 提交无障碍友好餐厅 / Submit Accessible Restaurant +description: 提交一家无障碍友好的餐厅 / Submit an accessibility-friendly restaurant +title: "餐厅官方名称 / Official Restaurant Name" +labels: + - restaurant +body: + - type: markdown + attributes: + value: | + ## 提交说明 / Submission Guidelines + + 提交后会自动创建 pull request 给开源社群审核,并由仓库维护者合并,再由自动化流水线更新到网站。 + + After submission, a pull request will be automatically created for open source community review, merged by repository maintainers, and then updated to the website by the automated pipeline. + + - type: input + id: id + attributes: + label: 唯一 ID / Unique ID + description: 餐厅的全局唯一标识符,建议使用英文小写和连字符 / Globally unique identifier, use lowercase English and hyphens + placeholder: "例如:aimer-coffee-shanghai" + validations: + required: true + + - type: textarea + id: description + attributes: + label: 餐厅简介 / Description + description: 餐厅的简要介绍 / Brief description of the restaurant + placeholder: "请描述餐厅的特色与无障碍友好服务 / Please describe the restaurant's features and accessibility services" + validations: + required: true + + - type: input + id: features + attributes: + label: 无障碍特色服务 / Accessibility Features + description: 请用英文逗号分隔多个特色服务 / Please use commas to separate multiple features + placeholder: "例如:手语服务, 无障碍通道, 盲文菜单 / Example: 手语服务, 无障碍通道, 盲文菜单" + validations: + required: true + + - type: textarea + id: food + attributes: + label: 特色美食 / Specialty Food + description: 餐厅的招牌菜品或饮品及价格,使用 Markdown 表格格式 / Signature dishes or drinks with prices in Markdown table format + value: | + | 品名 / Dish | 价格 / Price | + | --- | --- | + | 招牌咖啡 | ¥35 | + | 无障碍套餐 | ¥68 | + + - type: input + id: avg_spend + attributes: + label: 人均消费 / Average Spend + description: 餐厅的人均消费,请注明货币单位 / Average spend per person, please include currency unit + placeholder: "例如:¥50 / Example: ¥50" + + - type: checkboxes + id: social_values + attributes: + label: 无障碍社会价值 / Accessibility Social Values + description: 请选择该餐厅提供的无障碍相关价值 / Select the accessibility-related values this restaurant provides + options: + - label: 残障就业支持 / Disability employment support + - label: 无障碍通道 / Accessible entrance + - label: 无障碍洗手间 / Accessible restroom + - label: 手语服务 / Sign language service + - label: 盲文菜单 / Braille menu + - label: 特殊饮食需求支持 / Special dietary needs support + + - type: input + id: address + attributes: + label: 地址 / Address + description: 餐厅的详细地址 / Detailed address of the restaurant + placeholder: "例如:上海市静安区示例路1号 / Example: 上海市静安区示例路1号" + validations: + required: true + + - type: input + id: lat + attributes: + label: 纬度 / Latitude + description: 餐厅的 GPS 纬度坐标(可从地图应用获取)/ GPS latitude coordinate (can be obtained from map apps) + placeholder: "例如:31.2304" + + - type: input + id: lng + attributes: + label: 经度 / Longitude + description: 餐厅的 GPS 经度坐标(可从地图应用获取)/ GPS longitude coordinate (can be obtained from map apps) + placeholder: "例如:121.4737" + + - type: checkboxes + id: confirmation + attributes: + label: 我确认 / I Confirm + options: + - label: 提供的信息真实准确 / The information provided is truthful and accurate + required: true diff --git a/.github/scripts/save-event.sh b/.github/scripts/save-event.sh index 860abe9..564a52f 100644 --- a/.github/scripts/save-event.sh +++ b/.github/scripts/save-event.sh @@ -1,65 +1,33 @@ #!/usr/bin/env bash set -euo pipefail -yaml_escape() { - printf '%s' "$1" | sed 's/\\/\\\\/g; s/"/\\"/g' -} +# shellcheck source=yaml_utils.sh +source "$(dirname "$0")/yaml_utils.sh" -append_yaml_split_array() { - local file_path="$1" - local key="$2" - local value="$3" - local has_items=0 +ACTIVITIES_FILE="${ACTIVITIES_FILE_PATH:-data/activities.yml}" - printf ' %s:\n' "$key" >> "$file_path" - - while IFS= read -r item; do - if [ -n "$item" ]; then - has_items=1 - printf ' - "%s"\n' "$(yaml_escape "$item")" >> "$file_path" - fi - done < <(printf '%s' "$value" | awk 'BEGIN{FS="[,,[:space:]]+"} {for (i=1; i<=NF; i++) if ($i != "") print $i}') - - if [ "$has_items" -eq 0 ]; then - printf ' []\n' >> "$file_path" - fi -} - -START_TIME="${EVENT_START_TIME:-}" -DATE_PART=$(echo "$START_TIME" | grep -oE '[0-9]{4}[-/][0-9]{2}[-/][0-9]{2}' | head -n1 | tr '/' '-') - -if [ -z "$DATE_PART" ]; then - echo "Unable to parse start_time: $START_TIME" - exit 1 -fi - -IFS='-' read -r YEAR MONTH DAY <<< "$DATE_PART" - -SAFE_TITLE=$(echo "${ISSUE_TITLE:-}" | \ - sed 's#[\\/:*?"<>|]#-#g; s/[[:space:]]\+/-/g; s/--\+/-/g; s/^-//; s/-$//') +{ + printf -- '- title: "%s"\n' "$(yaml_escape "${ISSUE_TITLE:-}")" + printf ' category: "%s"\n' "$(yaml_escape "${ACTIVITY_TYPE:-}")" + printf ' description: "%s"\n' "$(yaml_escape "${ACTIVITY_DESCRIPTION:-}")" +} >> "$ACTIVITIES_FILE" -if [ -z "$SAFE_TITLE" ]; then - SAFE_TITLE="issue-${ISSUE_NUMBER:-unknown}" -fi +append_yaml_split_array "$ACTIVITIES_FILE" " " "tags" "${ACTIVITY_TAGS:-}" -FILE_PATH="data/$YEAR/$MONTH/$DAY/$SAFE_TITLE.md" -EVENTS_FILE="${EVENTS_FILE_PATH:-data/events.yml}" -mkdir -p "$(dirname "$FILE_PATH")" { - printf '# %s\n\n' "${ISSUE_TITLE:-}" - printf '%s\n' "${ISSUE_BODY:-}" -} > "$FILE_PATH" + printf ' events:\n' + printf ' - id: "%s"\n' "$(yaml_escape "${ACTIVITY_ID:-}")" + printf ' link: "%s"\n' "$(yaml_escape "${ACTIVITY_LINK:-}")" + printf ' start_time: "%s"\n' "$(yaml_escape "${ACTIVITY_START_TIME:-}")" + printf ' end_time: "%s"\n' "$(yaml_escape "${ACTIVITY_END_TIME:-}")" +} >> "$ACTIVITIES_FILE" -{ - printf -- '- issue_link: "%s"\n' "$(yaml_escape "${ISSUE_LINK:-}")" - printf ' file_path: "%s"\n' "$(yaml_escape "$FILE_PATH")" - printf ' title: "%s"\n' "$(yaml_escape "${ISSUE_TITLE:-}")" - printf ' start_time: "%s"\n' "$(yaml_escape "${EVENT_START_TIME:-}")" - printf ' end_time: "%s"\n' "$(yaml_escape "${EVENT_END_TIME:-}")" - printf ' location: "%s"\n' "$(yaml_escape "${EVENT_LOCATION:-}")" - printf ' money: "%s"\n' "$(yaml_escape "${EVENT_MONEY:-}")" - printf ' whistleblower: "%s"\n' "$(yaml_escape "${EVENT_WHISTLEBLOWER:-}")" -} >> "$EVENTS_FILE" +# Parse timeline Markdown table: skip header rows (col1 doesn't start with a digit) +append_yaml_table "$ACTIVITIES_FILE" " " "timeline" "deadline" "comment" \ + "${ACTIVITY_TIMELINE:-}" "^[^0-9]" -append_yaml_split_array "$EVENTS_FILE" "hypocrite" "${EVENT_HYPOCRITE:-}" -append_yaml_split_array "$EVENTS_FILE" "tags" "${EVENT_TAGS:-}" +{ + printf ' timezone: "%s"\n' "$(yaml_escape "${ACTIVITY_TIMEZONE:-}")" + printf ' place: "%s"\n' "$(yaml_escape "${ACTIVITY_PLACE:-}")" + printf ' issue_link: "%s"\n' "$(yaml_escape "${ISSUE_LINK:-}")" +} >> "$ACTIVITIES_FILE" diff --git a/.github/scripts/save-restaurant.sh b/.github/scripts/save-restaurant.sh new file mode 100644 index 0000000..6d0d508 --- /dev/null +++ b/.github/scripts/save-restaurant.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +set -euo pipefail + +# shellcheck source=yaml_utils.sh +source "$(dirname "$0")/yaml_utils.sh" + +RESTAURANTS_FILE="${RESTAURANTS_FILE_PATH:-data/restaurants.yml}" + +{ + printf -- '- id: "%s"\n' "$(yaml_escape "${RESTAURANT_ID:-}")" + printf ' name: "%s"\n' "$(yaml_escape "${ISSUE_TITLE:-}")" + printf ' description: "%s"\n' "$(yaml_escape "${RESTAURANT_DESCRIPTION:-}")" +} >> "$RESTAURANTS_FILE" + +append_yaml_split_array "$RESTAURANTS_FILE" " " "features" "${RESTAURANT_FEATURES:-}" + +# Parse food Markdown table: skip header rows by matching known header words in col1 +append_yaml_table "$RESTAURANTS_FILE" " " "food" "name" "price" \ + "${RESTAURANT_FOOD:-}" "^(品名|Dish|名称|Name)" + +{ + printf ' avg_spend: "%s"\n' "$(yaml_escape "${RESTAURANT_AVG_SPEND:-}")" +} >> "$RESTAURANTS_FILE" + +append_yaml_split_array "$RESTAURANTS_FILE" " " "social_values" "${RESTAURANT_SOCIAL_VALUES:-}" + +{ + printf ' address: "%s"\n' "$(yaml_escape "${RESTAURANT_ADDRESS:-}")" + printf ' lat: "%s"\n' "$(yaml_escape "${RESTAURANT_LAT:-}")" + printf ' lng: "%s"\n' "$(yaml_escape "${RESTAURANT_LNG:-}")" + printf ' issue_link: "%s"\n' "$(yaml_escape "${ISSUE_LINK:-}")" +} >> "$RESTAURANTS_FILE" diff --git a/.github/scripts/yaml_utils.sh b/.github/scripts/yaml_utils.sh new file mode 100644 index 0000000..650bed4 --- /dev/null +++ b/.github/scripts/yaml_utils.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +# Shared YAML utility functions for data-save scripts. + +yaml_escape() { + printf '%s' "$1" | sed 's/\\/\\\\/g; s/"/\\"/g' +} + +# Append a YAML array from a comma-separated (or Chinese-comma-separated) string. +# Usage: append_yaml_split_array +append_yaml_split_array() { + local file_path="$1" + local indent="$2" + local key="$3" + local value="$4" + local has_items=0 + + printf '%s%s:\n' "$indent" "$key" >> "$file_path" + + while IFS= read -r item; do + if [ -n "$item" ]; then + has_items=1 + printf '%s - "%s"\n' "$indent" "$(yaml_escape "$item")" >> "$file_path" + fi + done < <(printf '%s' "$value" | awk 'BEGIN{FS="[,,]"} {for (i=1; i<=NF; i++) {gsub(/^[[:space:]]+|[[:space:]]+$/, "", $i); if ($i != "") print $i}}') + + if [ "$has_items" -eq 0 ]; then + printf '%s []\n' "$indent" >> "$file_path" + fi +} + +# Parse a 2-column Markdown table and append YAML list entries. +# Usage: append_yaml_table [header_pattern] +# header_pattern: ERE regex; rows where col1 matches are treated as headers and skipped. +# Expected table format (header row + separator row + data rows): +# | 列1 / Col1 | 列2 / Col2 | +# | --- | --- | +# | value1 | value2 | +append_yaml_table() { + local file_path="$1" + local indent="$2" + local list_key="$3" + local col1_key="$4" + local col2_key="$5" + local table="$6" + local header_pattern="${7:-}" + local has_rows=0 + + while IFS= read -r line; do + # Only process lines that look like table rows + [[ "$line" =~ ^\| ]] || continue + # Skip separator rows (e.g. | --- | --- |) + [[ "$line" =~ ^\|[[:space:]]*-+[[:space:]]*\| ]] && continue + + local col1 col2 + col1=$(printf '%s' "$line" | awk -F'|' '{gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2); print $2}') + col2=$(printf '%s' "$line" | awk -F'|' '{gsub(/^[[:space:]]+|[[:space:]]+$/, "", $3); print $3}') + + # Skip empty or header rows + [ -z "$col1" ] && continue + [ -n "$header_pattern" ] && [[ "$col1" =~ $header_pattern ]] && continue + + if [ "$has_rows" -eq 0 ]; then + printf '%s%s:\n' "$indent" "$list_key" >> "$file_path" + has_rows=1 + fi + printf '%s - %s: "%s"\n' "$indent" "$col1_key" "$(yaml_escape "$col1")" >> "$file_path" + printf '%s %s: "%s"\n' "$indent" "$col2_key" "$(yaml_escape "$col2")" >> "$file_path" + done <<< "$table" +} diff --git a/.github/settings.yml b/.github/settings.yml index e0f706f..4393034 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -48,9 +48,21 @@ labels: color: "#ffffff" description: This will not be worked on - - name: event + - name: activity color: "#0e8a16" - description: Fake Open Source event + description: Public welfare activity / 公益活动 + + - name: conference + color: "#1d76db" + description: Public welfare conference / 公益会议 + + - name: competition + color: "#e4e669" + description: Public welfare competition / 公益竞赛 + + - name: restaurant + color: "#fbca04" + description: Accessible restaurant / 无障碍友好餐厅 branches: - name: main diff --git a/.github/workflows/deploy-data.yml b/.github/workflows/deploy-data.yml index 5a19918..aa4d823 100644 --- a/.github/workflows/deploy-data.yml +++ b/.github/workflows/deploy-data.yml @@ -24,7 +24,7 @@ jobs: echo $( ls -1 *.yml 2>/dev/null | \ sed 's/\.yml$//' | nl | \ - sed 's/^[[:space:]]*\([0-9]*\)[[:space:]]*\(.*\)$/\1. [\2](https:\/\/biyuanshe.github.io\/Fake-Open-Source-wiki\/\2.json)/' + sed 's/^[[:space:]]*\([0-9]*\)[[:space:]]*\(.*\)$/\1. [\2](https:\/\/goodaction-hub.github.io\/GoodAction-data\/\2.json)/' ) >> index.md cd - diff --git a/.github/workflows/submit-event.yml b/.github/workflows/submit-event.yml index fdc7069..17bf1fa 100644 --- a/.github/workflows/submit-event.yml +++ b/.github/workflows/submit-event.yml @@ -1,4 +1,4 @@ -name: Fake Open Source event saving +name: Activity submission on: issues: @@ -8,7 +8,7 @@ on: jobs: store: runs-on: ubuntu-latest - if: "contains(github.event.issue.labels.*.name, 'event')" + if: "contains(github.event.issue.labels.*.name, 'activity')" permissions: contents: write steps: @@ -17,25 +17,27 @@ jobs: - id: issue-parser uses: stefanbuck/github-issue-parser@v3 with: - template-path: ".github/ISSUE_TEMPLATE/Fake-Open-Source-event.yml" + template-path: ".github/ISSUE_TEMPLATE/activity.yml" - - name: Save issue to Markdown & YAML + - name: Save activity to YAML env: ISSUE_NUMBER: ${{ github.event.issue.number }} ISSUE_LINK: ${{ github.event.issue.html_url }} ISSUE_TITLE: ${{ github.event.issue.title }} - ISSUE_BODY: ${{ github.event.issue.body }} - EVENT_TAGS: ${{ steps.issue-parser.outputs.issueparser_tags }} - EVENT_START_TIME: ${{ steps.issue-parser.outputs.issueparser_start_time }} - EVENT_END_TIME: ${{ steps.issue-parser.outputs.issueparser_end_time }} - EVENT_LOCATION: ${{ steps.issue-parser.outputs.issueparser_location }} - EVENT_WHISTLEBLOWER: ${{ github.event.issue.user.html_url }} - EVENT_HYPOCRITE: ${{ steps.issue-parser.outputs.issueparser_hypocrite }} - EVENT_MONEY: ${{ steps.issue-parser.outputs.issueparser_money }} + ACTIVITY_TYPE: ${{ steps.issue-parser.outputs.issueparser_type }} + ACTIVITY_DESCRIPTION: ${{ steps.issue-parser.outputs.issueparser_description }} + ACTIVITY_TAGS: ${{ steps.issue-parser.outputs.issueparser_tags }} + ACTIVITY_ID: ${{ steps.issue-parser.outputs.issueparser_id }} + ACTIVITY_LINK: ${{ steps.issue-parser.outputs.issueparser_link }} + ACTIVITY_START_TIME: ${{ steps.issue-parser.outputs.issueparser_start_time }} + ACTIVITY_END_TIME: ${{ steps.issue-parser.outputs.issueparser_end_time }} + ACTIVITY_TIMELINE: ${{ steps.issue-parser.outputs.issueparser_timeline }} + ACTIVITY_TIMEZONE: ${{ steps.issue-parser.outputs.issueparser_timezone }} + ACTIVITY_PLACE: ${{ steps.issue-parser.outputs.issueparser_place }} run: | bash .github/scripts/save-event.sh - uses: peter-evans/create-pull-request@v8 with: - title: "docs(event): add data of ${{ github.event.issue.title }}" + title: "data(activity): add ${{ github.event.issue.title }}" body: "fix #${{ github.event.issue.number }}" diff --git a/.github/workflows/submit-restaurant.yml b/.github/workflows/submit-restaurant.yml new file mode 100644 index 0000000..3cfa7bd --- /dev/null +++ b/.github/workflows/submit-restaurant.yml @@ -0,0 +1,42 @@ +name: Restaurant submission + +on: + issues: + types: + - opened + +jobs: + store: + runs-on: ubuntu-latest + if: "contains(github.event.issue.labels.*.name, 'restaurant')" + permissions: + contents: write + steps: + - uses: actions/checkout@v6 + + - id: issue-parser + uses: stefanbuck/github-issue-parser@v3 + with: + template-path: ".github/ISSUE_TEMPLATE/restaurant.yml" + + - name: Save restaurant to YAML + env: + ISSUE_NUMBER: ${{ github.event.issue.number }} + ISSUE_LINK: ${{ github.event.issue.html_url }} + ISSUE_TITLE: ${{ github.event.issue.title }} + RESTAURANT_ID: ${{ steps.issue-parser.outputs.issueparser_id }} + RESTAURANT_DESCRIPTION: ${{ steps.issue-parser.outputs.issueparser_description }} + RESTAURANT_FEATURES: ${{ steps.issue-parser.outputs.issueparser_features }} + RESTAURANT_FOOD: ${{ steps.issue-parser.outputs.issueparser_food }} + RESTAURANT_AVG_SPEND: ${{ steps.issue-parser.outputs.issueparser_avg_spend }} + RESTAURANT_SOCIAL_VALUES: ${{ steps.issue-parser.outputs.issueparser_social_values }} + RESTAURANT_ADDRESS: ${{ steps.issue-parser.outputs.issueparser_address }} + RESTAURANT_LAT: ${{ steps.issue-parser.outputs.issueparser_lat }} + RESTAURANT_LNG: ${{ steps.issue-parser.outputs.issueparser_lng }} + run: | + bash .github/scripts/save-restaurant.sh + + - uses: peter-evans/create-pull-request@v8 + with: + title: "data(restaurant): add ${{ github.event.issue.title }}" + body: "fix #${{ github.event.issue.number }}" diff --git a/README.md b/README.md index 8df911a..5a4f500 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,104 @@ -# 伪开源百科 / Fake Open Source wiki +# GoodAction Hub 数据仓库 / GoodAction Hub Data Repository -一个揭露**虚假开源人事物**的公共档案库。/ A public archive repository to expose fake open source people, things, and events. +本仓库是 [GoodAction Hub](https://github.com/GoodAction-Hub/GoodAction-Hub.github.io) 的独立数据仓库,用于存储公益慈善活动、会议和竞赛的结构化数据。 + +This repository is the standalone data repository for [GoodAction Hub](https://github.com/GoodAction-Hub/GoodAction-Hub.github.io), storing structured data for public welfare activities, conferences, and competitions. ## 功能入口 / Features -- [提交事件 / Submit Event][1] -- [审核列表 / Review List][2] -- [JSON API][3] +- [提交活动 / Submit Activity][1] +- [提交餐厅 / Submit Restaurant][2] +- [审核列表 / Review List][3] +- [JSON API][4] + +## 如何添加数据 / How to Add Data + +💡 **新手友好**:推荐通过上方功能入口的"[提交活动][1]"或"[提交餐厅][2]"链接来提交,填写表单即可,无需了解 Git 操作。 + +💡 **Beginner-friendly**: Submit via the "[Submit Activity][1]" or "[Submit Restaurant][2]" links above — just fill in a form, no Git knowledge needed. + +- 活动数据存储在 `data/activities.yml`,`category` 字段区分类型(`meetup`、`conference`、`competition`)。 +- 餐厅数据存储在 `data/restaurants.yml`。 + +All activity data is stored in `data/activities.yml`; all restaurant data is stored in `data/restaurants.yml`. + +如果您熟悉 Git 和 Pull Request 流程,也可以直接编辑对应文件并提交 Pull Request。 + +If you are familiar with Git and Pull Requests, you can also directly edit the corresponding file and submit a Pull Request. + +## 数据结构 / Data Structure + +### 活动 / Activities + +请在 `data/activities.yml` 中,仿照以下格式添加新条目: + +```yaml +- title: 活动名称 (例如:第三届老龄志愿与公益服务学术论坛) + description: 探讨AI时代应对人口老龄化的新策略,推动我国老龄志愿与公益服务事业多元发展 + category: conference # meetup | conference | competition + tags: + - 老龄服务 + - 志愿公益 + - 人工智能 + - 学术论坛 + events: + - id: aging-volunteer-forum-2025 # 全局唯一的ID + link: https://mp.weixin.qq.com/s/qi9gF1ETgk6UvFnnGNSVlg # 链接 + start_time: '2025-11-15 09:00:00' # 开始时间 + end_time: '2025-11-16 17:00:00' # 结束时间 + timeline: + - deadline: '2025-10-19T23:59:00' # 关键日期 (ISO 8601 格式) + comment: '论文征集截止' # 日期说明 + - deadline: '2025-11-15T09:00:00' + comment: '学术年会开始' + - deadline: '2025-11-16T17:00:00' + comment: '学术年会结束' + timezone: Asia/Shanghai # 所在时区 + place: 中国,北京 # 地点 +``` + +**注意事项 / Notes:** + +- `category`: 必须是 `meetup`、`conference` 或 `competition` +- `start_time` / `end_time`: 活动整体的开始和结束时间,格式为 `YYYY-MM-DD HH:mm:ss` +- `timeline.deadline`: 每个环节的关键时间节点,请使用 ISO 8601 标准格式 - `YYYY-MM-DDTHH:mm:ss` +- `timezone`: 请使用标准的 IANA 时区名称(例如 `Asia/Shanghai`),否则会影响时区转换 +- `place`: 活动地址,如 `中国,上海`(`国家,城市`);如果是线上活动,直接写 `线上` + +### 餐厅 / Restaurants -## 免责声明 / Disclaimer +请在 `data/restaurants.yml` 中,仿照以下格式添加新条目: -- **隐私政策 / Privacy Policy**:施害过程中施害人暴露的个人信息不属于隐私,除此之外所有人均应受隐私保护。/ Personal information exposed by the perpetrator during the harmful process is not protected by privacy laws. Beyond that, all individuals should be protected by privacy rights. +```yaml +- id: aimer-coffee-shanghai # 全局唯一的 ID + name: 爱默咖啡 # 餐厅名称(即 Issue 标题) + description: 一家提供手语服务、无障碍通道的温暖咖啡馆 + features: + - 手语服务 + - 无障碍通道 + - 盲文菜单 + food: + - name: 招牌咖啡 + price: ¥35 + - name: 无障碍套餐 + price: ¥68 + avg_spend: ¥50 + social_values: + - 残障就业支持 + - 无障碍通道 + address: 上海市静安区示例路1号 + lat: "31.2304" # GPS 纬度 + lng: "121.4737" # GPS 经度 + issue_link: https://github.com/GoodAction-Hub/GoodAction-data/issues/1 +``` -- **信息来源 / Information Source**:本平台仅提供基于 Git 的分布式信息存储,信息真实性由发布者负责,并由网友辨别、辟谣。/ This platform only provides decentralized information storage based on Git. The authenticity of information is the responsibility of the publisher, and is to be verified and fact-checked by the community. +> 🎉 **每一份贡献都很珍贵,欢迎您的参与!** ## 灵感来源 / Inspiration -- [FFmpeg shame](https://ffmpeg.org/shame.html) -- [996.icu](https://996.icu/) -- [Hax vs 360](https://github.com/hax/heshijun_v_360) +- [BiYuanShe/Fake-Open-Source-wiki](https://github.com/BiYuanShe/Fake-Open-Source-wiki) -[1]: https://github.com/BiYuanShe/Fake-Open-Source-wiki/issues/new?template=Fake-Open-Source-event.yml -[2]: https://github.com/BiYuanShe/Fake-Open-Source-wiki/pulls -[3]: https://biyuanshe.github.io/Fake-Open-Source-wiki/ +[1]: https://github.com/GoodAction-Hub/GoodAction-data/issues/new?template=activity.yml +[2]: https://github.com/GoodAction-Hub/GoodAction-data/issues/new?template=restaurant.yml +[3]: https://github.com/GoodAction-Hub/GoodAction-data/pulls +[4]: https://goodaction-hub.github.io/GoodAction-data/ diff --git a/data/events.yml b/data/activities.yml similarity index 100% rename from data/events.yml rename to data/activities.yml diff --git a/data/restaurants.yml b/data/restaurants.yml new file mode 100644 index 0000000..e69de29