aboutsummaryrefslogtreecommitdiffstats
path: root/readme
blob: 16f0cd779c2dfa7da26f582085a587034d16d7c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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