Implemented edit command.

This commit is contained in:
Øystein Ingmar Skartsæterhagen 2011-10-08 19:08:06 +00:00
parent 44553732ca
commit bd81dc4425

View File

@ -7,6 +7,8 @@ import pgdb
from fileformat import read_actionlist, write_actionlist
from util import *
file_encoding = 'utf8'
# connection = pgdb.connect(database='oysteini_pbb2',
# user='oysteini_pbb',
# password='lio5Aide',
@ -213,7 +215,7 @@ def show(connection, ids, commit_format=False, tmp_file=False):
else:
output = '\n'.join(objects)
if tmp_file:
filename = write_tmpfile('.'.join(ids), output)
filename = write_tmpfile('.'.join(ids), output, file_encoding)
print filename
return filename
else:
@ -321,7 +323,10 @@ def commit(connection, filename=None):
commit_actions(connection, actions)
def edit(connection, ids):
pass
filename = show(connection, ids, commit_format=True, tmp_file=True)
print filename
run_editor(filename)
commit(connection, filename)
def map_cmd(connection, shelfname=None, category=None):
pass