Document Entries - AriosJentu/TestingDocumentGenerator GitHub Wiki
There is some information about entries for the document.
Classes
There is only one basic class to work with document entries:
DocumentEntries— class to work with document's entries. Can contain any information, which should be presented inPageStyle'stest_formatobject.
Usage in Assignment definitions
Document Entries class can be obtained with importing Imports module from Modules:
import Modules.Imports as Imports
This class contained in Imports.Entries module.
Document Entries
This class containing any information which can be presented in page layout.
For example, look at the test_format variable in Document Layout page:
\generatepage{ {control_event} \#{event_number} }{ {student} }{ {group} }{
{exercises}
}
Here defined format-variables of document — {control_event}, {event_number}, and page variables — {student}, {group} and {exercises}. First of them will be replaces with DocumentEntries object. Page variables parses automatically from file, from name or from count (Look at the usage).
test_format string is a format-string, such that this variables should be moved in curly brackets in this string.
Usage:
control_event = "Name"
event_number = 1
document_entries = Imports.Entries.DocumentEntries(control_event=control_event, event_number=event_number)
This example generates entries with control event name and event number, which will be replaced in document page in test_format.