Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PrintCSS #291

Merged
merged 36 commits into from
Feb 19, 2024
Merged

PrintCSS #291

merged 36 commits into from
Feb 19, 2024

Conversation

rsp4jack
Copy link
Collaborator

Fix #284

@rsp4jack rsp4jack requested review from Mq-b and geihob February 16, 2024 12:30
@rsp4jack rsp4jack added category: homework 卢瑟作业 category: ci issues about CI labels Feb 16, 2024
@rsp4jack
Copy link
Collaborator Author

pdf (1).zip

这个是生成出来的产品

@Mq-b
Copy link
Owner

Mq-b commented Feb 16, 2024

你稍微介绍下这是个啥,别广提 pr。
这样下去 loser homework 仓库结构我都要搞不清了。

@Mq-b
Copy link
Owner

Mq-b commented Feb 16, 2024

还是那句话,让代码块强制换行显得观感很差。

@rsp4jack
Copy link
Collaborator Author

你稍微介绍下这是个啥

基于 README.md 利用 PrintCSS 技术生成 PDF 文件。

README.md 被 generate.py 利用 mit2html 转换为 HTML 并套入 template.html 模板,得到的 HTML 文件被 pagedgen 转换为 PDF。

这样下去 loser homework 仓库结构我都要搞不清了。

.github 里的两个 patch 是用来 patch tree-sitter 源码的,src/现代C++题目 是上述那一套流程需要用到的一些东西

还是那句话,让代码块强制换行显得观感很差。

  1. 不 line wrap,溢出部分直接截取
  2. 保持现有 line wrap
  3. line wrap,使用更窄的 monospace 字体
  4. line wrap,修改页面布局属性(页边距/页面大小)

你选一个。

.github/workflows/printcss.yml Show resolved Hide resolved
python-slugify>=7.0.0
marko>=2.0.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看看能不能换成 pyproject.toml,可选安装依赖

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LHW 毕竟也不是个 python 项目,用 pyproject,toml 感觉有些大材小用了。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LHW 毕竟也不是个 python 项目,用 pyproject,toml 感觉有些大材小用了。

主要是本地编译或者每次CI的时候不想装多余py模块

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个带来的影响可以忽略,毕竟也没有多少包需要装。

@Mq-b
Copy link
Owner

Mq-b commented Feb 17, 2024

  1. 不 line wrap,溢出部分直接截取
  2. 保持现有 line wrap
  3. line wrap,使用更窄的 monospace 字体
  4. line wrap,修改页面布局属性(页边距/页面大小)

你选一个。

我觉得 4 比较实在。

@rsp4jack
Copy link
Collaborator Author

pdf.zip

@Mq-b page margin "1in" -> "1in 0.7in"

@rsp4jack rsp4jack merged commit 6143a98 into main Feb 19, 2024
2 checks passed
@rsp4jack rsp4jack deleted the printcss branch February 19, 2024 02:58
@rsp4jack rsp4jack added the treasure best luse label Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: ci issues about CI category: homework 卢瑟作业 treasure best luse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PrintCSS rocks!
3 participants