Compare commits
1 Commits
feat/ascii
...
74019a967a
| Author | SHA1 | Date | |
|---|---|---|---|
|
74019a967a
|
@@ -4,7 +4,7 @@ import datetime
|
|||||||
import requests
|
import requests
|
||||||
import re
|
import re
|
||||||
from mail import sendEmail
|
from mail import sendEmail
|
||||||
from tools import getClientIP, getGitCommit, json_response, parse_date, get_tools_data
|
from tools import getClientIP, getGitCommit, json_response, parse_date
|
||||||
from blueprints.sol import sol_bp
|
from blueprints.sol import sol_bp
|
||||||
from dateutil import parser as date_parser
|
from dateutil import parser as date_parser
|
||||||
|
|
||||||
@@ -164,21 +164,6 @@ def project():
|
|||||||
"status": HTTP_OK
|
"status": HTTP_OK
|
||||||
})
|
})
|
||||||
|
|
||||||
@api_bp.route("/tools")
|
|
||||||
def tools():
|
|
||||||
"""Get a list of tools used by Nathan Woodburn."""
|
|
||||||
try:
|
|
||||||
tools = get_tools_data()
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Error getting tools data: {e}")
|
|
||||||
return json_response(request, "500 Internal Server Error", HTTP_SERVER_ERROR)
|
|
||||||
|
|
||||||
# Remove demo and move demo_url to demo
|
|
||||||
for tool in tools:
|
|
||||||
if "demo_url" in tool:
|
|
||||||
tool["demo"] = tool.pop("demo_url")
|
|
||||||
|
|
||||||
return json_response(request, {"tools": tools}, HTTP_OK)
|
|
||||||
|
|
||||||
@api_bp.route("/page_date")
|
@api_bp.route("/page_date")
|
||||||
def page_date():
|
def page_date():
|
||||||
|
|||||||
10
curl.py
10
curl.py
@@ -1,5 +1,5 @@
|
|||||||
from flask import render_template
|
from flask import render_template
|
||||||
from tools import error_response, getAddress, get_tools_data, getClientIP
|
from tools import error_response, getAddress
|
||||||
import os
|
import os
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
import requests
|
import requests
|
||||||
@@ -81,7 +81,7 @@ def curl_response(request):
|
|||||||
# Handle special cases
|
# Handle special cases
|
||||||
if path == "index":
|
if path == "index":
|
||||||
# Get current project
|
# Get current project
|
||||||
return render_template("index.ascii",repo=get_current_project(), ip=getClientIP(request)), 200, {'Content-Type': 'text/plain; charset=utf-8'}
|
return render_template("index.ascii",header=get_header(),repo=get_current_project()), 200, {'Content-Type': 'text/plain; charset=utf-8'}
|
||||||
if path == "projects":
|
if path == "projects":
|
||||||
# Get projects
|
# Get projects
|
||||||
return render_template("projects.ascii",header=get_header(),projects=get_projects()), 200, {'Content-Type': 'text/plain; charset=utf-8'}
|
return render_template("projects.ascii",header=get_header(),projects=get_projects()), 200, {'Content-Type': 'text/plain; charset=utf-8'}
|
||||||
@@ -101,6 +101,8 @@ def curl_response(request):
|
|||||||
coins=coinList
|
coins=coinList
|
||||||
), 200, {'Content-Type': 'text/plain; charset=utf-8'}
|
), 200, {'Content-Type': 'text/plain; charset=utf-8'}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# For other donation pages, fall back to ascii if it exists
|
# For other donation pages, fall back to ascii if it exists
|
||||||
if path.startswith("donate/"):
|
if path.startswith("donate/"):
|
||||||
coin = path.split("/")[1]
|
coin = path.split("/")[1]
|
||||||
@@ -108,10 +110,6 @@ def curl_response(request):
|
|||||||
if address != "":
|
if address != "":
|
||||||
return render_template("donate_coin.ascii",header=get_header(),coin=coin.upper(),address=address), 200, {'Content-Type': 'text/plain; charset=utf-8'}
|
return render_template("donate_coin.ascii",header=get_header(),coin=coin.upper(),address=address), 200, {'Content-Type': 'text/plain; charset=utf-8'}
|
||||||
|
|
||||||
if path == "tools":
|
|
||||||
tools = get_tools_data()
|
|
||||||
return render_template("tools.ascii",header=get_header(),tools=tools), 200, {'Content-Type': 'text/plain; charset=utf-8'}
|
|
||||||
|
|
||||||
|
|
||||||
if os.path.exists(f"templates/{path}.ascii"):
|
if os.path.exists(f"templates/{path}.ascii"):
|
||||||
return render_template(f"{path}.ascii",header=get_header()), 200, {'Content-Type': 'text/plain; charset=utf-8'}
|
return render_template(f"{path}.ascii",header=get_header()), 200, {'Content-Type': 'text/plain; charset=utf-8'}
|
||||||
|
|||||||
@@ -25,61 +25,55 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Zellij",
|
"name": "Zellij",
|
||||||
"type": "Terminal Tools",
|
"type": "terminal",
|
||||||
"url": "https://zellij.dev/",
|
"url": "https://zellij.dev/",
|
||||||
"description": "A terminal workspace and multiplexer"
|
"description": "A terminal workspace and multiplexer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Fx",
|
"name": "Fx",
|
||||||
"type": "Terminal Tools",
|
"type": "terminal",
|
||||||
"url": "https://fx.wtf/",
|
"url": "https://fx.wtf/",
|
||||||
"description": "A command-line JSON viewer and processor",
|
"description": "A command-line JSON viewer and processor",
|
||||||
"demo": "<script src=\"https://asciinema.c.woodburn.au/a/4.js\" id=\"asciicast-4\" async=\"true\"></script>",
|
"demo": "<script src=\"https://asciinema.c.woodburn.au/a/cx8sr8adsP6Uoi9zpg8MYnVTl.js\" id=\"asciicast-cx8sr8adsP6Uoi9zpg8MYnVTl\" async=\"true\"></script>"
|
||||||
"demo_url": "https://asciinema.c.woodburn.au/a/4"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Zoxide",
|
"name": "Zoxide",
|
||||||
"type": "Terminal Tools",
|
"type": "terminal",
|
||||||
"url": "https://github.com/ajeetdsouza/zoxide",
|
"url": "https://github.com/ajeetdsouza/zoxide",
|
||||||
"description": "cd but with fuzzy matching and other cool features",
|
"description": "cd but with fuzzy matching and other cool features",
|
||||||
"demo": "<script src=\"https://asciinema.c.woodburn.au/a/5.js\" id=\"asciicast-5\" async=\"true\"></script>",
|
"demo": "<script src=\"https://asciinema.c.woodburn.au/a/5.js\" id=\"asciicast-5\" async=\"true\"></script>"
|
||||||
"demo_url": "https://asciinema.c.woodburn.au/a/5"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Atuin",
|
"name": "Atuin",
|
||||||
"type": "Terminal Tools",
|
"type": "terminal",
|
||||||
"url": "https://atuin.sh/",
|
"url": "https://atuin.sh/",
|
||||||
"description": "A next-generation shell history manager",
|
"description": "A next-generation shell history manager",
|
||||||
"demo": "<script src=\"https://asciinema.c.woodburn.au/a/6.js\" id=\"asciicast-6\" async=\"true\"></script>",
|
"demo": "<script src=\"https://asciinema.c.woodburn.au/a/6.js\" id=\"asciicast-6\" async=\"true\"></script>"
|
||||||
"demo_url": "https://asciinema.c.woodburn.au/a/6"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Tmate",
|
"name": "Tmate",
|
||||||
"type": "Terminal Tools",
|
"type": "terminal",
|
||||||
"url": "https://tmate.io/",
|
"url": "https://tmate.io/",
|
||||||
"description": "Instant terminal sharing",
|
"description": "Instant terminal sharing",
|
||||||
"demo": "<script src=\"https://asciinema.c.woodburn.au/a/7.js\" id=\"asciicast-7\" async=\"true\"></script>",
|
"demo": "<script src=\"https://asciinema.c.woodburn.au/a/7.js\" id=\"asciicast-7\" async=\"true\"></script>"
|
||||||
"demo_url": "https://asciinema.c.woodburn.au/a/7"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Eza",
|
"name": "Eza",
|
||||||
"type": "Terminal Tools",
|
"type": "terminal",
|
||||||
"url": "https://eza.rocks/",
|
"url": "https://eza.rocks/",
|
||||||
"description": "A modern replacement for 'ls'",
|
"description": "A modern replacement for 'ls'",
|
||||||
"demo": "<script src=\"https://asciinema.c.woodburn.au/a/8.js\" id=\"asciicast-8\" async=\"true\"></script>",
|
"demo": "<script src=\"https://asciinema.c.woodburn.au/a/8.js\" id=\"asciicast-8\" async=\"true\"></script>"
|
||||||
"demo_url": "https://asciinema.c.woodburn.au/a/8"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Bat",
|
"name": "Bat",
|
||||||
"type": "Terminal Tools",
|
"type": "terminal",
|
||||||
"url": "https://github.com/sharkdp/bat",
|
"url": "https://github.com/sharkdp/bat",
|
||||||
"description": "A cat clone with syntax highlighting and Git integration",
|
"description": "A cat clone with syntax highlighting and Git integration",
|
||||||
"demo": "<script src=\"https://asciinema.c.woodburn.au/a/9.js\" id=\"asciicast-9\" async=\"true\"></script>",
|
"demo": "<script src=\"https://asciinema.c.woodburn.au/a/9.js\" id=\"asciicast-9\" async=\"true\"></script>"
|
||||||
"demo_url": "https://asciinema.c.woodburn.au/a/9"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Oh My Zsh",
|
"name": "Oh My Zsh",
|
||||||
"type": "Terminal Tools",
|
"type": "terminal",
|
||||||
"url": "https://ohmyz.sh/",
|
"url": "https://ohmyz.sh/",
|
||||||
"description": "A delightful community-driven framework for managing your Zsh configuration"
|
"description": "A delightful community-driven framework for managing your Zsh configuration"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -685,8 +685,6 @@ def resume_pdf():
|
|||||||
|
|
||||||
@app.route("/tools")
|
@app.route("/tools")
|
||||||
def tools():
|
def tools():
|
||||||
if isCurl(request):
|
|
||||||
return curl_response(request)
|
|
||||||
return render_template("tools.html", tools=get_tools_data())
|
return render_template("tools.html", tools=get_tools_data())
|
||||||
|
|
||||||
# endregion
|
# endregion
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
If you’d like to support my work 💙
|
If you’d like to support my work 💙
|
||||||
|
|
||||||
- PayPal: https://paypal.me/nathanwoodburn
|
- PayPal: [https://paypal.me/nathanwoodburn]
|
||||||
- GitHub: https://github.com/sponsors/Nathanwoodburn
|
- GitHub: [https://github.com/sponsors/Nathanwoodburn]
|
||||||
- Stripe: https://donate.stripe.com/8wM6pv0VD08Xe408ww
|
- Stripe: [https://donate.stripe.com/8wM6pv0VD08Xe408ww]
|
||||||
|
|
||||||
[1mHNS: nathan.woodburn[0m
|
[1mHNS: nathan.woodburn[0m
|
||||||
[1m{{ HNS }}[0m
|
[1m{{ HNS }}[0m
|
||||||
|
|||||||
@@ -7,6 +7,5 @@
|
|||||||
Home [/]
|
Home [/]
|
||||||
Contact [/contact]
|
Contact [/contact]
|
||||||
Projects [/projects]
|
Projects [/projects]
|
||||||
Tools [/tools]
|
|
||||||
Donate [/donate]
|
Donate [/donate]
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,4 @@
|
|||||||
[1;36m─────────────────────────────────────────────────────[0m
|
{{header}}
|
||||||
[1;36m . . , . . . .. / [0m
|
|
||||||
[1;36m |\ | _.-+-|_ _.._ | | _ _ _||_ . .._.._ / [0m
|
|
||||||
[1;36m | \|(_] | [ )(_][ ) * |/\|(_)(_)(_][_)(_|[ [ )/ [0m
|
|
||||||
[1;36m─────────────────────────────────────────────────────[0m
|
|
||||||
|
|
||||||
Home [/]
|
|
||||||
Contact [/contact]
|
|
||||||
Projects [/projects]
|
|
||||||
Tools [/tools]
|
|
||||||
Donate [/donate]
|
|
||||||
API [/api/v1/]
|
|
||||||
|
|
||||||
[1;36m───────────────────────────────────────────────[0m
|
[1;36m───────────────────────────────────────────────[0m
|
||||||
[1;36m ABOUT ME [0m
|
[1;36m ABOUT ME [0m
|
||||||
[1;36m──────────[0m
|
[1;36m──────────[0m
|
||||||
@@ -30,7 +18,7 @@ I'm currently working on: {{ repo | safe }}
|
|||||||
[1;36m────────[0m
|
[1;36m────────[0m
|
||||||
|
|
||||||
- Linux servers & CLI
|
- Linux servers & CLI
|
||||||
- DNS & DNSSEC
|
- DNS, DNSSEC, and Trustless SSL
|
||||||
- NGINX web servers
|
- NGINX web servers
|
||||||
- Programming:
|
- Programming:
|
||||||
- Python 3
|
- Python 3
|
||||||
@@ -38,7 +26,3 @@ I'm currently working on: {{ repo | safe }}
|
|||||||
- Java
|
- Java
|
||||||
- Bash
|
- Bash
|
||||||
|
|
||||||
|
|
||||||
Served to: {{ ip }}
|
|
||||||
[1;36m───────────────────────────────────────────────[0m
|
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ Check them out here!</blockquote><img class="img-fluid" src="/assets/img/pfront.
|
|||||||
<h2>Skills</h2>
|
<h2>Skills</h2>
|
||||||
<ul class="list-unstyled" style="font-size: 18px;">
|
<ul class="list-unstyled" style="font-size: 18px;">
|
||||||
<li class="programlinux">Linux Servers and CLI</li>
|
<li class="programlinux">Linux Servers and CLI</li>
|
||||||
<li>DNS and DNSSEC</li>
|
<li>DNS, DNSSEC and Trustless SSL</li>
|
||||||
<li class="programnginx">NGINX Web Servers</li>
|
<li class="programnginx">NGINX Web Servers</li>
|
||||||
<li class="programc">Programming in<ul class="list-inline">
|
<li class="programc">Programming in<ul class="list-inline">
|
||||||
<li class="list-inline-item">Python 3</li>
|
<li class="list-inline-item">Python 3</li>
|
||||||
@@ -227,7 +227,7 @@ Check them out here!</blockquote><img class="img-fluid" src="/assets/img/pfront.
|
|||||||
<div class="container text-center">
|
<div class="container text-center">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<p>Verify me with this <a href="pgp" target="_blank">PGP Public Key</a></p>
|
<p>Verify me with this <a href="pgp" target="_blank">long lifetime Public Key</a> or this <a href="gitpgp" target="_blank">short term one for Github commits</a></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
{{header}}
|
|
||||||
[1;36m───────────────────────────────────────────────[0m
|
|
||||||
[1;36m Tools [0m
|
|
||||||
[1;36m────────────[0m
|
|
||||||
|
|
||||||
Here are some of the tools I use regularly — most of them are open source! 🛠️
|
|
||||||
|
|
||||||
{% for type, tools_in_type in tools | groupby('type') %}
|
|
||||||
[4m[1;33m{{type}}[0m
|
|
||||||
{% for tool in tools_in_type %}
|
|
||||||
[1;33m{{tool.name}}[0m
|
|
||||||
{{tool.description}}
|
|
||||||
Website: {{tool.url}}
|
|
||||||
{% if tool.demo_url %}Demo: {{tool.demo_url}}{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
[1;36m───────────────────────────────────────────────[0m
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -14,7 +14,4 @@ GET http://127.0.0.1:5000/api/v1/message
|
|||||||
HTTP 200
|
HTTP 200
|
||||||
GET http://127.0.0.1:5000/api/v1/project
|
GET http://127.0.0.1:5000/api/v1/project
|
||||||
HTTP 200
|
HTTP 200
|
||||||
GET http://127.0.0.1:5000/api/v1/tools
|
|
||||||
HTTP 200
|
|
||||||
[Asserts]
|
|
||||||
jsonpath "$.tools" count > 5
|
|
||||||
|
|||||||
Reference in New Issue
Block a user