From: Martin Langhoff <[EMAIL PROTECTED]>

---
 utils/growdatastore.py |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)
 create mode 100644 utils/growdatastore.py

diff --git a/utils/growdatastore.py b/utils/growdatastore.py
new file mode 100644
index 0000000..4560a7b
--- /dev/null
+++ b/utils/growdatastore.py
@@ -0,0 +1,31 @@
+#!/usr/bin/python
+
+## Authors: Tomeu Vizoso <[EMAIL PROTECTED]>
+##          Martin Langhoff <[EMAIL PROTECTED]>
+
+import sys
+import os
+import unittest
+import time
+import tempfile
+import shutil
+from datetime import datetime
+
+import dbus
+
+DS_DBUS_SERVICE = "org.laptop.sugar.DataStore"
+DS_DBUS_INTERFACE = "org.laptop.sugar.DataStore"
+DS_DBUS_PATH = "/org/laptop/sugar/DataStore"
+
+bus = dbus.SessionBus()
+proxy = bus.get_object(DS_DBUS_SERVICE, DS_DBUS_PATH)
+data_store = dbus.Interface(proxy, DS_DBUS_INTERFACE)
+
+for i in range(0, 10):
+   resultset, count = data_store.find({}, ['uid'])
+   print count
+   for doc in resultset:
+       newdoc = data_store.get_properties(result['uid'])
+       # TODO: Give it a new name, make a copy 
+       # of the actual files related to this doc.
+       data_store.create(newdoc, '', True)
-- 
1.5.4.34.g053d9

_______________________________________________
Server-devel mailing list
[email protected]
http://lists.laptop.org/listinfo/server-devel

Reply via email to