This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function timeline($fieldname, $options = array(), $timeline = null) | |
{ | |
$timeline = $timeline || get_current_timeline(); | |
try { | |
$text = strtolower($timeline->$fieldname); | |
} catch (Exception $e) { | |
'"' . $fieldName . '"" does not exist for timelines!'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, sys | |
for subdir, dirs, files in os.walk(sys.argv[1]): | |
print subdir | |
for file in files: | |
print file | |
f = open(subdir+'/'+file, 'r') | |
lines = f.readlines() | |
f.close() | |
f = open(subdir+'/'+file, 'w') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mysql = require('mysql'); | |
var client = mysql.createConnection({ | |
host: 'localhost', | |
user: 'omeka', | |
password: 'omeka', | |
port: 8889, | |
database: 'neatline' | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mysql = require('mysql'); | |
var randy = require('randy'); | |
var _ = require('underscore'); | |
// Query base. | |
var sql = 'INSERT INTO omeka_neatline_records (' + | |
'exhibit_id,'+ | |
'title,'+ | |
'description,'+ | |
'map_active,'+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SVGtoWKT.convert('<svg><polygon points="1,2 3,4 5,6" /><line x1="7" y1="8" x2="9" y2="10" /></svg>'); | |
>>> "GEOMETRYCOLLECTION(POLYGON((1 -2,3 -4,5 -6,1 -2)),LINESTRING(7 -8,9 -10))" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SVGtoWKT.line(1, 2, 3, 4); | |
>>> "LINESTRING(1 -2,3 -4)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SVGtoWKT.polyline('1,2 3,4'); | |
>>> "LINESTRING(1 -2,3 -4)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SVGtoWKT.polygon('1,2 3,4'); | |
>>> "POLYGON((1 -2,3 -4,1 -2))" |
OlderNewer