Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding last.fm integration #65

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jetzlstorfer
Copy link
Contributor

Closes #64

Adds support for Last.FM

You'll need to provide

  • LastFM user
  • LastFM Api Key + Secret

You'll be able to use it via

## Favourite albums of all time 🎶

{{range lastFmFavouriteAlbums 5}}
- {{.Artist.Name}} - {{.Name}}
{{- end}}


## Favourite artists of all time 👨‍🎤

{{range lastFmFavouriteArtists 5}}
- {{.Name}} ({{.PlayCount}})
{{- end}}

Example output:

### Hi there 👋

## Favourite albums of all time 🎶


- ORF Radio Ö1 - oe1.ORF.at - Ö1 Digital Leben
- Digitalism - Idealism
- The Postal Service - Give Up
- Death Cab for Cutie - Plans
- dredg - El Cielo


## Favourite artists of all time 👨‍🎤


- dredg (1872)
- ...And You Will Know Us by the Trail of Dead (1748)
- Death Cab for Cutie (1742)
- The Decemberists (1728)
- Jimmy Eat World (1666)

@muesli
Copy link
Owner

muesli commented Feb 9, 2023

Sounds like a great addition! I think we should stick to the official spelling of the name last.fm however and use the method prefix lastfm.

@jetzlstorfer
Copy link
Contributor Author

Thanks for your comment! I've now updated the notation to lastfm prefix and included it also in the README.md

@jetzlstorfer jetzlstorfer changed the title adding lastfm integration adding last.fm integration Feb 10, 2023
@muesli muesli force-pushed the feature/last-fm-integration branch from fb6d1b7 to 09753f3 Compare March 1, 2023 05:40
@jetzlstorfer
Copy link
Contributor Author

Thanks @muesli for the clean up!

Just gave it another test run at it works fine:

@jetzlstorfer ➜ /workspaces/markscribe (feature/last-fm-integration) $ ./markscribe templates/lastfm.tpl
### Hi there 👋

## Favourite albums of all time 🎶


- ORF Radio Ö1 - oe1.ORF.at - Ö1 Digital Leben
- Digitalism - Idealism
- The Postal Service - Give Up
- Death Cab for Cutie - Plans
- dredg - El Cielo


## Favourite artists of all time 👨‍🎤


- dredg (1872)
- ...And You Will Know Us by the Trail of Dead (1748)
- Death Cab for Cutie (1746)
- The Decemberists (1728)
- Jimmy Eat World (1666)


## Favourite tracks of all time 💿


- The Decemberists - The Crane Wife 3 (140)
- Beirut - Postcards From Italy (133)
- I Am Kloot - Proof (129)
- The Cinematic Orchestra - To Build a Home (129)
- The Decemberists - Here I Dreamt I Was an Architect (128)


## Most recent tracks 🎺


- Lou Asril - Friek
- Biig Piig - Ghosting
- The Teskey Brothers - Forever You And Me
- Florence Arman - Stupid Heart
- Samantha Crain - Pastime
- Arlo Parks - Caroline
- Sharktank - Shame
- Grace Ives - Lullaby

@jetzlstorfer
Copy link
Contributor Author

Can we have this merged @muesli ?

@jetzlstorfer
Copy link
Contributor Author

Any update on when we can have this merged @muesli ? :)

@jetzlstorfer
Copy link
Contributor Author

Any update on this @muesli ?

@jetzlstorfer
Copy link
Contributor Author

Any chance that we can get this merged @muesli ? Thank you!

@muesli
Copy link
Owner

muesli commented Jul 18, 2023

Sorry for testing your patience here. Yes, I'll merge this, but be aware that I'll most likely move the function namespace a bit around to cleanup and make space for future additions before the next release.

@jetzlstorfer
Copy link
Contributor Author

Hi @muesli , any ETA for this PR? :)

@ivuorinen
Copy link

This would be a great addition to the already great project. Subscribed to see when this is finally merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] Last.fm integration
3 participants