[OLPC library] Documentation Update

Christoph Derndorfer e0425826 at student.tuwien.ac.at
Mon Jul 28 10:01:03 EDT 2008


When writing the "Journal" chapter for our activity handbook 
(http://www.olpcaustria.org/mediawiki/index.php/Journal) I created a 
quick'n'dirty Python script that extracts all the screenshots taken on 
an XO and copies them into the /tmp/ directory which makes it a rather 
quick and painless procedure to transfer lots of screenshots from the XO 
to a USB-drive:

Christoph

---
from sugar.datastore import datastore

import sys
import shutil

(results,count) = 
datastore.find(dict(title=‘Screenshot‘,mime_type=‘image/png‘))
i = 0
for f in results:
i = i + 1
src = f.get_file_path()
dst = ‚/tmp/screenshot%i‘ % (i, ) + ‚.png‘
dict = f.get_metadata().get_dictionary()
if dict[„mime_type“] == „image/png“:
object_id = f.object_id
shutil.copyfile(src, dst)
f.destroy()
---

Seth Woodworth schrieb:
> Oh yes, I can assure you that this works quite well. Screenshots from 
> five XO's here in the office are being uploaded to my server right now.
>
> Screenshots are a complicated problem when you start thinking about 
> translation. But that belongs in another thread and one might argue, a 
> later date.
>
>
>
> On Mon, Jul 28, 2008 at 12:42 PM, Chris Leonard 
> <cjlhomeaddress at gmail.com <mailto:cjlhomeaddress at gmail.com>> wrote:
>
>     As a picture is worth a thousand words, I thought I would pass
>     this link along. I recall some discussion about how to get the
>     many screenshots that would help pretty up the manual and serve to
>     illustrate Sugar's distinct visual style. This looks like a kludgy
>     hack (my favorite kind), but then again so is running back and
>     forth with thumbdrive. I haven't tried it myself, so I can't vouch
>     for it, but I thought it might be of interest.
>     http://wiki.laptop.org/go/Sugar/Quick_screenshot_hack
>     cjl
>
>     _______________________________________________
>     Library mailing list
>     Library at lists.laptop.org <mailto:Library at lists.laptop.org>
>     http://lists.laptop.org/listinfo/library
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Library mailing list
> Library at lists.laptop.org
> http://lists.laptop.org/listinfo/library
>   

-- 
Christoph Derndorfer
Co-Editor
OLPCnews, http://www.olpcnews.com



More information about the Library mailing list