blob: d19bc9d02cdd98d45bac25bd5bced5d03baa4d11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/usr/bin/env python
from sugar.datastore import datastore
import sys
import shutil
def get_images():
rtn = []
(results,count) = datastore.find(dict(mime_type="image/png"))
for f in results:
dict = f.get_metadata().get_dictionary()
if dict["mime_type"] == "image/png":
rtn.append(f.object_id)
f.destroy()
return rtn
if __name__ == '__main__':
imagelist = get_images()
for i in imagelist:
print('\n%s'%i)
|