aboutsummaryrefslogtreecommitdiffstats
path: root/tagit/apps
diff options
context:
space:
mode:
Diffstat (limited to 'tagit/apps')
-rw-r--r--tagit/apps/port_data.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tagit/apps/port_data.py b/tagit/apps/port_data.py
index cda2d63..fc11b4d 100644
--- a/tagit/apps/port_data.py
+++ b/tagit/apps/port_data.py
@@ -1,8 +1,20 @@
+
+# standard imports
import os
+import pickle
+
+# tagit imports
from tagit.utils import ns
from tagit.utils.bsfs import URI
+# load data
def add_port_data(store):
+ with open(os.path.join(os.path.dirname(__file__), 'port-data.pkl'), 'rb') as ifile:
+ for triple in pickle.load(ifile):
+ store._backend._graph.add(triple)
+
+
+def add_port_data2(store):
# tags
t_hello = store.node(ns.bsfs.Tag, URI('http://example.com/me/tag#hello')) \
.set(ns.bst.label, 'hello')