diff options
Diffstat (limited to 'edaweb')
38 files changed, 265 insertions, 89 deletions
diff --git a/edaweb/app.py b/edaweb/app.py index 6902fe4..0d4458a 100644 --- a/edaweb/app.py +++ b/edaweb/app.py @@ -17,7 +17,7 @@ import io app = flask.Flask(__name__) CONFIG = configparser.ConfigParser(interpolation = None) -CONFIG.read("edaweb.conf") +CONFIG.read(os.path.join(os.path.dirname(__file__), "..", "edaweb.conf")) shown_images = set() shown_sidebar_images = set() @@ -68,7 +68,7 @@ def index(): return flask.render_template( "index.html.j2", **get_template_items("eden's site :3", db), - days_till_ffs = datetime.datetime(2025, 11, 8) - datetime.datetime.now(), + days_since_ffs = datetime.datetime.now() - datetime.datetime(2025, 11, 8), markdown = parser.parse_text(f.read())[0], featured_thoughts = db.get_featured_thoughts(), commits = services.get_recent_commits(db)[:15], @@ -79,6 +79,10 @@ def index(): def robots(): return flask.send_from_directory("static", "robots.txt") +@app.route("/cow.txt") +def moo(): + return flask.send_from_directory("static", "cow.txt") + @app.route("/services") def serve_services(): with database.Database() as db: @@ -214,26 +218,26 @@ def get_iso_cd(): id_ = id_ ) -@app.route("/random") -def serve_random(): - try: - tags = flask.request.args['tags'].split(" ") - except KeyError: - flask.abort(400) - - sbi = services.get_random_image(tags) - req = urllib.request.Request(sbi.imurl) - mediaContent = urllib.request.urlopen(req).read() - with open(os.path.join("static", "images", "random.jpg"), "wb") as f: - f.write(mediaContent) - - with database.Database() as db: - return flask.render_template( - "random.html.j2", - **get_template_items("random image", db), - sbi = sbi, - localimg = "/img/random.jpg?seed=%i" % random.randint(0, 9999) - ) +#@app.route("/random") +#def serve_random(): +# try: +# tags = flask.request.args['tags'].split(" ") +# except KeyError: +# flask.abort(400) +# +# sbi = services.get_random_image(tags) +# req = urllib.request.Request(sbi.imurl) +# mediaContent = urllib.request.urlopen(req).read() +# with open(os.path.join(os.path.dirname(__file__), "static", "images", "random.jpg"), "wb") as f: +# f.write(mediaContent) +# +# with database.Database() as db: +# return flask.render_template( +# "random.html.j2", +# **get_template_items("random image", db), +# sbi = sbi, +# localimg = "/img/random.jpg?seed=%i" % random.randint(0, 9999) +# ) @app.route("/questions") def serve_questions(): @@ -244,6 +248,18 @@ def serve_questions(): qnas_link = CONFIG.get("qnas", "url"), qnas = db.get_qnas() ) + +@app.route("/question") +def serve_question(): + with database.Database() as db: + question_id = flask.request.args.get("id", type=int) + qna = db.get_qna(question_id) + return flask.render_template( + "question.html.j2", + **get_template_items("question from %s" % qna["qna"][2], db), + qnas_link = CONFIG.get("qnas", "url"), + qna = qna + ) if __name__ == "__main__": try: diff --git a/edaweb/cache.py b/edaweb/cache.py index 5b66e43..8694666 100644 --- a/edaweb/cache.py +++ b/edaweb/cache.py @@ -1,5 +1,6 @@ import database import services +import json def update_cache(): print("Updating cache...") @@ -7,6 +8,7 @@ def update_cache(): db.update_commit_cache(services.request_recent_commits(since = db.get_last_commit_time())) print("Finished adding github commits...") db.append_qnas(services.scrape_whispa(db.config.get("qnas", "url"), since = db.get_oldest_qna())) + # print(json.dumps(services.scrape_whispa(db.config.get("qnas", "url"), since = db.get_oldest_qna()), indent = 4)) print("Finished parsing Q&As...") print("Started getting docker information with SSH...") diff --git a/edaweb/database.py b/edaweb/database.py index dab56e7..47e0f18 100644 --- a/edaweb/database.py +++ b/edaweb/database.py @@ -20,8 +20,11 @@ class Database: passwd:str = None def __enter__(self): + config_path = os.path.join(os.path.dirname(__file__), "..", "edaweb.conf") + if not os.path.exists(config_path): + raise FileNotFoundError("Could not find edaweb.conf config file") self.config = configparser.ConfigParser(interpolation = None) - self.config.read(os.path.join(os.path.dirname(__file__), "edaweb.conf")) + self.config.read(config_path) if self.safeLogin: self.__connection = pymysql.connect( @@ -44,7 +47,7 @@ class Database: def get_header_links(self): with self.__connection.cursor() as cursor: - cursor.execute("SELECT name, link FROM headerLinks ORDER BY name;") + cursor.execute("SELECT name, link FROM headerLinks WHERE display = true ORDER BY name;") return cursor.fetchall() def get_image(self, imageName): @@ -64,7 +67,7 @@ class Database: def get_header_articles(self): with self.__connection.cursor() as cursor: - cursor.execute("SELECT articleName, link FROM headerArticles;") + cursor.execute("SELECT articleName, link FROM headerArticles WHERE display = true;") return cursor.fetchall() def get_all_categories(self): @@ -241,7 +244,27 @@ class Database: with self.__connection.cursor() as cursor: cursor.execute("SELECT * FROM qnas;") return sorted(cursor.fetchall(), key = operator.itemgetter(2), reverse = True) - + + def get_qna(self, id_): + with self.__connection.cursor() as cursor: + cursor.execute("SELECT * FROM `qnas` WHERE `curiouscat_id` = %s;", (id_, )) + qna = {"qna": list(cursor.fetchone())} + cursor.execute("SELECT `curiouscat_id` FROM `qnas` WHERE `timestamp` < %s ORDER BY `timestamp` DESC LIMIT 1;", (qna["qna"][2], )) + try: + qna["previous"] = cursor.fetchone()[0] + except TypeError: + qna["previous"] = None + cursor.execute("SELECT `curiouscat_id` FROM `qnas` WHERE `timestamp` > %s ORDER BY `timestamp` LIMIT 1;", (qna["qna"][2], )) + try: + qna["next"] = cursor.fetchone()[0] + except TypeError: + qna["next"] = None + + return qna + +if __name__ == "__main__": + with Database() as db: + print(db.get_qna(1098140963)) diff --git a/edaweb/services.py b/edaweb/services.py index 87af050..b01bee2 100644 --- a/edaweb/services.py +++ b/edaweb/services.py @@ -22,8 +22,11 @@ import time import os theLastId = 0 +config_path = os.path.join(os.path.dirname(__file__), "..", "edaweb.conf") +if not os.path.exists(config_path): + raise FileNotFoundError("Could not find edaweb.conf config file") CONFIG = configparser.ConfigParser(interpolation = None) -CONFIG.read(os.path.join(os.path.dirname(__file__), "edaweb.conf")) +CONFIG.read(config_path) def humanbytes(B): 'Return the given bytes as a human friendly KB, MB, GB, or TB string' @@ -247,8 +250,29 @@ def parse_tweet(tweet_url): return dt, replying_to, text, images -def scrape_whispa(whispa_url, since): - tree = html.fromstring(requests.get(whispa_url).content.decode()) +def scrape_whispa(whispa_url, since = None): + def query_answer(answer_url, max_retries = 10): + for i in range(max_retries): + try: + return requests.get(answer_url) + except requests.exceptions.ConnectionError: + s = 5.05 * (i + 1) + print("Connection timed out, retrying in %.2fs" % s) + time.sleep(s) + continue + + # add a bit of wiggle room in case i don't answer the questions in order (i often do this) + if since is None: + stop_at = datetime.datetime(year = 2001, month = 8, day = 12) + else: + stop_at = since - datetime.timedelta(days = 14) + print("The newest Q&A timestamp in the database was %s, we will stop looking at %s." % (since.astimezone().isoformat(), stop_at.astimezone().isoformat())) + + html_ = requests.get(whispa_url).content.decode() + # with open("temp.html", "w") as f: + # f.write(html_) + + tree = html.fromstring(html_) qnas = [] # we're not doing proper HTML scraping here really... since the site uses client side rendering # we rather parse the JS scripts to get the JSON payload of useful information... sadly this looks horrible @@ -256,18 +280,37 @@ def scrape_whispa(whispa_url, since): js = str(script.text) if "receivedFeedback" in js: # my god this is horrible... - for j in json.loads(json.loads(js[19:-1])[1][2:])[0][3]["loadedUser"]["receivedFeedback"]: - dt = datetime.datetime.fromisoformat(j["childFeedback"][0]["createdAt"][:-1]) - - qnas.append({ - # "id": int(str(maths.modf(maths.log(int(j["id"], 16)))[0])[2:]), + parsed_json = json.loads(json.loads(js[19:-1])[1][2:])[0][3]["loadedUser"]["receivedFeedback"] + # print(json.dumps(parsed_json, indent = 4)) + # with open("whispas_%i.json" % i, "w") as f: + # json.dump(parsed_json, f, indent = 4) + for j in parsed_json: + if j["_count"]["childFeedback"] < 0: + continue + + answer_url = "https://apiv4.whispa.sh/feedbacks/%s/children/public" % j["id"] + req = query_answer(answer_url) + try: + firstanswer = req.json()["data"][0] + except IndexError: + continue + dt = datetime.datetime.fromisoformat(firstanswer["createdAt"][:-1]) + + qna = { + # "id": int(j["id"], base = 16), "id": int(dt.timestamp()), - "link": None, + "link": answer_url, "datetime": dt, "question": j["content"], - "answer": j["childFeedback"][0]["content"], + "answer": firstanswer["content"], "host": "whispa.sh" - }) + } + print(qna) + qnas.append(qna) + time.sleep(2.03) + if dt <= stop_at: + print("Met the threshold for oldest Q&A, so stopped looking.") + break return qnas def get_docker_containers(host, ssh_key_path): @@ -281,12 +324,24 @@ def get_docker_containers(host, ssh_key_path): ).run('docker ps -a -s --format "table {{.Names}};{{.Status}};{{.Image}}"', hide = True) return [line.split(";") for line in result.stdout.split("\n")[1:-1]] +def get_uptimes(host, ssh_key_path): + return fabric.Connection( + host = host, + user = "root", + connect_kwargs = { + "key_filename": ssh_key_path, + "look_for_keys": False + } + ).run('uptime -p', hide = True).stdout.strip() + def cache_all_docker_containers(ssh_key_path): containers = {} containers["containers"] = {} + containers["uptimes"] = {} for host, name in CONFIG["docker_hosts"].items(): - print(host) + print(host, name) containers["containers"][(host, name)] = get_docker_containers(host, ssh_key_path) + containers["uptimes"][(host, name)] = get_uptimes(host, ssh_key_path) containers["cachetime"] = "Docker information last updated at %s" % str(datetime.datetime.now()) with open("/tmp/docker-cache.json", "wb") as f: @@ -336,7 +391,7 @@ def get_torrent_stats(): "Uploaded:": humanbytes(s["cumulative-stats"]["uploadedBytes"]), "Active time:": str(datetime.timedelta(seconds = s["cumulative-stats"]["secondsActive"])), "Files added:": s["cumulative-stats"]["filesAdded"], - "Current upload speed": humanbytes(s["uploadSpeed"]) + "s/S", + "Current upload speed:": humanbytes(s["uploadSpeed"]) + "s/S", "Current download speed:": humanbytes(s["downloadSpeed"]) + "s/S" } @@ -359,7 +414,10 @@ def get_recent_commits(db, max_per_repo = 3): return sorted(out, key = lambda a: a["datetime"], reverse = True) if __name__ == "__main__": - import database + # print(scrape_whispa(CONFIG.get("qnas", "url"))) + # import database + print(cache_all_docker_containers(os.path.join(os.path.dirname(__file__), "..", "edaweb-docker.pem"))) + print(get_all_docker_containers()) - with database.Database() as db: - print(json.dumps(get_recent_commits(db), indent=4)) + # with database.Database() as db: + # print(json.dumps(get_recent_commits(db), indent=4)) diff --git a/edaweb/static/cow.txt b/edaweb/static/cow.txt new file mode 100644 index 0000000..41aa536 --- /dev/null +++ b/edaweb/static/cow.txt @@ -0,0 +1,58 @@ + + + + + + + .......................... + ....*o|||||||8#@@@@@@@@@@@@@@@@@@@@@@@###&|o:_.. + ..*:o|||&8##@###8888888######@#@###########################|*... + .:o|||8#####8888|:::**. *&########################@@################&o_ + .*o&8###@#8&o*_. :###@##############@########################@@##&o_ + .*o8########& :##@#@##############@############################@###|_ + .*o|8##########8o .#######################################################&o_ + *&##|_ ..*&##8&o*|88888|_ _#######################################@##################|. + *#####& *&######&o_..*o|o:_ .&##o _###########################################################&_ + _##8*##8 .|88|:::|#######8###8|*:_ .&#@@8 _##@@@########################################################&_ + _#@8_##8_ *8#8|*_ _:|#####&&####8 .&##############################################################| + _#@8.|##8_ _::o###8&##8 .|##@############################8###########################@@#|_ + *###o.|88o ..*&####|..##& _|##########################8|_ .|#############################8 + *|###|_ ._&####8|*_ _*_ _::&8888888888888888|::*_ .|##@####@@@##################| + *&###|_ _:_ .&88###8|*_ ..... .|#####@@@##################8 + .##@#& _##& .|##o _#@@#@#| .|#######&:_ _|###@####################8 + .:8##8o _o:*&##| *##8_.&@@##@#| _::o8#8|::|#####|_ _|#################88###8 + .&##&*_ *###o_###| .|##8*&##|*###o _###8####8|_ _:|###|_ .*o|||o:_ _:::&8888888888|_ _##8 + .###|_. _###o *###|*&#######8 *##8 .##8_ _:|###|_ _|###|_ .&########o _##& + _|####8|&##8:_ _|#########88o .##8 *##& _|###o .|###o .#########| .o##o + o#8|*:#@@###o _:::*__*_ _##8_ _##8_ _&##|_ *##8_ *8#####8|_ .*oo:_ o##| + *###o.&#####& _oo* .8##& .8##8_ .|##& o##& _::::_.*o|8######|_ .##8. + _###&o&##8_:*_ .###& .###|_&#####| _##8 :###o *ooo&#########@#@#& ....:##& + .|8||###&. _**_ .###88##|*&###|*._&##& *|##8_ *o&####@@####@@######& .*o||||||&#######8_ + *&###o _|88##8_ _:8######|*:###|_ _##################88|_ *&#################& + *#####o *&8o *##& _:::*_.&##|_ _#@##############8_ :##################8* + .###&##8_.|88o *&8o _@@& .###| .&####@#########|_ .####@###@@########8* + _##&.|###|_.... .|88o _##8* *&###|_ *###o _:&88######8|_ .*o|||##################o + _##8_ _|########|_ .*o8####&#@@#@##o *#@8 _*:*. .&###@###################| + .|##& _:::::&##& .*&##############@#8_ .###o _#@####################|_ + .&##|_ .&##8_ *o&####################8_ *##& .&#####@@############8* + .|##8_.&###&####8_ _########################8**##& _##################|_ + .&###&##888888##8_ .|88######@###########|*######o _|8###############|_ + .&#####o *###|_ _::::::*o##8**o##8 .|###8o .&##@#############&* + .|####o _|###|_ _##8.*&##& _*_ .#################| + _*_ _|###|_.. .|#####8|_ *&#@#########8###& + *#######&|o:_... ..*:::*. ......._:o&8####888&o:#####8_ + _###|&888#####@#####&|||o:_........................._:o||||8##@@@@####8|:*_ _:::*_ + .|#@###o _:::o#@#888######@@@@@@@@@@@@@@@@@@@@@@@@#####888|::::::**_ + _::*_ :##& *&8|_:::::::::::::::::::::::::**_ + .###8||&##8o + _|888888|_ + + + + + + + + + + diff --git a/edaweb/static/images/1583581996540.jpg b/edaweb/static/images/1583581996540.jpg Binary files differnew file mode 100755 index 0000000..53ceaae --- /dev/null +++ b/edaweb/static/images/1583581996540.jpg diff --git a/edaweb/static/images/20251111_102045.jpg b/edaweb/static/images/20251111_102045.jpg Binary files differnew file mode 100755 index 0000000..01f6964 --- /dev/null +++ b/edaweb/static/images/20251111_102045.jpg diff --git a/edaweb/static/images/20251111_102045.png b/edaweb/static/images/20251111_102045.png Binary files differnew file mode 100755 index 0000000..e7d7700 --- /dev/null +++ b/edaweb/static/images/20251111_102045.png diff --git a/edaweb/static/images/2209509307.jpg b/edaweb/static/images/2209509307.jpg Binary files differnew file mode 100755 index 0000000..1b5d515 --- /dev/null +++ b/edaweb/static/images/2209509307.jpg diff --git a/edaweb/static/images/2684330373.jpg b/edaweb/static/images/2684330373.jpg Binary files differnew file mode 100755 index 0000000..b050888 --- /dev/null +++ b/edaweb/static/images/2684330373.jpg diff --git a/edaweb/static/images/GZhgzaK.png b/edaweb/static/images/GZhgzaK.png Binary files differnew file mode 100755 index 0000000..c73e8b4 --- /dev/null +++ b/edaweb/static/images/GZhgzaK.png diff --git a/edaweb/static/images/GegzRla.png b/edaweb/static/images/GegzRla.png Binary files differnew file mode 100755 index 0000000..cf12555 --- /dev/null +++ b/edaweb/static/images/GegzRla.png diff --git a/edaweb/static/images/JwL2S2V.png b/edaweb/static/images/JwL2S2V.png Binary files differnew file mode 100755 index 0000000..9394c56 --- /dev/null +++ b/edaweb/static/images/JwL2S2V.png diff --git a/edaweb/static/images/PXL_20251108_063442686.MP.jpg b/edaweb/static/images/PXL_20251108_063442686.MP.jpg Binary files differnew file mode 100755 index 0000000..86171bb --- /dev/null +++ b/edaweb/static/images/PXL_20251108_063442686.MP.jpg diff --git a/edaweb/static/images/PXL_20251109_072147683.jpg b/edaweb/static/images/PXL_20251109_072147683.jpg Binary files differnew file mode 100644 index 0000000..6c2df9d --- /dev/null +++ b/edaweb/static/images/PXL_20251109_072147683.jpg diff --git a/edaweb/static/images/PXL_20251111_125628695.jpg b/edaweb/static/images/PXL_20251111_125628695.jpg Binary files differnew file mode 100644 index 0000000..557de37 --- /dev/null +++ b/edaweb/static/images/PXL_20251111_125628695.jpg diff --git a/edaweb/static/images/PXL_20251115_180322252.jpg b/edaweb/static/images/PXL_20251115_180322252.jpg Binary files differnew file mode 100644 index 0000000..9eb2905 --- /dev/null +++ b/edaweb/static/images/PXL_20251115_180322252.jpg diff --git a/edaweb/static/images/PXL_20251115_180349152.jpg b/edaweb/static/images/PXL_20251115_180349152.jpg Binary files differnew file mode 100644 index 0000000..452d7ca --- /dev/null +++ b/edaweb/static/images/PXL_20251115_180349152.jpg diff --git a/edaweb/static/images/PXL_20251130_222326376.jpg b/edaweb/static/images/PXL_20251130_222326376.jpg Binary files differnew file mode 100644 index 0000000..1f11f65 --- /dev/null +++ b/edaweb/static/images/PXL_20251130_222326376.jpg diff --git a/edaweb/static/images/PXL_20260210_231506089.jpg b/edaweb/static/images/PXL_20260210_231506089.jpg Binary files differnew file mode 100644 index 0000000..9d7816f --- /dev/null +++ b/edaweb/static/images/PXL_20260210_231506089.jpg diff --git a/edaweb/static/images/aLvcFjj.png b/edaweb/static/images/aLvcFjj.png Binary files differnew file mode 100755 index 0000000..c928ba7 --- /dev/null +++ b/edaweb/static/images/aLvcFjj.png diff --git a/edaweb/static/images/bdd_fuel.png b/edaweb/static/images/bdd_fuel.png Binary files differnew file mode 100755 index 0000000..e79522e --- /dev/null +++ b/edaweb/static/images/bdd_fuel.png diff --git a/edaweb/static/images/faceoff.jpg b/edaweb/static/images/faceoff.jpg Binary files differnew file mode 100644 index 0000000..a209700 --- /dev/null +++ b/edaweb/static/images/faceoff.jpg diff --git a/edaweb/static/images/foreheadsinus.png b/edaweb/static/images/foreheadsinus.png Binary files differnew file mode 100644 index 0000000..9b3851e --- /dev/null +++ b/edaweb/static/images/foreheadsinus.png diff --git a/edaweb/static/images/iKVCEoy.png b/edaweb/static/images/iKVCEoy.png Binary files differnew file mode 100755 index 0000000..05d6d70 --- /dev/null +++ b/edaweb/static/images/iKVCEoy.png diff --git a/edaweb/static/images/photo_2025-12-04_22-34-24.jpg b/edaweb/static/images/photo_2025-12-04_22-34-24.jpg Binary files differnew file mode 100755 index 0000000..51ced37 --- /dev/null +++ b/edaweb/static/images/photo_2025-12-04_22-34-24.jpg diff --git a/edaweb/static/images/rOJXmjG.png b/edaweb/static/images/rOJXmjG.png Binary files differnew file mode 100755 index 0000000..58a4ae4 --- /dev/null +++ b/edaweb/static/images/rOJXmjG.png diff --git a/edaweb/static/images/sally1.jpg b/edaweb/static/images/sally1.jpg Binary files differnew file mode 100644 index 0000000..baf8670 --- /dev/null +++ b/edaweb/static/images/sally1.jpg diff --git a/edaweb/static/images/sally2.jpg b/edaweb/static/images/sally2.jpg Binary files differnew file mode 100644 index 0000000..537d5a9 --- /dev/null +++ b/edaweb/static/images/sally2.jpg diff --git a/edaweb/static/images/v2Yfoou.jpg b/edaweb/static/images/v2Yfoou.jpg Binary files differnew file mode 100755 index 0000000..f3a3249 --- /dev/null +++ b/edaweb/static/images/v2Yfoou.jpg diff --git a/edaweb/static/images/wxbKYVv.png b/edaweb/static/images/wxbKYVv.png Binary files differnew file mode 100755 index 0000000..75feb10 --- /dev/null +++ b/edaweb/static/images/wxbKYVv.png diff --git a/edaweb/static/index.md b/edaweb/static/index.md index a676d59..71f1659 100644 --- a/edaweb/static/index.md +++ b/edaweb/static/index.md @@ -1,36 +1,32 @@ -site now also avaliable under the domain [boymoder.blog](https://boymoder.blog)! - - - -## haiiiiiii -my name is eden and im a 23yo (boymoder/[fujoshi](https://www.urbandictionary.com/define.php?term=fujoshi)) computer science/robotics PhD student. i made my own website to encourage others to do so too. -i'll post my thoughts on here sometimes, and use this site to link to other stuff i host [more about me](/thought?id=2). - -[click here for a random image of lio fotia](/random?tags=lio_fotia) - -[click here for a random KawoShin image](/random?tags=nagisa_kaworu+ikari_shinji+yaoi) - -## FOSS alternative services - -- [nextcloud - dropbox (+ much more!) alternative](https://nc.eda.gay) -- [git server - github alternative](https://git.eda.gay/) -- [jellyfin - web player for ~~legally downloaded~~ TV and films](https://jellyfin.eda.gay) - RIP emby! - -[see the services im running right now](/services) (takes a couple seconds to load) - -these sites are hosted on my [homelab system](https://wiki.eda.gay) - - - - -## nice websites -- [wiby.me](http://wiby.me/) - search engine for old style websites with limited javascript (my site used to be on here but it got blacklisted for some reason?) -- [dysmorph.nekoweb.org](https://dysmorph.nekoweb.org/) - a site that is very based because it looks similar -- [boymoder.network](https://boymoder.network/) - website for boymoder awareness -- [4chan.org/lgbt/](https://boards.4channel.org/lgbt/) - but dont blame me if u catch brainworms -- [https://www.math.uni-bielefeld.de/~sillke/Twister/fun/elevator-fun90.html](https://www.math.uni-bielefeld.de/~sillke/Twister/fun/elevator-fun90.html) any website with a URL like this is gonna be good -- [boymoder.moe](https://nyaomidev.github.io/boymoder.moe/) -- [boymoders.com](https://boymoders.com) -- [john.citrons.xyz](https://john.citrons.xyz/) - for the nice 'ads' featured at the bottom of my page - - +site now also avaliable under the domain [boymoder.blog](https://boymoder.blog)!
+
+<!--  -->
+
+## haiiiiiii
+my name is eden and im a 23yo (boymoder/[fujoshi](https://www.urbandictionary.com/define.php?term=fujoshi)) computer science/robotics PhD student. i made my own website to encourage others to do so too.
+i'll post my thoughts on here sometimes, and use this site to link to other stuff i host [more about me](/thought?id=2).
+
+## FOSS alternative services
+
+- [nextcloud - dropbox (+ much more!) alternative](https://nc.eda.gay)
+- [git server - github alternative](https://git.eda.gay/)
+- [jellyfin - web player for ~~legally downloaded~~ TV and films](https://jellyfin.eda.gay) - RIP emby!
+
+[see the services im running right now](/services) (takes a couple seconds to load)
+
+these sites are hosted on my [homelab system](https://wiki.eda.gay)
+
+
+
+
+## nice websites
+- [wiby.me](http://wiby.me/) - search engine for old style websites with limited javascript (my site used to be on here but it got blacklisted for some reason?)
+- [dysmorph.nekoweb.org](https://dysmorph.nekoweb.org/) - a site that is very based because it looks similar
+- [transsexual.org](https://web.archive.org/web/20010802032136/http://transsexual.org/Toon.html) - awesome and relatable transsexual comics from a website that's slightly older than me
+- [norfolkchurches.co.uk](http://www.norfolkchurches.co.uk/norwichintro.htm) - site about all the churches in norwich (and norfolk!), the city that has far too many medieval churches than it knows what to do with. this site is preciesly what the internet should be, the muted ramblings of someone with an expert knowledge on his preferred niche interest. without any javascript. nice if, like me, you have a middling interest in theology
+- [boymoder.network](https://boymoder.network/) - website for boymoder awareness
+- [4chan.org/lgbt/](https://boards.4channel.org/lgbt/) - but dont blame me if u catch brainworms
+- [https://www.math.uni-bielefeld.de/~sillke/Twister/fun/elevator-fun90.html](https://www.math.uni-bielefeld.de/~sillke/Twister/fun/elevator-fun90.html) any website with a URL like this is gonna be good
+- [john.citrons.xyz](https://john.citrons.xyz/) - for the nice 'ads' featured at the bottom of my page
+
+
diff --git a/edaweb/static/robots.txt b/edaweb/static/robots.txt index c2aab7e..04154e9 100644 --- a/edaweb/static/robots.txt +++ b/edaweb/static/robots.txt @@ -1,2 +1,7 @@ User-agent: *
-Disallow: /
\ No newline at end of file +Allow: /
+User-agent: Googlebot-Image
+Disallow: *
+User-agent: *
+Disallow: /random*
+
diff --git a/edaweb/templates/discord.html.j2 b/edaweb/templates/discord.html.j2 index 597fb4b..e946f13 100644 --- a/edaweb/templates/discord.html.j2 +++ b/edaweb/templates/discord.html.j2 @@ -1,5 +1,5 @@ {% extends "template.html.j2" %} {% block content %} <p>You can contact me on discord (telegram preferred):</p> - <h1>{{discord}}</h1> + <h1>{{ discord }}</h1> {% endblock %}
\ No newline at end of file diff --git a/edaweb/templates/index.html.j2 b/edaweb/templates/index.html.j2 index d6c08d8..0f9ce37 100644 --- a/edaweb/templates/index.html.j2 +++ b/edaweb/templates/index.html.j2 @@ -1,16 +1,16 @@ {% extends "template.html.j2" %} {% block content %} <aside> - <a><i>{{ "%d days until FFS" % days_till_ffs.days }}</i></a> + <a><i>{{ "%d days since FFS" % days_since_ffs.days }}</i></a> <section id="recent_thoughts"> - <h4>recent thoughts:</h4> + <h4>recent blog posts:</h4> <ul> {% for id_, title in featured_thoughts %} <li><a href="{{'/thought?id=%i' % id_}}">{{title}}</a></li> {% endfor %} </ul> </section> - <img id="sidebar_img" alt="{{sidebar_img[0]}}" src="{{sidebar_img[1]}}"> + {# <img id="sidebar_img" alt="{{sidebar_img[0]}}" src="{{sidebar_img[1]}}"> #} </aside> {{markdown|safe}} <section id="recent_commits"> diff --git a/edaweb/templates/question.html.j2 b/edaweb/templates/question.html.j2 new file mode 100644 index 0000000..a9c7a0c --- /dev/null +++ b/edaweb/templates/question.html.j2 @@ -0,0 +1,22 @@ +{% extends "template.html.j2" %} +{% block content %} + <aside> + {% if qna["previous"] != None %} + <a href="/question?id={{ qna['previous'] }}">← Previous</a> + {% endif %} + {% if qna["next"] != None %} + <a href="/question?id={{ qna['next'] }}">→ Next</a> + {% endif %} + <br> + <a href="/questions#{{ qna['qna'][0] }}">All questions</a> + </aside> + + <h4><a href="{{ qnas_link }}">ask a question!</a></h4> + <dl> + <dt class="qnaheader">ID:</dt><dd>{{ qna["qna"][0] }}</dd> + <dt class="qnaheader">Question source:</dt><dd>{{ qna["qna"][-1] }}</dd> + <dt class="qnaheader">Answered at:</dt><dd>{{ qna["qna"][2] }}</dd> + <dt class="qnaheader">Question:</dt><dd>{{ qna["qna"][3] }}</dd> + <dt class="qnaheader">Answer:</dt><dd>{{ qna["qna"][4] }}</dd> + </dl> +{% endblock %}
\ No newline at end of file diff --git a/edaweb/templates/questions.html.j2 b/edaweb/templates/questions.html.j2 index eb58380..a800941 100644 --- a/edaweb/templates/questions.html.j2 +++ b/edaweb/templates/questions.html.j2 @@ -3,11 +3,7 @@ <h4><a href="{{ qnas_link }}">ask a question!</a></h4> <dl> {% for id_, link, dt, question, answer, host in qnas %} - {% if host == "curiouscat" %} - <dt class="qnaheader"><a href="{{ link }}">{{ dt.isoformat() }}</a> - {{ host }}</dt> - {% else %} - <dt class="qnaheader">{{ dt.isoformat() }} - {{ host }}</dt> - {% endif %} + <dt class="qnaheader" id="{{ id_ }}"><a href="question?id={{ id_ }}">{{ dt.isoformat() }}</a> - {{ host }}</dt> <dd> <dt class="question"><p>{{ question }}</p></dt> <dd class="answer"><p>{{ answer }}</p></dd> diff --git a/edaweb/templates/services.html.j2 b/edaweb/templates/services.html.j2 index 9f42c7f..c336990 100644 --- a/edaweb/templates/services.html.j2 +++ b/edaweb/templates/services.html.j2 @@ -5,7 +5,7 @@ <h2>docker</h2> <ul> {% for host, containers in docker["containers"].items() %} - <h4>{{ "%s - %s" % (host[0], host[1]) }}</h4> + <h4>{{ "%s - %s - %s" % (host[0], host[1], docker["uptimes"][host]) }}</h4> <table> {% for name, status, image in containers %} <tr> |
