爬取洛谷题目并用 markdown 格式保存
Project description
lgsv
LuoGu problem/training SaVer.
爬取洛谷题目。 尚未完工。
目前实现的功能:
- 爬取题单
- 将题目的 markdown 保存下来,存到当前目录的 out.md 中
使用方式:将仓库克隆下来,用 python 运行 src/lgsv/cli.py。
命令行选项:
usage: lgsv [-h] [-p PROBLEM] [-t TRAINING] [--pandoc-args PANDOC_ARGS] [--order ORDER] [-c COOKIE] [-o OUTPUT]
爬取洛谷题目并且进行格式转化
options:
-h, --help show this help message and exit
-p PROBLEM, --problem PROBLEM
题目列表
-t TRAINING, --training TRAINING
题单列表
--pandoc-args PANDOC_ARGS
传给pandoc的参数(未实现)
--order ORDER 指定题目部分的顺序,用逗号分隔。
b/background 对应题目背景
s/samples 对应样例
if/inputFormat 对应输入格式
of/outputFormat 对应输出格式
h/hint 对应说明/提示
d/description 对应题目描述
tr/translation 对应题目翻译。
-c COOKIE, --cookie COOKIE
洛谷cookie
-o OUTPUT, --output OUTPUT
输出 markdown 的位置
例子:
例如,要将保存编号为 100,101 的题单和 P11233 按顺序保存题目背景,描述,输入格式,输出格式,将结果保存到 a.md ,使用 lgsv -t 100 -t 101 -p P11233 --order=b,d,if,of -o a.md。
待办:
- 编写pytest
- 处理各类异常
- 添加更多功能
- 完善文档
- 其它格式
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lgsv-0.1.4.tar.gz.
File metadata
- Download URL: lgsv-0.1.4.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a165cba5c0bf7050b78f2443b4bd9f8aefe2bbfbb927d439aa45511f3e78d856
|
|
| MD5 |
70c44e1dbeaa89eb0c902e156c952616
|
|
| BLAKE2b-256 |
243353f4d21689e71b5f1f87769c9b05c2b21c59bc899361ccd906e9a0102fe7
|
Provenance
The following attestation bundles were made for lgsv-0.1.4.tar.gz:
Publisher:
upload.yaml on Sving1024/lgsv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lgsv-0.1.4.tar.gz -
Subject digest:
a165cba5c0bf7050b78f2443b4bd9f8aefe2bbfbb927d439aa45511f3e78d856 - Sigstore transparency entry: 202726481
- Sigstore integration time:
-
Permalink:
Sving1024/lgsv@49fc85d3c4794bb3d29b5f893e197bcdfe810f83 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/Sving1024
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
upload.yaml@49fc85d3c4794bb3d29b5f893e197bcdfe810f83 -
Trigger Event:
release
-
Statement type:
File details
Details for the file lgsv-0.1.4-py3-none-any.whl.
File metadata
- Download URL: lgsv-0.1.4-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31cb3b16bee6bd4e15a8af7a8ef9944cdb8e7dad9065fd86569540b39075e542
|
|
| MD5 |
836b5b5b14672b1a11a0259a22ca2f23
|
|
| BLAKE2b-256 |
87b442ca7c8b112c4f72bf9486f549fd7a56274a450b722591217263a649762b
|
Provenance
The following attestation bundles were made for lgsv-0.1.4-py3-none-any.whl:
Publisher:
upload.yaml on Sving1024/lgsv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lgsv-0.1.4-py3-none-any.whl -
Subject digest:
31cb3b16bee6bd4e15a8af7a8ef9944cdb8e7dad9065fd86569540b39075e542 - Sigstore transparency entry: 202726488
- Sigstore integration time:
-
Permalink:
Sving1024/lgsv@49fc85d3c4794bb3d29b5f893e197bcdfe810f83 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/Sving1024
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
upload.yaml@49fc85d3c4794bb3d29b5f893e197bcdfe810f83 -
Trigger Event:
release
-
Statement type: