Labnotes Generator
The tool takes data from all provided files and sorts them by given date. Afterwards, a HTML file with the correct HTML classes is created. To include the desired style the user can provide a customized CSS file, which recognizes and styles the given classes. To add images, you have to write the HTML code into the procedure section. The provided java script file is necessary to expand and collapse the singe boxes. If provided, the tool will also recognize special keywords and connects these with a link. This is especially useful to refer to standard protocols. The python script, the JavaScript file and a CSS file are freely available to the whole iGEM community. You can download a zip file containing the script, templates and example data here. Please acknowledge iGEM team Bielefeld-CeBiTec 2017 when using this tool and feel free to tell your friends about it.
Preparation
>YYYY-MM-DD
Team
Experiment (Aim/superior experimental context)
Investigators
Title (Title or main task of the experiment)
Procedure
Team
Experiment (Aim/superior experimental context)
Investigators
Title (Title or main task of the experiment)
Procedure
The “Procedure” part consists of multiple lines starting right after the “Title” line. You can write just text or add also a minus at the beginning of each line to add bullet points. Multiple minuses for building up a hierarchy are possible, too. Be sure to save these files with a coding in “UTF-8”, otherwise you cannot display characters like “µ” in “µl”.
{"key1" : "substitution1",
"key2" : "substitution2",
"key3" : "substitution3"}
"key2" : "substitution2",
"key3" : "substitution3"}
Usage
python labnotes_creator.py <input file/folder>
-names <names dict> -protocols <protocols dict>
-top <html top insert>
-bottom <html bottom insert>
-nojs -nocss
-out <output folder/path>
README
Use the *_template.txt files to create your own files.
labnotes file:
Following date formats are accepted:
YYYY-MM-DD
DD.MM.YYYY
MM/DD/YYYY
You can use "-" at the beginning of each line in the procedure to create bullet points. Use multiple minuses in a row to create lower levels of the list.
After each entry you have to place an empty line.
Using HTML code for formating, like "<i>italic text</i>" is possible.
The order of the entries does not matter. Entries are sorted automatically by the date.
names-dict:
Use the initials as key and the full names as values for the dictionary format. New entries are seperated by commas. The last entry is not followed by a comma. The file has to be saved with the ANSI coding, otherwise it cannot be imported into python as a dictionary!
protocols-dict:
Same rules for this dictionary as for the names-dict. The template contains in the value also a placeholder for a link. The keywords can consist of multiple words. All letters MUST be written in lower case! Otherwise it wont work.
command line input:
example call:
-python labnotes_generator.py labnotes_example.txt -names names_dict_example.txt -protocols protocols_example.txt -out output
-> creates HTML, JS and CSS files in new folder "output"
-> creates HTML, JS and CSS files in new folder "output"
python labnotes_generator.py <input file/folder>
-> in case of refer to a folder ALL files within this folder have to be labnote files!
-> in case of refer to a folder ALL files within this folder have to be labnote files!
-names <txt file> specifies file containing names directory
-protocols <txt file> specifies file containing protocol directory
-top <HTML file> specifies HTML file to which the new generated content is appended to
-bottom <HTML file> specifies HTML file which is appended to the generated content
-out <name of output folder> specify existing or not existing folder/path to which all generated content is saved to
-nocss suppress generating a CSS file
-nojs suppress generating a JS file
-h or -help get info to all commands
-protocols <txt file> specifies file containing protocol directory
-top <HTML file> specifies HTML file to which the new generated content is appended to
-bottom <HTML file> specifies HTML file which is appended to the generated content
-out <name of output folder> specify existing or not existing folder/path to which all generated content is saved to
-nocss suppress generating a CSS file
-nojs suppress generating a JS file
-h or -help get info to all commands