Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
29dd78c
Update README.md
lzcapp Jun 2, 2022
86e5826
Create .gitignore
lzcapp Jun 2, 2022
1b428b8
Update config.json
lzcapp Jun 2, 2022
f0a59c1
Create and move generated files
lzcapp Jun 2, 2022
d458742
Move generated files
lzcapp Jun 2, 2022
8a21d3e
Update README.md
lzcapp Jun 2, 2022
b87fc0f
Update README.md
lzcapp Jun 2, 2022
67f14dc
Set theme jekyll-theme-minimal
lzcapp Jun 3, 2022
2149af7
Set theme jekyll-theme-cayman
lzcapp Jun 3, 2022
994c2e7
Update README.md
lzcapp Nov 22, 2022
8c2b5a7
Modified the calendar page
lzcapp Nov 22, 2022
f8fd002
Remove and regenerate
lzcapp Nov 22, 2022
c084bf1
Update config.json
lzcapp Nov 22, 2022
90f9d95
Generate calendar for the year 2023
lzcapp Nov 22, 2022
855b2ea
Update README.md
lzcapp Nov 22, 2022
487e645
Update .gitignore
lzcapp Jul 13, 2023
5dc3a7c
Calendar-2024
lzcapp Jul 13, 2023
598bfb9
Update README.md
lzcapp Jul 13, 2023
cac5ccd
Update Calendar-2023.html
lzcapp Sep 11, 2023
9c624a6
Update html and pdf
lzcapp Jan 6, 2024
fd3064a
Add 2025 html and pdf
lzcapp Jan 6, 2024
6c8395e
Update README.md
lzcapp Jan 6, 2024
309707d
Update html and pdf
lzcapp Jan 6, 2024
b148035
Update cal.html
lzcapp Jan 6, 2024
271f949
Update page.html
lzcapp Jan 6, 2024
2c0099f
Regenerate html & pdf files
lzcapp Jan 8, 2024
104a94c
Update lang.json
lzcapp Jan 8, 2024
c8087bf
Update index.py
lzcapp Jan 8, 2024
4abaf42
Update README.md
lzcapp Jan 8, 2024
8c80195
Correct typo in comment
lzcapp Jan 24, 2024
6ce9394
Update index.py
lzcapp Nov 24, 2024
c791bc8
Update cal.css
lzcapp Nov 24, 2024
18aa186
Update calendar HTML & PDF
lzcapp Nov 24, 2024
3f43ea7
Update
lzcapp Jul 25, 2025
e027ba3
Update index.py
lzcapp Jul 28, 2025
ee2e65c
Update README.md
lzcapp Jul 28, 2025
81a21ad
Update README.md
lzcapp Jul 28, 2025
916ed86
fix: 初一显示月份
lzcapp Jul 30, 2025
661c5d0
Update
lzcapp Jul 30, 2025
274d8e6
Update README.md
lzcapp Jul 30, 2025
1a02e43
Switch to ASpace submodule and update syntax highlighting
lzcapp Jul 30, 2025
9ccce13
Create ASpace
lzcapp Jul 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/.idea/**
**/build/**
**/dist/**
index.spec
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "js/ASpace"]
path = js/ASpace
url = https://github.com/DIYgod/ASpace
26 changes: 26 additions & 0 deletions .run/OHHC.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="OHHC" type="PythonConfigurationType" factoryName="Python">
<module name="OHHC-Python" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="SDK_NAME" value="Python 3.13 (OHHC-Python)" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/index.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>
48 changes: 0 additions & 48 deletions ASpace.js

This file was deleted.

Binary file removed Calendar-2021.pdf
Binary file not shown.
3,183 changes: 3,183 additions & 0 deletions Calendar-2022.html

Large diffs are not rendered by default.

Binary file added Calendar-2022.pdf
Binary file not shown.
3,183 changes: 3,183 additions & 0 deletions Calendar-2023.html

Large diffs are not rendered by default.

Binary file added Calendar-2023.pdf
Binary file not shown.
3,183 changes: 3,183 additions & 0 deletions Calendar-2024.html

Large diffs are not rendered by default.

Binary file added Calendar-2024.pdf
Binary file not shown.
3,183 changes: 3,183 additions & 0 deletions Calendar-2025.html

Large diffs are not rendered by default.

Binary file added Calendar-2025.pdf
Binary file not shown.
2,075 changes: 1,063 additions & 1,012 deletions Calendar-2021.html → Calendar-2026.html

Large diffs are not rendered by default.

Binary file added Calendar-2026.pdf
Binary file not shown.
46 changes: 36 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,52 @@

## 结果展示

HTML样式展示:[link](./Calendar-2021.html)
HTML样式展示:

PDF样式展示:[link](./Calendar-2021.pdf)
- [2022](https://github.lzc.app/OHHC-Python/Calendar-2022.html)
- [2023](https://github.lzc.app/OHHC-Python/Calendar-2023.html)
- [2024](https://github.lzc.app/OHHC-Python/Calendar-2024.html)
- [2025](https://github.lzc.app/OHHC-Python/Calendar-2025.html)
- [2026](https://github.lzc.app/OHHC-Python/Calendar-2026.html)

PDF样式展示:

- [2022](https://github.lzc.app/OHHC-Python/Calendar-2022.pdf)
- [2023](https://github.lzc.app/OHHC-Python/Calendar-2023.pdf)
- [2024](https://github.lzc.app/OHHC-Python/Calendar-2024.pdf)
- [2025](https://github.lzc.app/OHHC-Python/Calendar-2025.pdf)
- [2026](https://github.lzc.app/OHHC-Python/Calendar-2026.pdf)

## 环境依赖

Python 3 (Python 3.9.1)

本项目使用了以下几个Python第三方库(加粗者为需要另行安装):

- json
- **jsonpath**
- **lunar_python** (一个阴历/阳历转换库:[lunar](http://6tail.cn/calendar/api.html#overview.html))
- html
- **requests**
- `json`
- **`jsonpath`**
- **`lunar_python`** (一个阴历/阳历转换库:[lunar](http://6tail.cn/calendar/api.html#overview.html))
- `html`
- **`requests`**

在测试过程中发现:需要电脑安装openssl
在测试过程中发现:需要电脑安装`openssl`

除此之外,因为项目需要爬取维基百科中对编程语言的介绍,所以需要可以访问维基百科。

如遇`Caused by SSLError`错误,是urllib3版本的问题,可以换用`1.25.11`或者其他低版本,在原环境中重装低版本`urllib3`:

```python
pip install urllib3==1.25.11
```

Prism库:[下载](https://prismjs.com/download#themes=prism&languages=markup+css+clike+javascript+abap+actionscript+ada+apacheconf+apl+applescript+arduino+asciidoc+aspnet+autohotkey+autoit+bash+basic+batch+bison+brainfuck+bro+c+csharp+cpp+coffeescript+crystal+css-extras+d+dart+diff+django+docker+eiffel+elixir+erlang+fsharp+flow+fortran+gherkin+git+glsl+go+graphql+groovy+haml+handlebars+haskell+haxe+http+icon+inform7+ini+j+java+jolie+json+julia+keyman+kotlin+latex+less+livescript+lolcode+lua+makefile+markdown+markup-templating+matlab+mel+mizar+monkey+n4js+nasm+nginx+nim+nix+nsis+objectivec+ocaml+opencl+oz+parigp+parser+pascal+perl+php+php-extras+powershell+processing+prolog+properties+protobuf+pug+puppet+pure+python+q+qore+r+jsx+reason+renpy+rest+rip+roboconf+ruby+rust+sas+sass+scss+scala+scheme+smalltalk+smarty+sql+stylus+swift+tcl+textile+twig+typescript+vbnet+verilog+vhdl+vim+wiki+xojo+yaml)

ASpace:

```shell
git submodule update --init --recursive
```

## 配置文件

在`config.json`中有以下参数可以配置:
Expand All @@ -34,6 +60,6 @@ Python 3 (Python 3.9.1)

## 运行

下载程序安装好环境运行index.py
下载程序安装好环境运行index.py

输出为类似`Calendar-2021.html`的文件
输出为`Calendar-[YYYY].html`,您可以用“打印”的方式将其转换为PDF格式文件。
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-cayman
19 changes: 16 additions & 3 deletions cal.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,23 @@
}

body {
font-family: 'Space Mono', monospace, 'Noto Serif SC', 'Noto Sans SC Sliced';
font-family: 'JetBrains Mono', 'JetBrains Mono';
font-feature-settings: "liga" 0;
font-size: 5mm;
}

.description {
font-family: 'JetBrains Mono', sans-serif;
}

.lunar {
font-family: 'JetBrains Mono', sans-serif;
}

.main-lunar {
font-family: 'JetBrains Mono', sans-serif;
}

.monthly h1 {
text-align: center;
}
Expand Down Expand Up @@ -159,7 +171,7 @@ body {
.page .description {
position: absolute;
width: 130mm;
bottom: 70mm;
bottom: 90mm;
color: #666;
text-align: justify;
font-size: 0.8em;
Expand Down Expand Up @@ -190,7 +202,7 @@ body {

.page ul.date {
width: 174.5mm;
height: 41mm;
height: 50mm;
position: absolute;
display: table;
left: 17.5mm;
Expand All @@ -211,6 +223,7 @@ body {
list-style: none;
display: table-cell;
height: 40mm;
width: 30mm;
border-left: 0.5mm dotted gray;
box-sizing: border-box;
vertical-align: top;
Expand Down
16 changes: 7 additions & 9 deletions cal.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
<!doctype html>
<html>
<html lang="zh-CN">
<head>
<link rel="stylesheet" href="cal.css">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-light.min.css">
<link href="prism.css" rel="stylesheet"/>
<link rel="stylesheet" href="cal.css"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/atom-one-light.min.css" integrity="sha512-o5v54Kh5PH0dgnf9ei0L+vMRsbm5fvIvnR/XkrZZjN4mqdaeH7PW66tumBoQVIaKNVrLCZiBEfHzRY4JJSMK/Q==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link href="./css/prism.css" rel="stylesheet"/>
<title>Calendar</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js" integrity="sha512-EBLzUL8XLl+va/zAsmXwS7Z2B1F9HUHkZwyS/VKwh3S7T/U0nF4BaU29EP/ZSf6zgiIxYAnKLu6bJ8dqpmX5uw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
</head>
<body>
{{page}}
<script src="ASpace.js"></script>
<script src="./js/ASpace/ASpace.min.js"></script>
<script>aSpace(document.getElementsByClassName('description'));</script>
<script>
hljs.initHighlightingOnLoad();
var prism = document.createElement('script');
prism.src = 'prism.js';
let prism = document.createElement('script');
prism.src = './js/prism.js';
document.body.appendChild(prism);
</script>
</body>
Expand Down
4 changes: 2 additions & 2 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"year": 2021,
"qr": true,
"year": 2026,
"qr": false,
"punched": false,
"monthly": true
}
3 changes: 3 additions & 0 deletions css/prism.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading