Compare commits

...

2 Commits

Author SHA1 Message Date
gravel c18ef308d8
feat: add landedin.space as source 1 year ago
gravel 3a7b739e5a
docs: update CONTRIBUTING.md 1 year ago

@ -21,13 +21,13 @@
### Structure
[`fetch-servers.php`](php/fetch-servers.php) queries available servers, and [`generate-html.php`](php/generate-html.php>) generates static HTML. Static HTML is generated from the [`sites`](sites) directory to the [`output`](output) directory, which additionally contains static assets. All contents of `sites` are invoked to produce a HTML page unless they are prefixed with a `+` sign.
[`fetch-servers.php`](php/fetch-servers.php) queries available servers, and [`generate-html.php`](php/generate-html.php) generates static HTML. Static HTML is generated from the [`sites`](sites) directory to the [`output`](output) directory, which additionally contains static assets. All contents of `sites` are invoked to produce a HTML page unless they are prefixed with a `+` sign.
### Development
Run at least once: `make fetch` to query servers. This takes around 15 seconds thanks to the coroutine implementation.
Run at least once: `make fetch` to query servers. This takes around 30 seconds thanks to the coroutine implementation. Alternatively, run `make fetch-steal` to copy the fetching results from SessionCommunities.online.
Run when developing: `make dev` to watch for changes & serve HTML locally in browser.
Run when developing: `make dev` to watch for changes & serve HTML locally in browser, or `make lan-dev` to also expose the website to LAN and view the site on a mobile device.
See [`Makefile`](Makefile) for more details.
@ -62,7 +62,7 @@ This ensures that references to components are not broken when the page changes
### PHP
**Identifier casing**: `snake_case` and `CONSTANT_CASE`
**Identifier casing**: `snake_case` or `camelCase`, `PascalCase` for classes, and `CONSTANT_CASE` for constant members
**Comments and documentation**: [Doxygen](https://en.wikipedia.org/wiki/Doxygen)

@ -27,8 +27,9 @@ Communities displayed come from a variety of sources:
- <https://lokilocker.com/Mods/Session-Groups/wiki/Session-Open-Groups>,
- <https://github.com/GNU-Linux-libre/Awesome-Session-Group-List>,
- <https://freearkham.cc/>,
- <https://simplifiedprivacy.com/techgroups>
- [a few hardcoded servers found on the internet](php/servers/known-servers.php).
- <https://simplifiedprivacy.com/techgroups>,
- <https://junk.landedin.space/communities.html>,
- a few servers found on the internet.
Have a list we don't know about? [Shoot us a message](#contact-us).

@ -249,6 +249,7 @@
'SDIR-JSON' => 'https://session.directory/scrape.php',
'FARK' => 'https://freearkham.cc/',
'SIMP' => 'https://simplifiedprivacy.com/techgroups',
'LISP' => 'https://junk.landedin.space/communities.html',
);
private readonly string $contents_asgl;
@ -256,6 +257,7 @@
private readonly string $contents_sdir;
private readonly string $contents_fark;
private readonly string $contents_simp;
private readonly string $contents_lisp;
private readonly string $contents_aggregated;
/**
@ -283,6 +285,9 @@
log_info("Requesting SimplifiedPrivacy.com list...");
$this->contents_simp = CommunitySources::fetch_source('SIMP');
log_info("Requesting landedin.space list...");
$this->contents_lisp = CommunitySources::fetch_source('LISP');
log_info("Parsing extra information...");
if (!$this->process_sources()) {
log_error("Could not parse extra information from one or more sources.");
@ -295,6 +300,7 @@
$this->contents_fark .
$this->contents_loki .
$this->contents_simp .
$this->contents_lisp .
// Slashes are escaped when served, unescape them
str_replace("\\/", "/", $this->contents_sdir);
}

Loading…
Cancel
Save