diff --git a/Dockerfile b/Dockerfile
index 8c899383682b97e55bb298b4ea67ebae1048729a..bb71a47d8cab65737eaa64235758ff1db63ede3f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,13 +8,14 @@ FROM python:3
# If you prefer miniconda:
#FROM continuumio/miniconda3
-LABEL Name=url_shorter Version=1.0.1
+LABEL Name=url_shorter Version=1.0.2
EXPOSE 5000
WORKDIR /app
ADD ./static /app/static
ADD ./templates /app/templates
COPY import.py /app/import.py
+COPY export.py /app/export.py
COPY main.py /app/main.py
RUN apt update
diff --git a/export.py b/export.py
new file mode 100644
index 0000000000000000000000000000000000000000..40cd498ecd822a2052fc6a2141e34d70a4406208
--- /dev/null
+++ b/export.py
@@ -0,0 +1,22 @@
+import sqlite3
+
+create_table = """
+ CREATE TABLE WEB_URL(
+ ID INTEGER PRIMARY KEY AUTOINCREMENT,
+ LONG_URL TEXT NOT NULL, SHORT_URL TEXT NOT NULL
+ );
+ """
+with sqlite3.connect('db/urls.db') as conn:
+ cursor = conn.cursor()
+ try: #Try making the database structure, if fails Database was already created.
+ cursor.execute(create_table)
+ print("No data Found, exiting")
+ exit()
+ except sqlite3.OperationalError:
+ pass
+
+conn = sqlite3.connect('db/urls.db')
+cursor = conn.cursor()
+res = cursor.execute('SELECT LONG_URL, SHORT_URL FROM WEB_URL WHERE 1')
+for entries in res.fetchall():
+ print(str(entries[1]) + ";" + str(entries[0]))
\ No newline at end of file