You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: annual-survey.md
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -58,13 +58,10 @@ $ source venv/bin/activate
58
58
(venv) $ pip install -U pillow # this might be needed if the code fails
59
59
```
60
60
61
-
#### PDF report
62
-
To generate the report, copy the `main.py` file from the previous year, go through all questions and patch up the question IDs to match the contents of the actual survey (questions can move around, be added or removed, so it needs manual analysis). After the questions are patched, a PDF report will be generated by the Python file.
63
-
64
-
After the PDF report is prepared, send a PR to the [surveys](https://github.com/rust-lang/surveys) repository.
65
-
66
61
#### Blog post
67
-
The same Python file is also used to render a blog post. The way it works is that we use a template Markdown file (e.g. `surveys/2023-annual-survey/report/2024-02-19-2023-Rust-Annual-Survey-2023-results.md`) with the contents of the blog post, which is rendered by the `main.py` script. The render process adds charts to the blog post and copies all the used image files and the final rendered Markdown file into a checkout of the [blog repository][blog repository], which you must have somewhere at your filesystem.
62
+
To generate the blog post, copy the `main.py` file from the previous year, go through all questions and patch up the question IDs to match the contents of the actual survey (questions can move around, be added or removed, so it needs manual analysis). After the questions are patched, run the python script. Optionally with `--skip-pdf` to skip the PDF report generation.
63
+
64
+
The way it works is that we use a template Markdown file (e.g. `surveys/2023-annual-survey/report/2024-02-19-2023-Rust-Annual-Survey-2023-results.md`) with the contents of the blog post, which is rendered by the `main.py` script. The render process adds charts to the blog post and copies all the used image files and the final rendered Markdown file into a checkout of the [blog repository][blog repository], which you must have somewhere at your filesystem.
68
65
69
66
To test the contents of the rendered blog post, you have to run the `main.py` script, then run `cargo run` in the blog repository directory and open the built HTML file in your browser of choice. Note that for faster feedback, I would recommend commenting out the rendering of the PDF in `main.py` (which is relatively slow) when making frequent changes to the blog post template.
70
67
@@ -75,3 +72,8 @@ After the blog post is prepared, send a PR to the [blog repository][blog reposit
75
72
You will then also need to update the blog template in the `surveys` repo, but that can be done asynchronously.
0 commit comments