diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..72f6cdc --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.pyc +.venv +__pycache__ diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..c612c97 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,25 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python: Flask", + "type": "python", + "request": "launch", + "module": "flask", + "env": { + "FLASK_APP": "app.py", + "FLASK_DEBUG": "1" + }, + "args": [ + "run", + "--no-debugger", + "--no-reload" + ], + "jinja": true, + "justMyCode": true + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index 90d5771..bf64bf0 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,15 @@ The internal dictionary is derived from the kind folks at: This disctionary does NOT match the official worldle dictionary, so it certainly contains words not accepted by the official wordle app, and is probably missing words available to the offical game. + +Setup virtual environment: + py -m vent .venv + .\.venv\Scripts\activate + pip install -r requirements.txt + +Run flask web server: + py -m flask run + +Notes: + To enable python virtual environments, you first need to do: + Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser \ No newline at end of file diff --git a/app.py b/app.py new file mode 100644 index 0000000..b9c3335 --- /dev/null +++ b/app.py @@ -0,0 +1,16 @@ +#!/usr/bin/python + +from flask import Flask +from flask import render_template + +app = Flask(__name__) + + +@app.route("/") +def solver(): + return render_template("solver.html") + + +@app.route("/dictionary") +def dictionary(): + return render_template("dictionary.html") diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..3b91373 Binary files /dev/null and b/requirements.txt differ diff --git a/static/site.css b/static/site.css new file mode 100644 index 0000000..872fa72 --- /dev/null +++ b/static/site.css @@ -0,0 +1,27 @@ +.navbar { + background-color: lightslategray; + font-size: 1em; + font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; + color: white; + padding: 8px 5px 8px 5px; +} + +.navbar a { + text-decoration: none; + color: inherit; +} + +.navbar-brand { + font-size: 1.2em; + font-weight: 600; +} + +.navbar-item { + font-variant: small-caps; + margin-left: 30px; +} + +.body-content { + padding: 5px; + font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; +} \ No newline at end of file diff --git a/templates/dictionary.html b/templates/dictionary.html new file mode 100644 index 0000000..774d5f1 --- /dev/null +++ b/templates/dictionary.html @@ -0,0 +1,9 @@ + {% extends "layout.html" %} + + {% block title %} + Dictionary + {% endblock %} + + {% block content %} + Words go here. + {% endblock %} diff --git a/templates/layout.html b/templates/layout.html new file mode 100644 index 0000000..c3fdeb4 --- /dev/null +++ b/templates/layout.html @@ -0,0 +1,26 @@ + + + +
+ +