Stephan Eggermont wrote:
This code allows me to generate some screenshots.
The exporter deletes the old picture, if it exists.

|directory exporter window bounds |
directory := FileSystem workingDirectory / 'pictures' .
directory ensureCreateDirectory.
exporter := DOScreenshotExporter new.
exporter directory: directory.
exporter writeWorldAs: 'world.png'.
window := DOPartiesList new openWithSpec window.
exporter writeMorph: window value as: 'PartiesList.png'.
bounds := window fullBounds.
exporter writeMorph: window value rectangle: (bounds insetBy: 20@20) as: 
'PartOfPartiesList.png'.
window close.
Now what is the best way to associate such code with a Pillar source file.
1. Put screenshot generation script inline?
2. Put screenshot generation script in a separate file with same basename as the produced bitmap file?
  2a. Have a command line handler to manually invoke snapshot generation?
2b. Have a Pillar notation that references the script rather than the produced file, and generate snapshot each time? (maybe good for CI, but slows user down)

cheers -ben

Reply via email to