From 3396b4946fa582095eb74a520c84055fc25e3272 Mon Sep 17 00:00:00 2001 From: Brian Tremblay Date: Thu, 8 Dec 2022 20:45:59 -0800 Subject: [PATCH 01/13] Feature: add option to change port Allows user to change the port of the dev server by adding -p or --port= on the command line. --- app.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index c2a370e..0845a41 100644 --- a/app.py +++ b/app.py @@ -17,6 +17,16 @@ help="Run application in debug mode", ) +parser.add_option( + "-p", + "--port", + action="store", + type="string", + dest="port_number", + default="8080", + help="Change dev server port (default is 8080)", +) + (options, args) = parser.parse_args() app = Flask(__name__) @@ -70,4 +80,4 @@ def fetch_mf2(url): if options.debug: - app.run(debug=True, port=8080) + app.run(debug=True, port=options.port_number) From d65c34c69bd0418d9f6453de1d522e07bf966960 Mon Sep 17 00:00:00 2001 From: Brian Tremblay Date: Fri, 9 Dec 2022 12:33:55 -0800 Subject: [PATCH 02/13] Fix: corrects port argument type --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 0845a41..a1758f6 100644 --- a/app.py +++ b/app.py @@ -21,7 +21,7 @@ "-p", "--port", action="store", - type="string", + type="int", dest="port_number", default="8080", help="Change dev server port (default is 8080)", From 901d45a0e54bfcff4d1be3ca6ff1129f77405db5 Mon Sep 17 00:00:00 2001 From: Brian Tremblay Date: Fri, 9 Dec 2022 12:37:54 -0800 Subject: [PATCH 03/13] Refactor: shortens arg dest Shorter dest name makes help text more readable. --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index a1758f6..47c51d1 100644 --- a/app.py +++ b/app.py @@ -22,7 +22,7 @@ "--port", action="store", type="int", - dest="port_number", + dest="port", default="8080", help="Change dev server port (default is 8080)", ) @@ -80,4 +80,4 @@ def fetch_mf2(url): if options.debug: - app.run(debug=True, port=options.port_number) + app.run(debug=True, port=options.port) From 03126c51bfcce68a9ec01aa9ebc1d70590c065e9 Mon Sep 17 00:00:00 2001 From: Brian Tremblay Date: Fri, 9 Dec 2022 12:50:15 -0800 Subject: [PATCH 04/13] Adds required attributes to required fields --- templates/index.jinja2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/index.jinja2 b/templates/index.jinja2 index 8391093..e796965 100644 --- a/templates/index.jinja2 +++ b/templates/index.jinja2 @@ -52,7 +52,7 @@
- +
@@ -79,7 +79,7 @@
- +
From ccf572259ca0fc2f35dd23f5a3f5f57a66a382b2 Mon Sep 17 00:00:00 2001 From: Brian Tremblay Date: Fri, 9 Dec 2022 12:50:51 -0800 Subject: [PATCH 05/13] Adds lang attribute to openting html tag --- templates/index.jinja2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/index.jinja2 b/templates/index.jinja2 index e796965..d2a8004 100644 --- a/templates/index.jinja2 +++ b/templates/index.jinja2 @@ -1,5 +1,5 @@ - + From 44fdcfe6dfd24ffef89c233aa9f2efe5062385b9 Mon Sep 17 00:00:00 2001 From: Brian Tremblay Date: Sat, 10 Dec 2022 12:55:24 -0800 Subject: [PATCH 06/13] Moves header and footer outside of main --- templates/index.jinja2 | 43 +++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/templates/index.jinja2 b/templates/index.jinja2 index d2a8004..07ce7cd 100644 --- a/templates/index.jinja2 +++ b/templates/index.jinja2 @@ -42,12 +42,12 @@ -
-

- Microformats Parser (Python) - {{ mf2py_version }} -

+

+ Microformats Parser (Python) {{ mf2py_version }} +

+ +
@@ -99,22 +99,23 @@ - -
+ + + From 971e0f47b94338cbf9f8ad3c0d04a4e8b7acd6d7 Mon Sep 17 00:00:00 2001 From: Brian Tremblay Date: Sat, 10 Dec 2022 13:09:37 -0800 Subject: [PATCH 07/13] Adds section markup and border between forms --- templates/index.jinja2 | 115 +++++++++++++++++++++++------------------ 1 file changed, 66 insertions(+), 49 deletions(-) diff --git a/templates/index.jinja2 b/templates/index.jinja2 index 07ce7cd..69ef7dc 100644 --- a/templates/index.jinja2 +++ b/templates/index.jinja2 @@ -8,6 +8,15 @@ -

- Microformats Parser (Python) {{ mf2py_version }} -

+

Microformats Parser (Python) {{ mf2py_version }}

-
+
-

+

- +

-

+

-

-

+

- +
-

OR parse just a snippet of HTML

+

OR parse just a snippet of HTML

-
-

+ +

- +

-

+

- +

-

+

- +
-