aboutsummaryrefslogtreecommitdiffstats
path: root/tagit/apps
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2023-02-17 08:32:27 +0100
committerMatthias Baumgartner <dev@igsor.net>2023-02-17 08:32:27 +0100
commit6889cff096d30e76cc5379ee68da42b555895eed (patch)
tree35b43597ce989ef714aeb361bd6e32e12ddc70e0 /tagit/apps
parent906076a24fd3baca68e0381aca1953a05f5b45b7 (diff)
downloadtagit-6889cff096d30e76cc5379ee68da42b555895eed.tar.gz
tagit-6889cff096d30e76cc5379ee68da42b555895eed.tar.bz2
tagit-6889cff096d30e76cc5379ee68da42b555895eed.zip
info tile update and port data loading
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')