Compare commits

..

16 Commits

Author SHA1 Message Date
c64c4a1ba4 lol 2022-11-08 05:15:32 +11:00
c941397e7b good thing announces are still basic 2022-11-07 21:52:49 +11:00
0fb617976d Forgot to update the real css too 2022-09-15 14:41:11 +10:00
a724716d7e javashit 2022-09-14 18:39:35 +10:00
c3cfef4ae3 store dates 2022-09-13 04:52:58 +10:00
b7c4c1a207 Merge remote-tracking branch 'refs/remotes/origin/master' 2022-09-10 01:20:30 +10:00
00f15f1879 Did I forget to actually update this lol 2022-09-10 01:20:19 +10:00
ddae692f0b store update 2022-08-25 13:41:32 +10:00
20330437ea ... and date 2022-07-25 10:32:03 +10:00
83de5f58a2 articles update 2022-07-25 10:31:40 +10:00
e87f45bcd8 Added a bit more comment AND CREDITgit pushgit push 2022-05-31 00:59:57 +10:00
678204ec71 Fixed navbar being intrusive in lynx 2022-05-31 00:58:14 +10:00
743d6ec5ca Oh no I made a crash bug and it somehow got past adding an account on live but not on test 2022-05-28 23:25:59 +10:00
409ad95c05 Didn't forget to add this time. Thanks merge conflict, actually useful. 2022-05-27 03:49:34 +10:00
df9066e066 lol updated store info with whole section delete pending 2022-05-27 03:48:26 +10:00
17f3c5608e Hooboy changes. Store e stuff now has DB so I can put budget in (long overdue), plus make closed dates dynamic. Also added explanation of MD RSS, and some other things like pulling out dud nav entries. And... I think maybe navs have DB now too? IDK 2022-05-27 03:45:44 +10:00
16 changed files with 131 additions and 23 deletions

View File

@@ -1,26 +1,34 @@
Nettiquette and misc: Nettiquette:
http://www.nohello.com http://www.nohello.com
https://nohello.net/ https://nohello.net/
https://sol.gfxile.net/dontask.html https://sol.gfxile.net/dontask.html
https://dontasktoask.com/ https://dontasktoask.com/
http://slash7.com/2006/12/22/vampires/ http://slash7.com/2006/12/22/vampires/
http://xyproblem.info/ http://xyproblem.info/
Politicking:
https://ncase.me/ballot https://ncase.me/ballot
https://digdeeper.neocities.org/ghost/email.html
http://www.kanjidamage.com
https://innermantheatre.com/2021/03/29/lightspeed-lab-homosexuality/,The Christian stance on homosexuality in 3 panels https://innermantheatre.com/2021/03/29/lightspeed-lab-homosexuality/,The Christian stance on homosexuality in 3 panels
Economics:
https://archive.secondspring.co.uk/articles/borruso.htm https://archive.secondspring.co.uk/articles/borruso.htm
Computers and languages are hard: Computers are hard:
http://www.zompist.com/yingzi/yingzi.htm
https://gankra.github.io/blah/text-hates-you/ https://gankra.github.io/blah/text-hates-you/
https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/ https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/
https://infiniteundo.com/post/25326999628/falsehoods-programmers-believe-about-time https://infiniteundo.com/post/25326999628/falsehoods-programmers-believe-about-time
https://infiniteundo.com/post/25509354022/more-falsehoods-programmers-believe-about-time https://infiniteundo.com/post/25509354022/more-falsehoods-programmers-believe-about-time
https://eev.ee/blog/2015/09/12/dark-corners-of-unicode/ https://eev.ee/blog/2015/09/12/dark-corners-of-unicode/
https://faculty.georgetown.edu/jod/texts/twain.german.html,Languages are angry
http://michael.orlitzky.com/articles/motherfuckers_need_package_management.xhtml http://michael.orlitzky.com/articles/motherfuckers_need_package_management.xhtml
https://idlewords.com/talks/website_obesity.htm https://idlewords.com/talks/website_obesity.htm
https://digdeeper.club/articles/email.xhtml
https://spyware.neocities.org/articles/brave.html,Computers are your enemy
https://prose.sh/
Languages are hard:
http://www.zompist.com/yingzi/yingzi.htm
http://www.kanjidamage.com,The right way to learn kanji
https://faculty.georgetown.edu/jod/texts/twain.german.html,Languages are angry
Otome! And maybe other game design: Otome! And maybe other game design:
https://uguucageoflove.wordpress.com/2020/05/17/preferences-of-otome-gamers-a-survey-of-japanese-players/ https://uguucageoflove.wordpress.com/2020/05/17/preferences-of-otome-gamers-a-survey-of-japanese-players/

View File

@@ -11,8 +11,10 @@
<h4>Notices:</h4> <h4>Notices:</h4>
<ul> <ul>
<li>Apr 5th: I think I've figured out what was causing constant dropouts, uptime should be back to >99%.</li> <li>2022 Nov 8th: False alarm, I just needed to restart the DB.</li>
<li>Mar 27th: Oh yeah I found those other things. One is now at <a href="https://rakka.tk/r/support">https://rakka.tk/r/support</a>, the other is <a href="https://bae.st/media/38f1485d-a6bd-4b30-a409-0d9e75f22d19/bf313a3566fc2ada.png">here</a></li> <li>2022 Nov 7th: Database access is fucked, I don't know why, but large parts of my site will be inaccessible as a result (including, annoyingly, the contact page). I will probably redo the whole thing as a static site instead of trying to fix it.</li>
<li>Feb 15th: Here are some links for a certain person I was speaking to. Actually a couple of people. <a href='https://mangadex.org/manga/c6a51a13-74fd-46bd-989e-5cdaa26542f6'>Hero BBS</a>, parodying isekai before isekai was big. I still haven't found the other things I mentioned.</li> <li>2022 Apr 5th: I think I've figured out what was causing constant dropouts, uptime should be back to &gt;99%.</li>
<li>Feb 9th: Someone discovered that my ftp server was externally accessible and allowed anonymous writes and edits. Unfortunately I am too incompetent to have had it logging properly so I didn't get their IP, sad! Still, I feel special. Now I know I've made it.</li> <li>2022 Mar 27th: Oh yeah I found those other things. One is now at <a href="https://rakka.tk/r/support">https://rakka.tk/r/support</a>, the other is <a href="https://bae.st/media/38f1485d-a6bd-4b30-a409-0d9e75f22d19/bf313a3566fc2ada.png">here</a></li>
<li>2022 Feb 15th: Here are some links for a certain person I was speaking to. Actually a couple of people. <a href='https://mangadex.org/manga/c6a51a13-74fd-46bd-989e-5cdaa26542f6'>Hero BBS</a>, parodying isekai before isekai was big. I still haven't found the other things I mentioned.</li>
<li>2022 Feb 9th: Someone discovered that my ftp server was externally accessible and allowed anonymous writes and edits. Unfortunately I am too incompetent to have had it logging properly so I didn't get their IP, sad! Still, I feel special. Now I know I've made it.</li>
</ul> </ul>

View File

@@ -5,12 +5,25 @@
<title> <title>
Tas [] & Van Canto - {{ title }} Tas [] & Van Canto - {{ title }}
</title> </title>
<script type="text/javascript">
function b(){
a=document.body.innerHTML
document.body.innerHTML = '<main><p>Please disable JavaScript to view this site.</p><p><a href="/javashit">Why?</a> <a href="https://www.wikihow.com/Disable-JavaScript">How?</a></p><p id="tock" class="tick">Or wait <n id="tick">3</n> seconds...</p></main>'
function t1(){document.getElementById('tick').textContent=2}
function t2(){document.getElementById('tick').textContent=1}
function c(){console.log("fucking normie"); document.body.innerHTML=a}
window.setTimeout(t1,1000)
window.setTimeout(t2,2000)
window.setTimeout(c,3000)
}
</script><!--Need to add a timer to remove it first. I'm not *that* mean. Credit: https://soc.punktrash.club/objects/bfe4fc29-96d5-4f90-9f9e-4092e7c273a4-->
</head> </head>
<body> <body onload=b()>
{{ nav }} <!--Move navbar to the bottom and use flex to reorder it to the top, so it isn't as intrusive without CSS.-->
<main> <main>
{% autoescape off %}{{ content }}{% endautoescape %} {% autoescape off %}{{ content }}{% endautoescape %}
</main> </main>
<p class="foot">Page last updated {{ date }}</p> <p class="foot">Page last updated {{ date }}</p>
{{ nav }}
</body> </body>
</html> </html>

View File

@@ -10,7 +10,6 @@ urlpatterns=[
path('comment',views.comment,name='shoutbox'), path('comment',views.comment,name='shoutbox'),
path('specs',views.specs,name='specs'), path('specs',views.specs,name='specs'),
path('songs',views.songs,name='songs'), path('songs',views.songs,name='songs'),
path('nerdshope',views.nerdshope,name='shop'),
path('teapot',views.teapot,name='teapot'), path('teapot',views.teapot,name='teapot'),
path('toask',views.articles,name='articles'), path('toask',views.articles,name='articles'),
path('r/<redirect:src>',views.redirect,name='redirect'), path('r/<redirect:src>',views.redirect,name='redirect'),

View File

@@ -4,7 +4,7 @@ syntax,/syntax,Syntaxer,2
todo,/todos,Todos,0 todo,/todos,Todos,0
pics,/pics,Pics,2 pics,/pics,Pics,2
wargame,https://gitlab.com/zergling-man/Wargamer,Wargamer,0 wargame,https://gitlab.com/zergling-man/Wargamer,Wargamer,0
rinbot,/r/rinbot,Rinbot,0 rinbot,/r/rinbot,Rinbot,2
survey,/emojisurvey.php,Survey,2 survey,/emojisurvey.php,Survey,2
myroids,/myroids,Myroids,0 myroids,/myroids,Myroids,0
bot,/bot,Bot chat,2 bot,/bot,Bot chat,2

View File

@@ -58,10 +58,6 @@ def songs():
out='This is the full list of songs that can appear on the home page.<br/>'+'<br/>\n'.join([f'<a href="https://invidious.ethibox.fr/watch?v={idd}">https://invidious.ethibox.fr/watch?v={idd}</a>' for idd in ids]) out='This is the full list of songs that can appear on the home page.<br/>'+'<br/>\n'.join([f'<a href="https://invidious.ethibox.fr/watch?v={idd}">https://invidious.ethibox.fr/watch?v={idd}</a>' for idd in ids])
return {'title':'Songs','content':out,'date':'2021/05/06'} return {'title':'Songs','content':out,'date':'2021/05/06'}
@rerender
def nerdshope():
return {'title':"Nerds' Hope",'content':"Store stuff. TODO. Will include inventory and budget. <a href='https://facebook.com/nerdshope'>FB</a><br/>Address is 21 Kensington St, Glenorchy<br/>Off dates 2022: 29th April, 6th May, 27th May, 17th June, 24th June<br/>The store is open today (Apr 15th) but the carpark is closed. Pedestrian access possible.",'date':'2022/04/15'}
def teapot(req): def teapot(req):
return HttpResponse("You're probably missing the joke.",status=418) return HttpResponse("You're probably missing the joke.",status=418)
@@ -72,14 +68,20 @@ def articles():
out=[] out=[]
for k,v in arts.items(): for k,v in arts.items():
out.append(f'<h4>{k}</h4>\n'+ '<br/>\n'.join([f'<a href="{l[0]}">{l[1] or l[0]}</a>' for l in v])) out.append(f'<h4>{k}</h4>\n'+ '<br/>\n'.join([f'<a href="{l[0]}">{l[1] or l[0]}</a>' for l in v]))
return {'title':'Articles','content':'<p>'+('</p>\n<p>'.join(out))+'</p>','date':'2022/04/11'} return {'title':'Articles','content':'<p>'+('</p>\n<p>'.join(out))+'</p>','date':'2022/07/25'}
def redirect(req,src): def redirect(req,src):
return HttpResponse(status=302,headers={'Location':src.output}) return HttpResponse(status=302,headers={'Location':src.output})
@rerender
def mdhelp():
return {'title':'How2MD RSS','date':'2022/05/27','content':"This is an <a href='https://en.wikipedia.org/wiki/RSS'>RSS</a> service for <a href='https://mangadex.org'>Mangadex</a>, since they had one in v3 that I made liberal use of, and I've heard nothing regarding its return in v5.<br/>If you've never used RSS before, I strongly recommend starting, as it's the second-best update notification system in existence (and it could be built on #1, push notifications, but that's an another topic).<br/>You will need an RSS reader program, but your browser probably has one built in, so you can just use that. (I don't recommend it, because you should be closing the browser more, not less.)<br/>The important part of an RSS feed is a source URL. If properly configured, that should provide everything else. In this case, you've already found the source URL... Kinda. You need to pass a manga ID (or several) to make it work. A manga ID looks like this: ed996855-70de-449f-bba2-e8e24224c14d (yes, that's a UUID4). If you go to a manga's page on Mangadex, you should see something like it in the URL bar at the top. I think Tachiyomi has some way to grab it, but I also think Tachi's update notifs are better than mine, so if you have that you don't need this.<br/>Once you have the ID(s), you should palm them into this page like this: <a href='/md.rss?ids=ed996855-70de-449f-bba2-e8e24224c14d'>https://rakka.tk/md.rss?ids=ed996855-70de-449f-bba2-e8e24224c14d</a>. Take that and give it to your RSS reader as a new feed and it should handle the rest (did your browser ask you a new question when you clicked it?). If you want more IDs, put an & and do it again: <a href='/md.rss?ids=ed996855-70de-449f-bba2-e8e24224c14d&ids=/d032cdeb-1ced-4031-8b9e-45e6064c1781'>https://rakka.tk/md.rss?ids=ed996855-70de-449f-bba2-e8e24224c14d&ids=d032cdeb-1ced-4031-8b9e-45e6064c1781</a>.<br/>It behaves a bit differently with 1 ID vs multiple, but it should work alright both ways. Personally I prefer making one feed for each series."}
def md(req): def md(req):
ids=req.GET.getlist('ids','')
if not ids: return mdhelp(req)
loop=asyncio.get_event_loop() loop=asyncio.get_event_loop()
feed=loop.run_until_complete(mdl.makefeed(req.GET.getlist('ids',''))) feed=loop.run_until_complete(mdl.makefeed(ids))
return HttpResponse(feed, content_type='application/rss+xml') return HttpResponse(feed, content_type='application/rss+xml')
def vcard(req): def vcard(req):
@@ -97,4 +99,4 @@ END:VCARD""")
@rerender @rerender
def autopage(page): def autopage(page):
return {'title':page.title,'content':page.contents,'date':page.last_edited} return {'title':page.title,'content':page.contents,'date':page.last_edited}

0
nerdshope/__init__.py Normal file
View File

8
nerdshope/admin.py Normal file
View File

@@ -0,0 +1,8 @@
from django.contrib import admin
# Register your models here.
from .models import BankAccount,Payment,OffDate
admin.site.register(BankAccount)
admin.site.register(Payment)
admin.site.register(OffDate)

6
nerdshope/apps.py Normal file
View File

@@ -0,0 +1,6 @@
from django.apps import AppConfig
class NerdshopeConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'nerdshope'

30
nerdshope/models.py Normal file
View File

@@ -0,0 +1,30 @@
from django.db import models
from django.utils.timezone import now
# Create your models here.
class BankAccount(models.Model):
name=models.CharField(max_length=100)
physical=models.CharField(max_length=100)
currency=models.CharField(max_length=5)
@property
def balance(self): return sum(map(lambda x:x.amount,Payment.objects.filter(account=self)))
def __str__(self):
return str(self.name)+', '+str(self.balance)
class Payment(models.Model):
timestamp=models.DateTimeField(default=now)
other_party=models.CharField(max_length=100)
account=models.ForeignKey(BankAccount, on_delete=models.CASCADE)
amount=models.IntegerField(default=0)
reason=models.CharField(max_length=200)
def __str__(self):
return str(self.timestamp)+', '+str(self.amount)+', '+str(self.reason)
class OffDate(models.Model):
when=models.DateField(default=now)
reason=models.CharField(max_length=50,default="Hall unavailable")
def __str__(self):
return str(str.when)+': '+str(self.reason)

3
nerdshope/tests.py Normal file
View File

@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

6
nerdshope/urls.py Normal file
View File

@@ -0,0 +1,6 @@
from django.urls import include, path
from . import views
urlpatterns = [
path('',views.nerdshope,name='shop'),
]

16
nerdshope/views.py Normal file
View File

@@ -0,0 +1,16 @@
from django.shortcuts import render
from rakka.utils import rerender
from . import models
from main.models import Update
@rerender
def nerdshope():
accounts=models.BankAccount.objects.all()
sums={curr:sum([n.balance for n in filter(lambda x:x.currency==curr,accounts)]) for curr in set(map(lambda x:x.currency,accounts))}
moneyblob='</li>\n<li>'.join([f'{k}: {v}' for k,v in sums.items()])
moneyblob='Current monetary state: <ul>\n<li>'+moneyblob+'</li>\n</ul>'
return {'title':"Nerds' Hope",'content':"Store stuff. TODOing. Will include inventory and budget. <a href='https://facebook.com/nerdshope'>FB</a><br/>\nAddress is 21 Kensington St, Glenorchy<br/>\nThe store isn't open when other events happen on Fridays, usually the last Friday of each month. Additionally, on the first and third weeks of each month the store will move around the back (through the gate) around 18:00 to make room for a youth group. If in doubt, ask the youth group for directions.<br/>\nFull list of dates:\n<ol><li>16th Sept - round the back later</li>\n<li>30th Sept - closed</li>\n<li>21st Oct - round the back later</li>\n<li>28th Oct - closed</li>\n<li>4th Nov - round the back later</li>\n<li>18th Nov - round the back later</li>\n<li>25th Nov - closed</li>\n<li>2nd Dec - round the back later</li>\n<li>16th Dec - round the back later</li>\n<li>30th Dec - maybe party</li></ol>\n"+moneyblob,'date':Update.objects.get_or_create(page='nh_main')[0].date}
@rerender
def budget():
pass

View File

@@ -35,6 +35,7 @@ ALLOWED_HOSTS = [n.strip() for n in conf['ALLOWED_HOSTS'].split(',')]
INSTALLED_APPS = [ INSTALLED_APPS = [
'main.apps.MainConfig', 'main.apps.MainConfig',
'books.apps.BooksConfig', 'books.apps.BooksConfig',
'nerdshope.apps.NerdshopeConfig',
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.contenttypes',

View File

@@ -21,5 +21,6 @@ urlpatterns = [
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
path('books/',include('books.urls')), path('books/',include('books.urls')),
path('comment/',include('comment.urls')), path('comment/',include('comment.urls')),
path('nerdshope/',include('nerdshope.urls')),
path('', include('main.urls')), path('', include('main.urls')),
] ]

View File

@@ -5,6 +5,11 @@ body
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
/*Move navbar to the bottom and use flex to reorder it to the top, so it isn't as intrusive without CSS.
Thanks to @heftig:archlinux.org (matrix) for showing me this.*/
display: flex;
flex-direction: column;
} }
nav nav
@@ -21,6 +26,7 @@ nav
display: inline-block; display: inline-block;
background-color: #9999ff; background-color: #9999ff;
order: 1; /*flex thing*/
} }
main main
@@ -41,6 +47,7 @@ main
margin-right: auto; margin-right: auto;
border: 2px solid; border: 2px solid;
text-align: center; text-align: center;
order: 2; /*flex thing*/
} }
main * main *
@@ -64,7 +71,7 @@ li.navpiece
position:relative; position:relative;
} }
a.navpiece, div.navpiece a.navpiece/*, div.navpiece Apparently this wasn't doing anything either.*/
{ {
text-decoration-line:none; text-decoration-line:none;
display: table-cell; display: table-cell;
@@ -123,7 +130,13 @@ h1
background-color: #cccccc; background-color: #cccccc;
float: right; float: right;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: 0; /* Need to set this for flex thing*/
border: 2px solid; border: 2px solid;
text-align: center; text-align: center;
order: 3; /*flex thing*/
}
.tick
{
color: #dddddd;
} }