Output entry_id from SQLite row
This commit is contained in:
@@ -75,4 +75,5 @@ for i in range(0, jk.len()):
|
||||
new_entry.title += " (" + jk_article.metadata["language"] + ")"
|
||||
|
||||
s9y.add_entry(new_entry)
|
||||
logtxt.write("{},{}\n".format(jk_article.file_path, new_entry.entry_id))
|
||||
s9y.commit()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
class S9YEntry():
|
||||
def __init__(self):
|
||||
self.entry_id = None
|
||||
self.db_keys = ["id", "title", "timestamp", "body", "comments", "trackbacks", "extended", "exflag", "author", "authorid", "isdraft", "allow_comments", "last_modified", "moderate_comments"]
|
||||
self.categories = []
|
||||
self.tags = []
|
||||
|
||||
@@ -18,6 +18,7 @@ class S9YWriter():
|
||||
#print(sql)
|
||||
result = self.db.execute(sql, data)
|
||||
entry_id = result.lastrowid
|
||||
entry.entry_id = entry_id
|
||||
print(repr(result.lastrowid))
|
||||
print(entry.title)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user