[tracker] data-generators: Fixed import and generator scripts



commit b998a484adfcfadf2ff41b077ee758ee36fe5908
Author: Martyn Russell <martyn lanedo com>
Date:   Wed Dec 2 15:39:04 2009 +0200

    data-generators: Fixed import and generator scripts

 utils/data-generators/generate-all-and-import.sh   |    8 ++++++--
 utils/data-generators/generate-all.sh              |   12 ++++++------
 ...bookmarks.py => generate-data-for-bookmarks.py} |    0
 ...es.py => generate-data-for-contact-messages.py} |    0
 ...erate-gossip.py => generate-data-for-gossip.py} |    0
 ...enerate-music.py => generate-data-for-music.py} |    0
 ...bhistory.py => generate-data-for-webhistory.py} |    0
 7 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/utils/data-generators/generate-all-and-import.sh b/utils/data-generators/generate-all-and-import.sh
index afab753..257ab92 100755
--- a/utils/data-generators/generate-all-and-import.sh
+++ b/utils/data-generators/generate-all-and-import.sh
@@ -3,5 +3,9 @@
 # takes as one parameter the number of entries that should be 
 # generated in each category
 
-./generate_all.sh $1
-./import_ttl.sh *.ttl
+./generate-all.sh $1
+
+for data in *.ttl
+do
+   tracker-import $data
+done
diff --git a/utils/data-generators/generate-all.sh b/utils/data-generators/generate-all.sh
index 4086e9e..aa6f394 100755
--- a/utils/data-generators/generate-all.sh
+++ b/utils/data-generators/generate-all.sh
@@ -10,13 +10,13 @@ entries=$1
 fi
 
 echo "Generating $entries entries per category"
-chmod +x gen_*
 
-for generator in `ls gen_*`
+for generator in `ls generate-data-for-*.py`
 do
-  echo "Running $generator"
-  ./$generator $entries > ${generator#gen_}.ttl
+   echo "Running $generator"
+   dest=`echo $generator | sed -s "s/\.py/\.ttl/"`
+  ./$generator $entries > $dest
 done
 
-cat contacts_messages.py.ttl
-rm contacts_messages.py.ttl
+#cat contacts.ttl
+#rm -f contacts.ttl
diff --git a/utils/data-generators/generate-bookmarks.py b/utils/data-generators/generate-data-for-bookmarks.py
similarity index 100%
rename from utils/data-generators/generate-bookmarks.py
rename to utils/data-generators/generate-data-for-bookmarks.py
diff --git a/utils/data-generators/generate-contact-messages.py b/utils/data-generators/generate-data-for-contact-messages.py
similarity index 100%
rename from utils/data-generators/generate-contact-messages.py
rename to utils/data-generators/generate-data-for-contact-messages.py
diff --git a/utils/data-generators/generate-gossip.py b/utils/data-generators/generate-data-for-gossip.py
similarity index 100%
rename from utils/data-generators/generate-gossip.py
rename to utils/data-generators/generate-data-for-gossip.py
diff --git a/utils/data-generators/generate-music.py b/utils/data-generators/generate-data-for-music.py
similarity index 100%
rename from utils/data-generators/generate-music.py
rename to utils/data-generators/generate-data-for-music.py
diff --git a/utils/data-generators/generate-webhistory.py b/utils/data-generators/generate-data-for-webhistory.py
similarity index 100%
rename from utils/data-generators/generate-webhistory.py
rename to utils/data-generators/generate-data-for-webhistory.py



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]