I like to share a python script i use to easily and quickly generate lessons for girlpacks.
What it does is it takes images which are sorted by a number suffix like "image 1.jpg" or "image 02.jpg" and so on inside the "images" folder of a girlpack, and create a json file inside the "text/lessons" folder, named after the first image without the number suffix.
This is done by copying the paths of all images to the clipboard before running the script (CTRL + SHIFT + C)
If no images paths are in the clipboard it will abboard. make sure the images are actually inside the girlpacks images order, else the text/lessons folder will not be in the correct location (it will be created if non exists).
The images will automatically be recognized as portraits if they are higher than wide and backgrounds if they are wider than high. the images will than be moved automatically inside the images/lessons portraits or images/lessons background folder (they will be created if non exists), when the lesson is created. They will also be correctly used as either portraits or backgrounds inside the lesson json file, to prevent excessive rescaling.
Advanced features are if images have a letter a, b, c, d before the number. They will be used for an answer branch.
For example "image a1.jpg" and "image a2.jpg" will be put under the answer one dialogue.
so as an example:
beforequestion = image 1, image 2
- > answer1: image a1, image a2
OR -> answer2: image b1
and so on.
Bonus feature, if an image ends with "finisher1", "finisher2" and so on, they will be added to all existing answer branches.
for example if there is image a1, image a2, image b1 and image finisher1.
Than the two answer branches will be
answer1: image a1, image a2, image finisher1
answer2: image b1, image finisher1
default options are:
minopeness=0 and max openess=100
repeatable = true
openessgain = [1, 1, 1, 1]
rightanswer=0 (the first answer)
After running the script all that is to do is editing the "line" property inside the json file, to add some text. or not if one does only want a slideshow thats also valid.
Remove the .txt extension from the file before running. pyperclip is required.
I recommend "advance renamer" to bulk rename and sort multiple images at once.
USAGE in short:
- put images inside girlpack "images" folder
- rename images to "lessonname" <image number>.jpg or png
- select all images and press (CTRL + SHIFT + C) to copy their paths
- run script
- modify the lesson file inside "text/lessons" folder how you like
- DONE