Lasa is a stateless proxy that generates a RSS or an Atom feed from a Standard.site publication. lasa.anhgelus.world
rss atom atprotocol standard-site atproto
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(cli): home page

+111
+104
cmd/lasad/index.html
··· 1 + <!DOCTYPE html> 2 + <html lang="en"> 3 + <head> 4 + <meta charset="UTF-8"> 5 + <meta name="viewport" content="width=device-width, initial-scale=1.0"> 6 + <title>Lasa</title> 7 + <style> 8 + :root { 9 + font-size: 18px; 10 + } 11 + body { 12 + margin: 0; 13 + padding-bottom: 4rem; 14 + font-family: system-ui, Inter, sans-serif; 15 + line-height: 1.6em; 16 + display: flex; 17 + flex-direction: column; 18 + gap: 1rem; 19 + } 20 + body > * { 21 + display: block; 22 + width: 100%; 23 + max-width: 850px; 24 + margin: 0 auto; 25 + } 26 + h1, h2, h3 { 27 + line-height: 1.6em; 28 + margin-top: 2rem; 29 + } 30 + h1 { 31 + text-align: center; 32 + } 33 + code { 34 + font-family: monospace; 35 + font-size: 0.9em; 36 + letter-spacing: -0.2px; 37 + } 38 + a { 39 + color: #023e8a; 40 + padding: 0.1em; 41 + } 42 + a:hover { 43 + background: #023e8a; 44 + color: white; 45 + } 46 + 47 + @media only screen and (prefers-color-scheme: dark) { 48 + :root { 49 + color: #f0ebd8; 50 + background-color: #0d1321; 51 + } 52 + a { 53 + color: #90e0ef; 54 + } 55 + a:hover { 56 + background: #90e0ef; 57 + color: black; 58 + } 59 + } 60 + </style> 61 + </head> 62 + <body> 63 + <h1>Lasa</h1> 64 + <p> 65 + Lasa is a stateless proxy that generates a RSS or an Atom feed from a 66 + <a href="https://standard.site" target="_blank">Standard.site</a> publication. 67 + It automatically fetches the publication and its linked documents from the PDS and returns a feed. 68 + </p> 69 + <h2>How to use it?</h2> 70 + <p> 71 + You can list the publications of <code>example.org</code> by going to <code>/example.org</code>. 72 + Each publication has a unique <em>record key</em>. 73 + This key is used to generate its RSS or its Atom feed. 74 + </p> 75 + <p> 76 + If <code>example.org</code> has a publication with <code>fooBar</code> as record key, its RSS feed is: 77 + <code>/example.org/fooBar/rss</code>, and its Atom feed is: <code>/example.org/fooBar/atom</code>. 78 + </p> 79 + <p> 80 + Some publications cannot have a RSS or an Atom feed, because they don't have given enough information to 81 + generate one. 82 + If the RSS feed doesn't work, try the Atom one. 83 + </p> 84 + <h4>Examples:</h4> 85 + <ul> 86 + <li><a href="/pckt.blog/3lwafzkjqm25s/rss">pckt - Dev Journal</a></li> 87 + <li><a href="/dholms.at/3m6zrpzbs3s2y/atom">Daniel&#39;s Leaflets</a></li> 88 + </ul> 89 + <h2>How does it works?</h2> 90 + <p> 91 + When you request a feed, Lasa parses the handle (or the did) of the user and the record key. 92 + Then, it looks in the cache if it already has generated this feed in the past hour. 93 + If it did, it returns this. 94 + If it didn't, it fetches the publication and the documents to generate the feed. 95 + </p> 96 + <p> 97 + Lasa is open-source: check out the <a href="https://tangled.org/anhgelus.world/lasa" target="_blank">source 98 + code</a> hosted on Tangled, an ATProto forge. 99 + </p> 100 + <p> 101 + Lasa is a project by <a href="https://anhgelus.world/" target="_blank">Anhgelus Morhtuuzh</a>. 102 + </p> 103 + </body> 104 + </html>
+7
cmd/lasad/run.go
··· 2 2 3 3 import ( 4 4 "context" 5 + _ "embed" 5 6 "errors" 6 7 "fmt" 7 8 "log/slog" ··· 20 21 "tangled.org/anhgelus.world/xrpc" 21 22 "tangled.org/anhgelus.world/xrpc/atproto" 22 23 ) 24 + 25 + //go:embed index.html 26 + var index []byte 23 27 24 28 func handleRunHelp() { 25 29 internal.Usage( ··· 87 91 } 88 92 }) 89 93 mux.HandleFunc("GET /{id}/{$}", func(w http.ResponseWriter, r *http.Request) { 94 + }) 95 + mux.HandleFunc("GET /{$}", func(w http.ResponseWriter, r *http.Request) { 96 + w.Write(index) 90 97 }) 91 98 92 99 ch := make(chan error, 1)