Skip to content
forked from error-ident/gylm

Dynamic realtime profile ReadMe linked with Yandex Music / Last.fm

Notifications You must be signed in to change notification settings

naruto522ru/gylm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gylm build

Dynamic realtime profile ReadMe linked with Yandex Music / Last.fm


Contents


Prepare

Yandex

  • Open YM settings
  • Import music collections -> Link Last.fm account

Last.fm

Installation on the server

  • Clone repo
git clone https://github.com/naruto522ru/gylm.git && cd gylm && git checkout fork-main
  • Patch file (Optional)
patch < main.patch
  • For building
go build -o gylm
  • Create .env file in repo folder (Abolished if you apply the patch)
KEY=9b69****************************
SECRET=de01****************************
USERNAME=XXX
LIMIT=10
YANDEX_URL=https://music.yandex.ru/users/Invisible-XXX/artists
Variable description

KEY lastfm API key

SECRET lastfm shared secret

USERNAME lastfm username

LIMIT the number of results to fetch per page

YANDEX_URL yandex music url

  • Create file gylm.service (If the patched file) sudo systemctl edit --force gylm.service
Example service file
[Unit]
Description=Dynamic realtime profile ReadMe linked with Yandex Music / Last.fm
After=network.target

[Service]
ExecStart=/usr/local/bin/gylm
User=root
Group=root
Restart=on-failure
Environment="URL_DL_HTML=https://raw.githubusercontent.com/naruto522ru/gylm/fork-main/templates/index.html" "KEY=9b69****************************" "SECRET=de01****************************" "USERNAME=XXX" "LIMIT=10" "YANDEX_URL=https://music.yandex.ru/users/Invisible-XXX/artists"

[Install]
WantedBy=multi-user.target

Then after you have created the service file run this command:

sudo systemctl daemon-reload && sudo systemctl start gylm.service
  • Add gylm.conf to /etc/nginx/sites-available
server {
    server_name SERVER_IP;
    location / {
        proxy_pass http://localhost:1984/yandex;
        expires    0;
    }
}
  • Create symlink:
sudo ln -s /etc/nginx/sites-available/gylm.conf /etc/nginx/sites-enabled/
  • Restart Nginx:
sudo nginx -t && sudo systemctl restart nginx.service

Adding to Readme file

You can now use the following in your readme:

[![yandex](http://SERVER_IP)](https://music.yandex.ru/users/Invisible-XXX/albums)

As an example

Demo

Author Original

About

Dynamic realtime profile ReadMe linked with Yandex Music / Last.fm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 78.2%
  • Go 21.8%