Coder Social home page Coder Social logo

lastfm2mastodon's Introduction

lastfm2mastodon

lastfm2mastodon is a simple tool that posts songs scrobbled to last.fm. It is configured via a file in TOML format. By default this is ~/.lastfm2mastodon but may be specified via the -config command line flag.

The configuration file looks like this:

[lastfm]
key = "last_fm_key"
secret = "last_fm_secret"
user_name = "last_fm_username"
poll_time_seconds = 60

[mastodon]
access_token = "mastodon_access_token"
client_id = "mastodon_client_id"
client_secret = "mastodon_client_secret"
url = "https://mastodon.social/"

An API key for last.fm is required. You can create one here (you only need to specify email and application name): https://www.last.fm/api/account/create

You also need an application key for your Masotodon instance. Log in and go to your preferences. Then go to the Development section and click on New Application. You need to specify an application name and make sure the scopes include write.

You can compile using:

go build github.com/jamesfcarter/lastfm2mastodon/cmd/lastfm2mastodon

Once started the application will run forever logging each song that it tooted as well as any errors.

lastfm2mastodon's People

Contributors

jamesfcarter avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

lastfm2mastodon's Issues

Error after running for a long period

Looks like we need to refresh our token, or something...

2023/02/22 02:34:37 LastfmError[500]: 500 Internal Server Error (lastfm.User.GetRecentTracks)

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.