]> git.quilime.com - visual-archive.git/commitdiff
Some updates.
authorGabriel Dunne <gdunne@quilime.com>
Sat, 23 Mar 2013 07:39:26 +0000 (00:39 -0700)
committerGabriel Dunne <gdunne@quilime.com>
Sat, 23 Mar 2013 07:39:26 +0000 (00:39 -0700)
.gitmodules
README [deleted file]
convert_gifs_to_static.py
download_gifs.js [deleted file]
download_gifs.py
to_sqlite.js [deleted file]

index 2d78845a30341da71ce9009c5c8caaac10888857..6227d8c0ca1b76340749b67f1dea6d8edc96400c 100644 (file)
@@ -1,6 +1,6 @@
 [submodule "pjscrape"]
-      path = pjscrape
-      url = git@github.com:nrabinowitz/pjscrape.git
+    path = pjscrape
+    url = git@github.com:nrabinowitz/pjscrape.git
 [submodule "phantomjs"]
        path = phantomjs
        url = git@github.com:ariya/phantomjs.git
diff --git a/README b/README
deleted file mode 100644 (file)
index e69de29..0000000
index af52297b5a93a113ebce08cd83583add701f8fe1..a4fb5f51b0d8d0d77246beefc8f3b64962ce79e1 100644 (file)
@@ -1,20 +1,3 @@
-# import json
-# import os
-# from pprint import pprint
-# json_data = open('prelinger.json')
-
-# data = json.load(json_data)
-# #pprint(data)
-
-# for clip in data['clips']:
-#     thumb = clip['thumbnail'].rpartition('?')[0]
-#     print thumb
-#     os.system('cd gifs/prelinger/; curl -O ' + thumb)
-
-# json_data.close()
-# convert gifs/prelinger/0540_1935_Pontiac_Advertising_R2_13_38_44_00_3mb.gif[3] -coalesce out.gif
-# convert gifs/prelinger/0540_Spain_in_Revolt_R3_13_00_52_20_3mb.gif -format "%[scenes]" info: | tail -n 1
-
 import os
 src_path="gifs/prelinger_anim/"
 dest_path="gifs/prelinger_static/"
@@ -40,12 +23,6 @@ def main():
                 staticFrame = 0;
 
         os.system('convert ' + src_path + gif + '[' + str(staticFrame) + '] -coalesce ' + dest_path + gif)
-        # try:
-        #     with open(dest_path + gif) :
-        #         os.system('convert ' + src_path + gif + '[' + str(staticFrame) + '] -coalesce ' + dest_path + gif)
-        #         pass
-        # except IOError:
-        #     print 'Oh dear.'
 
 
 class GIFError(Exception): pass
@@ -80,4 +57,3 @@ def get_gif_num_frames(filename):
 
 if __name__ == "__main__":
     main()
-
diff --git a/download_gifs.js b/download_gifs.js
deleted file mode 100644 (file)
index c73543d..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-var exec = require('child_process').exec;
-var clips = require('./prelinger.json'); clips = clips.clips;
-
-// var count = 0;
-
-// var dl_thumb = function (t)  {
-//     console.log("downloading", t);
-//     exec('cd gifs/prelinger; curl -O ' + t);
-//     count++;
-// }
-
-
-setInterval(function(){
-    console.log('hit');
-}, 2000);
-
-
-// for (var i = 0; i < 1; i++) {
-//     var t = clips[i]['thumbnail'].split("?")[0];
-//     dl_thumb(t);
-// }
-
index 92c1049f79af00af114b9ba984737150db0d1f27..3a0b93ccc96aa9a10309ecb2212c802461bf90ca 100644 (file)
@@ -4,7 +4,6 @@ from pprint import pprint
 json_data = open('prelinger.json')
 
 data = json.load(json_data)
-#pprint(data)
 
 for clip in data['clips']:
     thumb = clip['thumbnail'].rpartition('?')[0]
diff --git a/to_sqlite.js b/to_sqlite.js
deleted file mode 100644 (file)
index 7663f01..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-// output to sqlite
-
-var thumbs = require('./prelinger_thumbs.json');
-
-console.log(thumbs[0]);
-
-var sqlite3 = require('sqlite3').verbose();
-var db = new sqlite3.Database('prelinger.db');
-db.serialize(function() {
-
-  db.run("CREATE TABLE lorem (info TEXT)");
-
-  /*
-CREATE TABLE IF NOT EXISTS entries(
-id INTEGER PRIMARY KEY AUTOINCREMENT,
-added DEFAULT CURRENT_TIMESTAMP,
-link TEXT,
-title TEXT,
-desc TEXT,
-url TEXT,
-mimetype TEXT)
-  */
-
-  var stmt = db.prepare("INSERT INTO lorem VALUES (?)");
-  for (var i = 0; i < 10; i++) {
-      stmt.run("Ipsum " + i);
-  }
-  stmt.finalize();
-
-  db.each("SELECT rowid AS id, info FROM lorem", function(err, row) {
-      console.log(row.id + ": " + row.info);
-  });
-});
-
-db.close();