diff --git a/main/templates/main/temp.html b/main/templates/main/temp.html index 64c0af2..5372664 100644 --- a/main/templates/main/temp.html +++ b/main/templates/main/temp.html @@ -5,6 +5,9 @@ Tas [] & Van Canto - {{ title }} + {{ nav }} diff --git a/main/urls.py b/main/urls.py index 8d31315..61a4569 100644 --- a/main/urls.py +++ b/main/urls.py @@ -10,7 +10,6 @@ urlpatterns=[ path('comment',views.comment,name='shoutbox'), path('specs',views.specs,name='specs'), path('songs',views.songs,name='songs'), - path('nerdshope',views.nerdshope,name='shop'), path('teapot',views.teapot,name='teapot'), path('toask',views.articles,name='articles'), path('r/',views.redirect,name='redirect'), diff --git a/main/utils/navs b/main/utils/navs index 4e4e3a7..3caaefb 100644 --- a/main/utils/navs +++ b/main/utils/navs @@ -4,7 +4,7 @@ syntax,/syntax,Syntaxer,2 todo,/todos,Todos,0 pics,/pics,Pics,2 wargame,https://gitlab.com/zergling-man/Wargamer,Wargamer,0 -rinbot,/r/rinbot,Rinbot,0 +rinbot,/r/rinbot,Rinbot,2 survey,/emojisurvey.php,Survey,2 myroids,/myroids,Myroids,0 bot,/bot,Bot chat,2 diff --git a/main/views.py b/main/views.py index 99e9427..55c922a 100644 --- a/main/views.py +++ b/main/views.py @@ -58,10 +58,6 @@ def songs(): out='This is the full list of songs that can appear on the home page.
'+'
\n'.join([f'https://invidious.ethibox.fr/watch?v={idd}' for idd in ids]) 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. FB
Address is 21 Kensington St, Glenorchy
Off dates 2022: 29th April, 6th May, 27th May, 17th June, 24th June",'date':'2022/04/10'} - def teapot(req): return HttpResponse("You're probably missing the joke.",status=418) @@ -77,9 +73,15 @@ def articles(): def redirect(req,src): return HttpResponse(status=302,headers={'Location':src.output}) +@rerender +def mdhelp(): + return {'title':'How2MD RSS','date':'2022/05/27','content':"This is an RSS service for Mangadex, since they had one in v3 that I made liberal use of, and I've heard nothing regarding its return in v5.
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).
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.)
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.
Once you have the ID(s), you should palm them into this page like this: https://rakka.tk/md.rss?ids=ed996855-70de-449f-bba2-e8e24224c14d. 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: https://rakka.tk/md.rss?ids=ed996855-70de-449f-bba2-e8e24224c14d&ids=d032cdeb-1ced-4031-8b9e-45e6064c1781.
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): + ids=req.GET.getlist('ids','') + if not ids: return mdhelp(req) 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') def vcard(req): @@ -97,4 +99,4 @@ END:VCARD""") @rerender 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} \ No newline at end of file diff --git a/rakka/settings.py b/rakka/settings.py index ad278c4..6ed5439 100644 --- a/rakka/settings.py +++ b/rakka/settings.py @@ -35,6 +35,7 @@ ALLOWED_HOSTS = [n.strip() for n in conf['ALLOWED_HOSTS'].split(',')] INSTALLED_APPS = [ 'main.apps.MainConfig', 'books.apps.BooksConfig', + 'nerdshope.apps.NerdshopeConfig', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', diff --git a/rakka/urls.py b/rakka/urls.py index d70dc31..a10c3c4 100644 --- a/rakka/urls.py +++ b/rakka/urls.py @@ -21,5 +21,6 @@ urlpatterns = [ path('admin/', admin.site.urls), path('books/',include('books.urls')), path('comment/',include('comment.urls')), + path('nerdshope/',include('nerdshope.urls')), path('', include('main.urls')), ]