Write a grid notes paper generator with Python

--

The very first time when I use grid paper can be dated back three years ago when I was in BCG as a PTA. I found it’s very useful to draft slides layout, excel charts on grid paper. Then, I start to try any sorts of grid notebooks I can find in the bookstore. Thanks to the huge resources of python packages, writing a grid paper generator with python isn’t a hard stuff. With some basic syntax, you can also build your own from scratch.

Project Repo

Open the GitHub repository
  1. Fork it
  2. Clone it and create a copy on your computer
  3. Modify the settings.py file
  4. Run the main.py
  5. (optional) give me a pull request with your latest updates

Study tips

  1. Check the tutorial of reportlab package first, get to know how to create a canvas, put something on it and export it to the pdf file
  2. Check how the grid function works
  3. Start to build the basic main python file: create a canvas > generate the grid > export
  4. Use list .append() and while loop function to create the xlist/ylist (pls check out myfunc.py/xylist)
  5. Because you would like to add a major grid in the end, so please make sure the total numbers of both columns and rows you create can be divided by 5, the hint is trying to use the for loop inside the while loop
  6. Write a boolean variable into your fun, so that both major/minor grids can call it
  7. Use xylist to draw a grid
  8. Now you might find out the whole grid doesn’t locate at the middle
  9. Create the align() function to compute the right starting point, then pass the value to xylist[0]
  10. Everything just done, but try to do more! Separate all the setting and canvas Spec from main.py

Settings attribute

--

--