GithubHelp home page GithubHelp logo

naruto522ru / gylm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from error-ident/gylm

0.0 0.0 0.0 17 KB

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

Go 21.76% HTML 78.24%
music yamusic yandex lastfm readme-md readme-profile scrobbler

gylm's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.