Skip to content

HolgerHuo/Mravatar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mravatar - Mastodonwide Recognized Avatars

GitHub last commitGitHub release (latest by date)GitHubGitHub all releasesGitHub code size in bytes

A Mastodonwide Recognized Avatar API

This API provides you with avatar link or proxied avatar file through fediverse account name (@username@localpart).

API Usages

/avatar/<username> (GET)

https://mravatar.dragoncloud.win/avatar/@holgerhuo@dragon-fly.club
https://mravatar.dragoncloud.win/avatar/holgerhuo@dragon-fly.club

GET request https://mravatar.dragoncloud.win/avatar/@holgerhuo@dragon-fly.club or https://mravatar.dragoncloud.win/avatar/holgerhuo@dragon-fly.club

Query Strings

Example: https://mravatar.dragoncloud.win/avatar/holgerhuo@dragon-fly.club?no-cache=true&proxied=true&default=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F4%2F48%2FMastodon_Logotype_%2528Simple%2529.svg

Deployment

Dependencies

Make sure you have python3, pip3, python3-devel and virtualenv installed.

Procedures

Create a new user. Clone this repo. Setup virtualenv. Copy dist files. Start your server. Enjoy!

pip3 install virtualenv
useradd mravatar
sudo su - mravatar
git clone https://github.com/HolgerHuo/mravatar.git mravatar
cd mravatar
virtualenv mravatar
source mravatar/bin/activate
pip3 install -r requirement.txt
exit
cp /home/mravatar/mravatar/dist/mravatar.service /etc/systemd/system/mravatar.service
cp /home/mravatar/mravatar/dist/mravatar.conf /etc/nginx/conf.d/mravatar.conf
systemctl enable --now mravatar
systemctl reload nginx

License

GNU Affero General Public License v3.0

©️ Holger Huo, Mastodon

@holgerhuo@dragon-fly.club

About

Mastodonwide Recognized Avatars

Topics

Resources

License

Stars

Watchers

Forks

Packages