From 12a0628767baee9d9c836d24f46c6525beeede36 Mon Sep 17 00:00:00 2001 From: "Schimon Jehudah, Adv." Date: Tue, 9 Jul 2024 18:17:18 +0300 Subject: [PATCH] Add file favicon.ico. --- README.md | 2 +- favicon.ico | Bin 0 -> 15086 bytes graphic/xmpp.svg | 26 ++++++++++++++++++++++++++ pubsub_to_atom.py | 11 ++++++++--- xsl/atom_as_xhtml.xsl | 1 + 5 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 favicon.ico create mode 100644 graphic/xmpp.svg diff --git a/README.md b/README.md index fcb0c79..46608eb 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,6 @@ Special thanks to "d3x" and "cchianel" from IRC channel #python on irc.libera.ch ## Similar Projects -* [AtomEntry](https://github.com/tigase/sureim/blob/master/site/src/main/java/tigase/sure/web/site/client/pubsub/AtomEntry.java) and [PubSubPublishViewImpl](https://github.com/tigase/sureim/blob/master/site/src/main/java/tigase/sure/web/site/client/pubsub/PubSubPublishViewImpl.java)- Convert XMPP Pubsub Nodes to Atom Syndication Format and convey them over HTTP. +* [AtomEntry](https://github.com/tigase/sureim/blob/master/site/src/main/java/tigase/sure/web/site/client/pubsub/AtomEntry.java) and [PubSubPublishViewImpl](https://github.com/tigase/sureim/blob/master/site/src/main/java/tigase/sure/web/site/client/pubsub/PubSubPublishViewImpl.java) - Convert XMPP Pubsub Nodes to Atom Syndication Format and convey them over HTTP. * [AtomToPubsub](https://github.com/edhelas/atomtopubsub) - A little client that parses Atom + RSS feeds and send them on XMPP Pubsub Nodes. diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..41a5b5057b711bdb4653fed97e5879354aacdff7 GIT binary patch literal 15086 zcmeHN30PCd7QQSM7ir&jHRZ#@Qi0lydBm@FgYpv8JRZ&pEwIE0c zC?KM!xK%_&#ibxi)n{9vB31>Z{rb@F`AQXX-kBQ`LVyskwZ89TzVGDZ&YU^tpL1vK zoqNtuloq8!Sy)iWO{q*Xikd`Gl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c|_!9qptufYWK{@+bXypZtpv;ercP8NpIsRpTD^_oV#daFi8J*$Dyz#_kds#zq!LK6mFq&gV1 zSyu+|0y-!pPC>#Frbvo7h1yIk3cdzqs+-u@(mA&6Ia!fNd*S+d7zt8eEPRg`O!COy zY2kCWVzTGKY>%B@$zExKO7BF!)bOlu6ZO4YT7{eJ{5{fxoBWS#lDdXRZ)#~#|Bt+b zH*TN0$MuL178k^pPhN8Eyjfrc1ct9V*V*?A`5rlyXtsaR!2k#;PI$&G&R~)=1Eaz# zADRVJK->m)QRR-|9qu=4j}MIY&ss$9=lLbcp>m|G&^lY($HTb5>+m3F&_QBH-X`Za zQW!Hc)6As{PkaviGRaf#8+-f7+c0XTH8kvDg$aI(En5`Ob@_lG`L$vK&)xgveVcNCs;a3$w2?D5-^?2Gs%5|Ofg@?U<2 zZYZY`5(RI9IHY%kTxKm>_b|!9+h_U#uPCt$@mtH=J~)s!S?h$zTK(CEj&!_E^*9$uM3trnTwPKt gjJYCzf;*}E*JM;sKv4zvDQe?Aipp + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pubsub_to_atom.py b/pubsub_to_atom.py index 33f318a..79f394e 100644 --- a/pubsub_to_atom.py +++ b/pubsub_to_atom.py @@ -3,6 +3,7 @@ #import datetime from fastapi import FastAPI, Request, Response +from fastapi.responses import FileResponse from fastapi.staticfiles import StaticFiles import feedgenerator from slixmpp import ClientXMPP @@ -25,11 +26,15 @@ class XmppInstance(ClientXMPP): xmpp = None -# Mount static scripts and stylesheet directories +# Mount static graphic, script and stylesheet directories app.mount("/css", StaticFiles(directory="css"), name="css") +app.mount("/graphic", StaticFiles(directory="graphic"), name="graphic") app.mount("/script", StaticFiles(directory="script"), name="script") app.mount("/xsl", StaticFiles(directory="xsl"), name="xsl") +@app.get('/favicon.ico', include_in_schema=False) +async def favicon(): + return FileResponse('favicon.ico') @app.get('/atom') async def view_pubsub(request: Request): @@ -65,7 +70,7 @@ async def view_pubsub(request: Request): 'optional parameter Node are missing.') return Response(content=result, media_type="application/xml") -def pubsub_to_atom(iq,link): +def pubsub_to_atom(iq, link): """Convert XEP-0060: Publish-Subscribe to RFC 4287: The Atom Syndication Format.""" feed = feedgenerator.Atom1Feed( description = ('This is a syndication feed generated with PubSub to ' @@ -82,7 +87,7 @@ def pubsub_to_atom(iq,link): namespace = '{http://www.w3.org/2005/Atom}' title = item.find(namespace + 'title') title = None if title == None else title.text - feed_url = 'sch' + feed_url = 'gemini://schimon.i2p/' updated = item.find(namespace + 'updated') updated = None if updated == None else updated.text # if updated: updated = datetime.datetime.fromisoformat(updated) diff --git a/xsl/atom_as_xhtml.xsl b/xsl/atom_as_xhtml.xsl index 83897aa..c59b7b7 100644 --- a/xsl/atom_as_xhtml.xsl +++ b/xsl/atom_as_xhtml.xsl @@ -54,6 +54,7 @@ xmlns:atom='http://www.w3.org/2005/Atom'> +