diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 59dafdb..0000000 --- a/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM python:3-alpine - -WORKDIR /site -COPY . . -RUN pip install --no-cache-dir -r requirements.txt - -CMD ["waitress-serve", "--port=8000", "app.app"] diff --git a/app.sh b/app.sh deleted file mode 100755 index aefae55..0000000 --- a/app.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env sh - -set -eu - -main() { - cd site - waitress-serve --port=8041 'app.app' & -} - -main "$@" diff --git a/site/templates/assets/88x31s/benjae.nekoweb.org.gif b/assets/88x31s/benjae.nekoweb.org.gif similarity index 100% rename from site/templates/assets/88x31s/benjae.nekoweb.org.gif rename to assets/88x31s/benjae.nekoweb.org.gif diff --git a/site/templates/assets/88x31s/freetards.xyz.gif b/assets/88x31s/freetards.xyz.gif similarity index 100% rename from site/templates/assets/88x31s/freetards.xyz.gif rename to assets/88x31s/freetards.xyz.gif diff --git a/site/templates/assets/88x31s/fsky.io.webp b/assets/88x31s/fsky.io.webp similarity index 100% rename from site/templates/assets/88x31s/fsky.io.webp rename to assets/88x31s/fsky.io.webp diff --git a/site/templates/assets/88x31s/nyx.everypizza.im-2.png b/assets/88x31s/nyx.everypizza.im-2.png similarity index 100% rename from site/templates/assets/88x31s/nyx.everypizza.im-2.png rename to assets/88x31s/nyx.everypizza.im-2.png diff --git a/site/templates/assets/88x31s/nyx.everypizza.im.webp b/assets/88x31s/nyx.everypizza.im.webp similarity index 100% rename from site/templates/assets/88x31s/nyx.everypizza.im.webp rename to assets/88x31s/nyx.everypizza.im.webp diff --git a/site/templates/assets/88x31s/purplebored.pl.gif b/assets/88x31s/purplebored.pl.gif similarity index 100% rename from site/templates/assets/88x31s/purplebored.pl.gif rename to assets/88x31s/purplebored.pl.gif diff --git a/site/templates/assets/88x31s/squarebowl.club.gif b/assets/88x31s/squarebowl.club.gif similarity index 100% rename from site/templates/assets/88x31s/squarebowl.club.gif rename to assets/88x31s/squarebowl.club.gif diff --git a/site/templates/assets/88x31s/synth.download.svg b/assets/88x31s/synth.download.svg similarity index 100% rename from site/templates/assets/88x31s/synth.download.svg rename to assets/88x31s/synth.download.svg diff --git a/site/templates/assets/88x31s/telepath.im.png b/assets/88x31s/telepath.im.png similarity index 100% rename from site/templates/assets/88x31s/telepath.im.png rename to assets/88x31s/telepath.im.png diff --git a/site/templates/assets/88x31s/voxel.fsky.io.webp b/assets/88x31s/voxel.fsky.io.webp similarity index 100% rename from site/templates/assets/88x31s/voxel.fsky.io.webp rename to assets/88x31s/voxel.fsky.io.webp diff --git a/site/templates/assets/88x31s/zayd.fsky.io.png b/assets/88x31s/zayd.fsky.io.png similarity index 100% rename from site/templates/assets/88x31s/zayd.fsky.io.png rename to assets/88x31s/zayd.fsky.io.png diff --git a/site/templates/assets/broken/isekai.rocks.svg b/assets/broken/isekai.rocks.svg similarity index 100% rename from site/templates/assets/broken/isekai.rocks.svg rename to assets/broken/isekai.rocks.svg diff --git a/site/templates/assets/index.css b/assets/index.css similarity index 100% rename from site/templates/assets/index.css rename to assets/index.css diff --git a/site/templates/assets/index.css.old b/assets/index.css.old similarity index 100% rename from site/templates/assets/index.css.old rename to assets/index.css.old diff --git a/compose.yml b/compose.yml deleted file mode 100644 index 0c4b908..0000000 --- a/compose.yml +++ /dev/null @@ -1,9 +0,0 @@ -services: - utils: - build: - dockerfile: Dockerfile - ports: - - "8041:8000" # Will listen on port 65193, change that number to change the port - restart: unless-stopped - volumes: - - ./site:/site diff --git a/site/templates/index.j2 b/index.php similarity index 50% rename from site/templates/index.j2 rename to index.php index a9fa288..5fa6499 100644 --- a/site/templates/index.j2 +++ b/index.php @@ -1,4 +1,3 @@ - @@ -9,9 +8,30 @@ -

- welcome, visitor {{ visitor }}! -

+ $count!"; + ?>

Nyx Tutt

is a transfeminine robot-cat-girl-thing. @@ -86,9 +106,7 @@

projects

- this one has a ton of unfinished projects (and some that haven't - even had any work done yet)! its current idea is a GTK4 music player - along with a federated genius alternative. it also has a few things, + this one has a ton of unfinished projects. it also has a few things, like skibidifetch (a fork of badapplefetch by Ari), that are smaller. it also made a collection of web-based tools using server-side rendering, @@ -96,12 +114,45 @@

current project

- currently, it's making a web frontend for DICT (RFC2229) using Flask in the backend - and Tailwind CSS in the frontend. + learning Ruby and Rails

music

- {{ np }} + " . htmlspecialchars($user) . ": " . + htmlspecialchars($track) . " by " . + htmlspecialchars($artist) . " from " . + htmlspecialchars($album) . ""; + } + } catch (Exception $e) { + $nowPlayingString = "Failed to reach API"; + } + + echo $nowPlayingString; + ?> +
data is from listenbrainz. @@ -109,11 +160,36 @@

buttons

- {% for image, link in buttons %} - - {{ image }} + + Benjae - {% endfor %} + + Freetards + + + FSKY + + + Purplebored + + + PlateNet + + + synth.download + + + Telepath + + + voxel + + + voxel + +

+ Nyx + Nyx

diff --git a/site/__pycache__/app.cpython-313.pyc b/site/__pycache__/app.cpython-313.pyc deleted file mode 100644 index 326efbc..0000000 Binary files a/site/__pycache__/app.cpython-313.pyc and /dev/null differ diff --git a/site/app.py b/site/app.py deleted file mode 100644 index 6d4171c..0000000 --- a/site/app.py +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/env python - -from flask import Flask, render_template, make_response, send_from_directory -import requests -import os - -apiRoot = "https://api.listenbrainz.org" -user = "everypizza" - -buttons = [ - ("assets/88x31s/benjae.nekoweb.org.gif", "https://benjae.nekoweb.org"), - ("assets/88x31s/freetards.xyz.gif", "https://freetards.xyz"), - ("assets/88x31s/fsky.io.webp", "https://fsky.io"), - ("assets/88x31s/purplebored.pl.gif", "https://purplebored.pl"), - ("assets/88x31s/squarebowl.club.gif", "https://squarebowl.club"), - ("assets/88x31s/synth.download.svg", "https://synth.download"), - ("assets/88x31s/telepath.im.png", "https://telepath.im"), - ("assets/88x31s/voxel.fsky.io.webp", "https://voxel.fsky.io"), - ("assets/88x31s/zayd.fsky.io.png", "https://zayd.fsky.io"), - ] - -nyxbuttons = [ - ("assets/88x31s/nyx.everypizza.im.webp", "https://nyx.everypizza.im"), - ("assets/88x31s/nyx.everypizza.im-2.png", "https://nyx.everypizza.im"), - ] - -app = Flask(__name__) - -countFile = "visitorCount.txt" - -def get_visitor_count(): - try: - with open(countFile, "r") as f: - return int(f.read()) - except FileNotFoundError: - return 0 - -def increment_visitor_count(): - count = get_visitor_count() - count += 1 - with open(countFile, "w") as f: - f.write(str(count)) - return count - -@app.route('/') -def index(): - increment_visitor_count() - try: - data = requests.get(apiRoot + "/1/user/" + user + "/playing-now") - if not data.json()['payload']['listens']: - nowPlaying = False - nowPlayingString = "nothing is playing right now." - else: - track = data.json()['payload']['listens'][0]['track_metadata']['track_name'] - artist = data.json()['payload']['listens'][0]['track_metadata']['artist_name'] - album = data.json()['payload']['listens'][0]['track_metadata']['release_name'] - nowPlayingString = f"now playing for {user}: {track} by {artist} from {album}" - except: - nowPlayingString = "Failed to reach API" - - return render_template('index.j2', np=nowPlayingString, visitor=get_visitor_count(), buttons=buttons, nyxbuttons=nyxbuttons) - -@app.route('/assets/index.css') -def indexStyle(): - css = render_template('assets/index.css') - response = make_response(css) - response.mimetype = "text/css" - return response - -@app.route('/assets/particles.js') -def particleJs(): - js = render_template('assets/scripts/particles.js') - response = make_response(js) - response.mimetype = "text/javascript" - return response - -@app.route('/assets/birds.js') -def birdJs(): - js = render_template('assets/scripts/birds.js') - response = make_response(js) - response.mimetype = "text/javascript" - return response - -@app.route('/static/assets/88x31s/') -def serve_dir(filename): - directory = 'templates/assets/88x31s' - return send_from_directory(directory, filename) - -@app.route('/todo') -def todo(): - return render_template('todo.html') - -if __name__ == '__main__': - app.run(host="0.0.0.0", port=8080) diff --git a/site/templates/index.j2.old b/site/templates/index.j2.old deleted file mode 100644 index d8867ba..0000000 --- a/site/templates/index.j2.old +++ /dev/null @@ -1,126 +0,0 @@ - - - - - Nyx's personal site - - - - - - -
-

- hello, visitor number {{ visitor }}! this one is glad to see you. -

-
- - this counter doesn't use javascript, it's just a text file with a digit in - it that gets increased by 1 on every page load. - -
-

- Nyx Tutt -

-

- about it -

-

- it is a cat-robot-girl-thing. it likes to speak about itself in the third person. - it likes linux and uses arch. it lives in texas, but hates it here. its favorite - color is pink. -

-

- interests -

-

- nyx has many interests. currently, it's been learning about networking, and the - C programming languages. it also likes open source software and protocols, like - XMPP. it also is a strong beliver in freedom of information, so it hosts things - like snowflake proxies. it also - likes retro design, and it sometimes will write a blog post on something random. - theming is also fun for it. -

-

- contact -

-

- this one has a few forms of contact:
-

- -

- please avoid using 2nd person pronouns when contacting it. -

-

- links -

- -

- pages -

- -

- now playing -

-

- {{ np }} -
- - data is from listenbrainz. - -

-

- 88x31s -

-

- {% for image, link in buttons %} - - {{ image }} - - {% endfor %} -

-

- this one's 88x31 -

-

- {% for image, link in nyxbuttons %} - - {{ image }} - - {% endfor %} -

- - diff --git a/site/visitorCount.sample.txt b/visitorCount.sample.txt similarity index 100% rename from site/visitorCount.sample.txt rename to visitorCount.sample.txt