fediverse/README.md

51 líneas
7,6 KiB
Markdown
Original Vista normal Històric

2020-05-17 12:28:47 +02:00
# Fediverse Stats
This code gets all peers from running Mastodon or Pleroma host server and then all peers from host server's peers. Goal is to collect maximum number
of alive fediverse's servers and then query their API to obtain their registered users (if their API provide such information).
At the end it post the results to host server bot account.
### Dependencies
- **Python 3**
- Postgresql server
- Mastodon or Pleroma running server.
### Usage:
Within Python Virtual Environment:
1. Run `python db-setup.py` to setup and create new Postgresql database and needed tables in it.
2. Run `python setup.py` to get your bot's access token of your Mastodon or Pleroma server existing account. It will be saved to 'secrets/secrets.txt' for further use.
3. Run `python getworld.py` to get all peers from your host and the whole world of fediverse's servers (or almost the whole world).
2020-05-17 12:32:11 +02:00
4. Run `python fediverse.py` to query world alive servers API. It gets data from server's API according this table:
2020-05-17 14:07:17 +02:00
| Software | API peers | API users (nodeinfo/2.0.json) | API users (nodeinfo/2.0) | API users (api/v1/instance) | API users (main/nodeinfo/2.0) | API users (api/statusnet/config) | API users (api/nodeinfo/2.0.json) | API users (api/nodeinfo) | Software |
|:--------------:|:---------------------:|:------------------------------------------:|:--------------------------------------:|:---------------------------:|:-----------------------------:|:--------------------------------:|:---------------------------------:|:---------------------------:|:--------------:|
| Diaspora | | ['usage']['users']['total'] | | | | | | | Diaspora |
| Friendica | api/v1/instance/peers | | ['usage']['users']['total'] | | | | | | Friendica |
| Ganggo | | | ['usage']['users']['total'] | | | | | | Ganggo |
| GNU Social | | | | | ['usage']['users']['total'] | | | | GNU Social |
| GNU Social 2.x | | | | | | | ['usage']['users']['total'] | | GNU Social 2.x |
| Groundpolis | | | ['usage']['users']['total'] | | | | | | Groundpolis |
| Hubzilla | | | ['usage']['users']['total'] | | | | | | Hubzilla |
| Mastodon | api/v1/instance/peers | ['usage']['users']['total'] (since v3.0.0) | | ['stats']['user_count'] | | | | | Mastodon |
| Misskey | | | **NO** (['usage']['users'] returns {}) | | | | | | Misskey |
| Osada | | | ['usage']['users']['total'] | | | | | | Osada |
| Peertube | | ['usage']['users']['total'] | | | | | | | Peertube |
| Pixelfed | | | | | | | ['usage']['users']['total'] | | Pixelfed |
| Pleroma | api/v1/instance/peers | ['usage']['users']['total'] | | | | | | | Pleroma |
| Plume | | | ['usage']['users']['total'] | | | | | | Plume |
| Prismo | | | ['usage']['users']['total'] | | | | | | Prismo |
| Ravenvale | | ['usage']['users']['total'] | | | | | | | Ravenvale |
| Squus | | | ['usage']['users']['total'] | | | | | | Squus |
| Writefreely | | | | | | | | ['usage']['users']['total'] | Writefreely |
| Zap | | | ['usage']['users']['total'] | | | | | | Zap |
2020-05-17 13:39:24 +02:00
5. Use your favourite scheduling method to set `python fediverse.py` after `python getworld.py` to run regularly.
2020-05-17 12:28:47 +02:00
Note: install all needed packages with 'pip install package' or use 'pip install -r requirements.txt' to install them.