This is a Python tool designed to automatically generate professional, academic-style PDF worksheets for the Web3 Talents Blockchain Fundamentals course.
Instead of manually formatting documents every week, this script uses a simple "Template System." You just paste your raw text into the configuration section at the top of the script, and it automatically formats and generates two separate PDFs: one for the General Task and one for the Group Tasks.
- Python 3.x installed on your computer.
- The fpdf2 library (Note: Do not install the old
fpdflibrary, it must befpdf2).
- Download or clone this project to your computer.
- Open your terminal or command prompt (or the terminal in PyCharm).
- Install the required PDF library by running:
pip install fpdf2 - Important: Place your organization's logo in the same folder as the script and name it
logo.png. If you don't have a logo, the script won't crash; it will simply place a[LOGO]text box placeholder in the top left corner.
- Open the Python script in your code editor (e.g., PyCharm).
- At the very top of the file, locate the "1. PASTE YOUR TEXT HERE FOR THE NEW WEEK" section.
- Update the variables for the current week. All you have to do is replace the text inside the quotation marks for:
SHEET_NUMBER(e.g., "3")SHEET_TOPIC(e.g., "Wallets & P2P Networks")GENERAL_TASK_STEPS,GENERAL_TASK_CHEAT_SHEET, etc.GROUP_TASKS
- Save the file.
- Run the script by clicking the "Play/Run" button in PyCharm, or by typing
python pdf_creator.pyin your terminal. - The script will instantly generate two freshly formatted PDF files in the exact same folder:
Sheet_X_General_Task.pdfSheet_X_Group_Tasks.pdf
- You can use standard hyphens (
-) for bullet points. - You can use standard Markdown links in the text (e.g.,
[Link Text](https://www.example.com)) and they will be rendered correctly in the PDF as clickable links. - The script automatically handles page breaks, spacing, and styling so you don't have to worry about the layout breaking when you add long paragraphs.