-
Notifications
You must be signed in to change notification settings - Fork 7
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
1 parent
daf21e2
commit 9f21247
Showing
4 changed files
with
443 additions
and
1 deletion.
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,5 @@ | ||
; https://www.flake8rules.com/ | ||
|
||
[flake8] | ||
max-line-length = 120 | ||
ignore = E203, E402, E741, W503 |
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,53 @@ | ||
name: Parse Markdown and Generate JSON | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # 00:00 UTC | ||
workflow_dispatch: | ||
|
||
jobs: | ||
parse_markdown: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.10.11 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install bs4 markdown2 prettytable PyGithub flake8 black | ||
continue-on-error: true | ||
|
||
- name: Run Flake8 (Linting) | ||
run: flake8 code/ | ||
|
||
- name: Check code formatting | ||
run: black --check code/ | ||
|
||
- name: Run Markdown Parser | ||
id: parse | ||
run: python code/markdown_to_json_parser.py | ||
working-directory: ${{ github.workspace }} | ||
continue-on-error: true | ||
env: | ||
PAPER_TOKEN: ${{ secrets.PAPER_TOKEN }} | ||
|
||
- name: Upload JSON files | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: json_data | ||
path: ${{ github.workspace }}/json_data | ||
|
||
- name: Set output status | ||
run: echo "status=${{ steps.parse.outcome }}" >> $GITHUB_ENV |
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 |
---|---|---|
|
@@ -168,4 +168,5 @@ dmypy.json | |
.pyre/ | ||
|
||
# Custom | ||
local_json_data/ |
Oops, something went wrong.