Skip to content

christina-zhou-96/SpinYoRecords

Repository files navigation

Get a random record!

Try it out at https://spinyorecord.herokuapp.com/

Notes

This goes into Discogs, which is a pretty good music website, and just picks out a random album for you.

Not much else to say here...

Resources

Local app

  1. Make a Flask app
    https://runestone.academy/runestone/books/published/thinkcspy/WebApps/07-InputForAFlaskWebApplication.html

Deployment

  1. Overview to deploy with Heroku
    which sounds cuter and easier than Amazon or Google
    https://pythonhow.com/deploying-your-web-application-to-the-cloud/

  2. Generating a requirements file
    https://stackoverflow.com/questions/40192651/django-pip-freeze-results-in-empty-file

  3. The official Windows help
    Notice the special Windows procfile...
    https://devcenter.heroku.com/articles/getting-started-with-python#deploy-the-app

  4. Make a Procfile with Waitress
    https://books.google.com/books?id=cVlPDwAAQBAJ&pg=PT282&lpg=PT282&dq=%22waitress%22+procfile&source=bl&ots=xNJYeoYq9_&sig=ACfU3U1aUYxH6Zjxy5pi-jXDJdf4CZF_2w&hl=en&sa=X&ved=2ahUKEwioxOPcitzoAhWCl3IEHSGsAwoQ6AEwBnoECAkQKQ#v=onepage&q=%22waitress%22%20procfile&f=false
    If you're on Windows, you can't use gunicorn, which is what the tutorial wants you to use. (The tutorial does have an example Windows procfile, but that's only applicable for local use.)

Connect to Discogs

  1. Overview of steps to use Discogs API
    https://www.discogs.com/developers#page:home,header:home-quickstart

  2. Get a developer token
    https://auth.discogs.com/login?service=https%3A//www.discogs.com/login%3Freturn_to%3D%252Fsettings%252Fdevelopers%253F&nologin=1

  3. Understanding what's possible with client object, search object
    https://github.com/discogs/discogs_client

  4. More on search object
    https://www.discogs.com/developers#page:database,header:database-search

  5. More on release object
    https://www.discogs.com/developers#page:database,header:database-artist-releases

  6. More on master object
    https://www.discogs.com/developers#page:database,header:database-master-release

  7. Tip from radum on discogs forums on randomizing albums
    https://www.discogs.com/forum/thread/815327?page=1#8095702

Stupid HTML stuff
Only read if you want to reduce your brain cells.

  1. Tip from furas on stackoverflow on creating buttons
    https://stackoverflow.com/questions/61178220/html-form-python-flask-have-a-button-submit-a-unique-parameter-to-method/61179186#61179186

  2. Tip from Elisabeth Strunk on stackoverflow on render_html as part of the flask package
    https://stackoverflow.com/questions/61192187/refactor-rendering-flask-form-with-multiple-similar-inputs

  3. A more guided introduction to render_html
    https://code-maven.com/using-templates-in-flask

  4. COLORS; in html
    https://www.includehelp.com/code-snippets/change-button-color-in-html.aspx

Contributions
FRONT END HELP WANTED

No Youtube playlist?: Some of these albums don't have a readily accessibly Youtube playlist in the sidebar. Personally, I then Google the albums and find at least one song by the same artist to play. So, I think these albums are still valid, and that the current method kind of negates the one click "spin the record" experience. Possibly? link to their SoundCloud, YT, or BandCamp presence.

Other small fixes
Requirements: The requirements file is bloated because I didn't use a different virtual env.

About

Just spinning records yo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published