diff --git a/src/app.py b/src/app.py new file mode 100644 index 0000000..9dc2427 --- /dev/null +++ b/src/app.py @@ -0,0 +1,19 @@ +import platform +from flask import Flask, render_template + +app = Flask(__name__) + +@app.route('/') +def system_info(): + system_info = { + 'System': platform.system(), + 'Node Name': platform.node(), + 'Release': platform.release(), + 'Version': platform.version(), + 'Machine': platform.machine(), + 'Processor': platform.processor() + } + return render_template('system_info.html', system_info=system_info) + +if __name__ == '__main__': + app.run(debug=True) \ No newline at end of file diff --git a/src/static/style.css b/src/static/style.css new file mode 100644 index 0000000..b2a609e --- /dev/null +++ b/src/static/style.css @@ -0,0 +1,18 @@ +/* static/style.css */ +body { + font-family: Arial, sans-serif; + margin: 0; + padding: 0; + background-color: #f2f2f2; +} + +header { + background-color: #333; + color: white; + padding: 1em; + text-align: center; +} + +main { + margin: 2em; +} \ No newline at end of file diff --git a/src/templates/index.html b/src/templates/index.html new file mode 100644 index 0000000..89a0327 --- /dev/null +++ b/src/templates/index.html @@ -0,0 +1,29 @@ + + + + + + + + System Information + + +
+

System Information

+
+
+ + + + + + {% for key, value in system_info.items() %} + + + + + {% endfor %} +
AttributeValue
{{ key }}{{ value }}
+
+ +