diff options
author | garret <garret@airmail.cc> | 2024-07-05 16:28:48 +0100 |
---|---|---|
committer | garret <garret@airmail.cc> | 2024-07-05 16:28:48 +0100 |
commit | 659afc70ed08a0e6a28ea0d46d4e07078c773f5e (patch) | |
tree | eb8e3f200e9a83b502daa396e95e2e291fc1905f /readme | |
parent | 9b9a7ebde0fb4a3c7c860f55447171f7f68b5833 (diff) | |
download | agora-status-659afc70ed08a0e6a28ea0d46d4e07078c773f5e.tar.gz agora-status-659afc70ed08a0e6a28ea0d46d4e07078c773f5e.tar.bz2 agora-status-659afc70ed08a0e6a28ea0d46d4e07078c773f5e.zip |
Diffstat (limited to 'readme')
-rw-r--r-- | readme | 59 |
1 files changed, 59 insertions, 0 deletions
@@ -0,0 +1,59 @@ +i saw a post by vince https://forum.agoraroad.com/index.php?profile-posts/35310/ saying that a status.cafe-equivalent for profile posts would be nice, +and decided to have a go at making one + +it runs as a CGI script on your web server +it needs python3, bs4 (beautifulsoup) and requests, everything else is stdlib, + all packaged in debian + +you need to supply an additional environment variable, `AGORA_STATUS_DB`, which is a path to the database file used for caching + +in nginx you can do it like this: +fastcgi_param AGORA_STATUS_DB /path/to/database.sqlite; + +once it's setup it should just werkâ˘, but you might be blocked by cloudflare if you're on a data centre IP +the script can detect this but not do anything about it, you'll have to come to an arrangement with the admin + + +it just returns the html as-is from the forum site +i was going to try and do various processing on it, but then i actually looked at the output in a browser and realised, oh, it's just html, it works already +so it should be more-or-less fine + +you can put the status on your page with js, see the status.cafe one https://status.cafe/current-status.js?name=name for "inspiration"/a rough idea +though it returns json, i just return html, so most of it is irrelevant +you'll probably want to handle non-200 responses as well, i return error messages for those which you might not want on your page + +alternatively you might be able to use an iframe(?, not tested on a different domain) + +by default it caches statuses for 30 minutes, but the forum does its own caching also +make sure you can see the changes on your page in incognito mode (not signed in) + +loicence + +copyright (c) 427738.xyz 2024 + +do whatever you want really +if you make any useful changes i'd appreciate it if you could send them back to me, then i could include them in mine +but that's not a requirement if you don't want to + +as-is, no warranty, not my problem very much if you get robbed/stabbed/defamed/etc +though i will probably try to help within reason if it's not working + +i suppose a proper legal version of all that would be: + +BSD Zero Clause License + +Copyright (c) 2024 427738.xyz + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + +that's probably all +-g |