2023,再见!

This commit is contained in:
yzqzss 2023-12-24 02:06:11 +08:00
parent e9cac36d1e
commit 50cec8ad11
3 changed files with 71 additions and 0 deletions

34
.github/workflows/main.yml vendored Executable file
View File

@ -0,0 +1,34 @@
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.6.0
- name: Setup Python
uses: actions/setup-python@v4.3.1
- name: Run a one-line script
run: python main.py
- name: Commit files
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "gen README.md"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

35
main.py Normal file
View File

@ -0,0 +1,35 @@
flag = 0
markdown = """# review-2023
写好了吗写好了快交AI 写的不算数哦
- 2022 年的年终总结见[saveweb/review-2022](https://github.com/saveweb/review-2022)
保持传统本项目将长期维护直到2025年初
**想要添加您的年终总结请发 Issue 或编辑 metadata.md 发PR不需要填写博客ID**
---
"""
with open('metadata.md', 'r') as f:
lines = f.read().splitlines()
header = lines[0:2]
lines = set(lines[2:])
lines.discard('')
lines = list(lines)
lines.sort()
# with open('metadata.md', 'w') as f:
# for line in header:
# f.write(line+'\n')
# for line in lines:
# f.write(line+'\n')
with open('README.md', 'w') as f:
f.write(markdown+'计数: '+str(len(lines))+' 篇。\n\n')
f.write('\n'.join(header))
f.write('\n'.join(set(lines)))

2
metadata.md Normal file
View File

@ -0,0 +1,2 @@
| Article | Blog\_ID | IA\_Archived |
| --- | --- | --- |