]> git.phdru.name Git - phdru.name/cgi-bin/blog-ru/search-tags.git/commitdiff
Feat(Python3): Rename `html` to `html_output`
authorOleg Broytman <phd@phdru.name>
Sat, 15 Jun 2024 23:12:30 +0000 (02:12 +0300)
committerOleg Broytman <phd@phdru.name>
Sat, 15 Jun 2024 23:23:59 +0000 (02:23 +0300)
Do not shadow a module from the stdlib.

html/.gitignore [deleted file]
html_output/.gitignore [new file with mode: 0644]
html_output/HTTPResponse.py [moved from html/HTTPResponse.py with 100% similarity]
html_output/Makefile [moved from html/Makefile with 88% similarity]
html_output/Redirect.py [moved from html/Redirect.py with 100% similarity]
html_output/__init__.py [moved from html/__init__.py with 100% similarity]
html_output/html_output.tmpl [moved from html/html.tmpl with 96% similarity]
html_output/redirect.tmpl [moved from html/redirect.tmpl with 76% similarity]
html_output/response.py [moved from html/response.py with 89% similarity]
search-tags.py

diff --git a/html/.gitignore b/html/.gitignore
deleted file mode 100644 (file)
index f878ca4..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/html.py
-/redirect.py
diff --git a/html_output/.gitignore b/html_output/.gitignore
new file mode 100644 (file)
index 0000000..fd9c047
--- /dev/null
@@ -0,0 +1,2 @@
+/html_output.py
+/redirect.py
similarity index 88%
rename from html/Makefile
rename to html_output/Makefile
index 9d430413f731bb24870e8f0b62b267e30ee7466c..070b14792be1b74e197c53ebc30e2787d1fe7faf 100644 (file)
@@ -8,4 +8,4 @@
        exec python3 -m compileall $@
 
 .PHONY: all
-all: html.py redirect.py
+all: html_output.py redirect.py
similarity index 100%
rename from html/Redirect.py
rename to html_output/Redirect.py
similarity index 100%
rename from html/__init__.py
rename to html_output/__init__.py
similarity index 96%
rename from html/html.tmpl
rename to html_output/html_output.tmpl
index 9d46413219c842c5e7c631e32cbcfe7426321281..57019410f926bd54a89fb6b8ae54351eb086bbf8 100644 (file)
@@ -1,5 +1,5 @@
 #encoding koi8-r
-#extends HTTPResponse
+#extends html_output.HTTPResponse
 #implements respond
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
similarity index 76%
rename from html/redirect.tmpl
rename to html_output/redirect.tmpl
index 02f3f37ba446661619af71c3aa9951ab1ff7539b..97c2cef9fd242ca5933c46e9e4cabb4b4cb1bf75 100644 (file)
@@ -1,4 +1,4 @@
-#extends Redirect
+#extends html_output.Redirect
 #implements respond
 <H1>Moved</H1>
 
similarity index 89%
rename from html/response.py
rename to html_output/response.py
index adfea5e9afaaf2be20b52a57b70b568a5a9d48fc..9b0a0abeed3ce629fa4837eb0a8ab7abc887b67f 100644 (file)
@@ -2,8 +2,8 @@ import sys
 
 
 def response(title, body, status=None):
-    from .html import html
-    result = html()
+    from .html_output import html_output
+    result = html_output()
 
     result.title = title
     result.body = body
index fec3705e91fa0a710cd8b687f8e14cf8a5edfd5f..2a0a0fa4baa85d25f8e400b38162201f1f57f955 100755 (executable)
@@ -11,7 +11,7 @@ import sys
 from lark import ParseError
 import mycgi
 
-from html.response import redirect, response
+from html_output.response import redirect, response
 from parser import parser
 
 form = mycgi.Form()