mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
added makePdf function, documentation, new version
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from .funcs import *
|
||||
from .__init__ import getGenList
|
||||
from worksheetgen.wg import Worksheet
|
||||
|
||||
genList = getGenList()
|
||||
|
||||
@@ -8,3 +9,11 @@ genList = getGenList()
|
||||
def genById(id):
|
||||
generator = genList[id][2]
|
||||
return (generator())
|
||||
|
||||
def makePdf(id, count):
|
||||
generator = genList[id][2]
|
||||
title = genList[id][1]
|
||||
ws = Worksheet(title=title)
|
||||
for i in range(count):
|
||||
ws.add_problem(generator()[0])
|
||||
ws.write_pdf()
|
||||
|
||||
Reference in New Issue
Block a user