-#!/usr/bin/python
+#!/usr/bin/env python2
NOTES_DIRECTORY = '/home/dylan/docs/notes'
import ConfigParser
config = ConfigParser.RawConfigParser()
-config.read('/etc/dylanstestserver.ini')
+config.read('/etc/dylansserver.ini')
domain = config.get('database', 'domain')
user = config.get('database', 'user')
password = config.get('database', 'password').replace('"', '')
existing_titles.append(row[0])
for note in notes:
+ if note[:1] == '.': continue
if note == 'index.php' or note == 'notes.php': continue
url = note[:note.index('.')]
f = open(os.path.join(NOTES_DIRECTORY, note))
VALUES(\"%s\", \"%s\", \"%s\", \"%s\")"\
% (time.strftime("%Y/%m/%d %I:%M:00", date_posted), url, title, db.escape_string(text))
- #print sql
- cursor.execute(sql)
+ print sql
+ #cursor.execute(sql)