1
0

Output entry_id from SQLite row

This commit is contained in:
2022-01-22 22:42:09 +01:00
parent 27e5342e82
commit 893177b40e
3 changed files with 3 additions and 0 deletions

View File

@@ -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()

View File

@@ -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 = []

View File

@@ -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)