Skip to content

Commit

Permalink
backup to google drive now works fine, convert to csv locally or to g…
Browse files Browse the repository at this point in the history
…oogle drive, database good, maybe to change it a little bit in the future
  • Loading branch information
MohammadKhGh99 committed Jan 2, 2025
1 parent 1817ba1 commit c1a44f4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
Binary file added Patient.db
Binary file not shown.
31 changes: 16 additions & 15 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,18 +300,19 @@ def create_table():


if __name__ == "__main__":
# with sqlite3.connect("Patient.db") as data_connection:
# data_cursor = data_connection.cursor()
# data_cursor.execute("select * from Patient")
# all_data = data_cursor.fetchall()
# data_connection.commit()
# with sqlite3.connect("علاج.db") as empty_connection:
# empty_cursor = empty_connection.cursor()
# for data in all_data:
# empty_cursor.execute("insert into Patient values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
# data)

if not os.path.exists("علاج.db"):
create_table()
webbrowser.open("http://127.0.0.1:5000")
app.run(debug=False)
with sqlite3.connect("Patient.db") as data_connection:
data_cursor = data_connection.cursor()
data_cursor.execute("select * from Patient")
all_data = data_cursor.fetchall()
data_connection.commit()
with sqlite3.connect("علاج.db") as empty_connection:
create_table()
empty_cursor = empty_connection.cursor()
for data in all_data:
empty_cursor.execute("insert into Patient values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
data)

# if not os.path.exists("علاج.db"):
# create_table()
# webbrowser.open("http://127.0.0.1:5000")
# app.run(debug=False)

0 comments on commit c1a44f4

Please sign in to comment.