-Printscreen-: Difference between revisions
From XPUB & Lens-Based wiki
|
|
Line 1: |
Line 1: |
| --PRINT SCREEN--
| |
|
| |
|
| The code generates a print screen every minute for an hour and saves it as a JPEG. Once the code runs out the images are converted into a gif file (imagemagik) providing an overview of the work carried on during this short period of time. The objective is to use this tool to document a process rather than a product. Its useful to trace back procedures, webpages or reflect on working flow and general research choices.
| |
|
| |
| to work out:
| |
| Control over the speed of display in order to read the lines; right now the gif just gives a vertiginous insight of what I was busy with for an hour without allowing actual access to the information.
| |
|
| |
| <source lang="python">
| |
|
| |
| from PIL import ImageGrab
| |
|
| |
| import datetime, time
| |
|
| |
| start = datetime.datetime.now ()
| |
|
| |
| now = datetime.datetime.now()
| |
|
| |
| intervalo = now - start
| |
|
| |
| while intervalo.total_seconds()<= 3600:
| |
|
| |
| now = datetime.datetime.now()
| |
|
| |
| intervalo = now-start
| |
|
| |
| print intervalo
| |
|
| |
| im = ImageGrab.grab()
| |
|
| |
| printscreen = str(now.strftime("%Y-%m-%d_%H-%M"))+'.jpg'
| |
|
| |
| im.save(printscreen)
| |
|
| |
| time.sleep(60)
| |
|
| |
| #thanks Lucia
| |
|
| |
| </source>
| |
|
| |
| this gif is a lower quality version: "convert test.gif -fuzz 30% -layers Optimize result.gif"
| |
|
| |
| [[File:Luisamoura_prtsc_compact.gif|frame|left]]
| |
Latest revision as of 15:14, 9 April 2014