Add vcard

This commit is contained in:
Zergling_man 2021-11-10 02:45:32 +11:00
parent 277a8efbe6
commit e609f7a8d7
2 changed files with 13 additions and 0 deletions

View File

@ -11,5 +11,6 @@ urlpatterns=[
path('toask',views.articles,name='articles'), path('toask',views.articles,name='articles'),
re_path('r/(.*)',views.redirect,name='redirect'), re_path('r/(.*)',views.redirect,name='redirect'),
path('md.rss',views.md,name='md'), path('md.rss',views.md,name='md'),
path('me.vcf',views.vcard,name='vcard'),
re_path('(.*)',views.autopage,name='everything'), re_path('(.*)',views.autopage,name='everything'),
] ]

View File

@ -112,6 +112,18 @@ def md(req):
feed=loop.run_until_complete(mdl.makefeed(req.GET.getlist('ids',''))) feed=loop.run_until_complete(mdl.makefeed(req.GET.getlist('ids','')))
return HttpResponse(feed, content_type='application/rss+xml') 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 @rerender
def autopage(page): def autopage(page):
p=Page.objects.get(url=page) p=Page.objects.get(url=page)