From e609f7a8d7dacd8de54f2ce50cfad1ccf75ceef3 Mon Sep 17 00:00:00 2001 From: Zergling_man Date: Wed, 10 Nov 2021 02:45:32 +1100 Subject: [PATCH] Add vcard --- main/urls.py | 1 + main/views.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/main/urls.py b/main/urls.py index e4e42a2..fb092f7 100644 --- a/main/urls.py +++ b/main/urls.py @@ -11,5 +11,6 @@ urlpatterns=[ path('toask',views.articles,name='articles'), re_path('r/(.*)',views.redirect,name='redirect'), path('md.rss',views.md,name='md'), + path('me.vcf',views.vcard,name='vcard'), re_path('(.*)',views.autopage,name='everything'), ] \ No newline at end of file diff --git a/main/views.py b/main/views.py index 58ea362..e5b655d 100644 --- a/main/views.py +++ b/main/views.py @@ -112,6 +112,18 @@ def md(req): feed=loop.run_until_complete(mdl.makefeed(req.GET.getlist('ids',''))) return HttpResponse(feed, content_type='application/rss+xml') +def vcard(req): + return HttpResponse("""BEGIN:VCARD +VERSION:4.0 +KIND:individual +FN:Zergling_man +EMAIL:zerglingman@fedora.email +URL:https://rakka.tk +IMPP:xmpp:zergling_man@xmpp.jp;matrix:@zergling.man:perthchat.org +NOTE:Anti-professionalism, pro-open standards +CATEGORIES:programmer,biker +SOURCE:https://rakka.tk/me.vcf +END:VCARD""") @rerender def autopage(page): p=Page.objects.get(url=page)