Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hayd1n/wsctw-topics-flarum-post-2
全國技能競賽題目自動更新發佈到Flarum
https://github.com/hayd1n/wsctw-topics-flarum-post-2
Last synced: 26 days ago
JSON representation
全國技能競賽題目自動更新發佈到Flarum
- Host: GitHub
- URL: https://github.com/hayd1n/wsctw-topics-flarum-post-2
- Owner: hayd1n
- License: gpl-3.0
- Created: 2021-09-10T21:16:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-07T06:39:48.000Z (about 3 years ago)
- Last Synced: 2024-11-07T07:20:57.341Z (3 months ago)
- Language: Python
- Size: 38.1 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WSCTW-Topics-Flarum-Post-2
全國技能競賽題目自動更新發佈到Flarum.
使用Python搭配[wdasec-announcement-crawler](https://github.com/CRT-HAO/wdasec-announcement-crawler)進行了重寫
## 部署
1. 初始化submodule
```
git submodule init
git submodule update
```
2. 安裝相依套件自動安裝全部
```
pip3 install -r requirements.txt
```
或 手動安裝
- requests `pip3 install requests`
- BeautifulSoup4 `pip3 install beautifulsoup4`
- pyFlarum `pip3 install pyflarum`
- pytablewriter `pip3 install pytablewriter`
- python-dotenv `pip3 install python-dotenv`
3. 編寫配置檔
在目錄下新增`.env`檔案
```
forum_url = Flarum論壇網址
username = 使用者帳號
password = 使用者密碼announcement_url = 技能競賽題目公告網址
discussion_id = 用於發布更新的Flarum論壇討論串
```
## 運行```
python3 main.py
```
## 範例
[https://taiwanskills.org/d/11-51](https://taiwanskills.cish.xyz/d/11-51)