diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..76fb4be --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,29 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior. + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Basic Info (please complete the following information):** + - OS: + - amazify version: + +**Additional context** +Add any other context about the problem here. + +cc @very-doge-wow diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..1454989 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,24 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always +frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features +you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. + +cc @very-doge-wow diff --git a/.github/ISSUE_TEMPLATE/maintenance.md b/.github/ISSUE_TEMPLATE/maintenance.md new file mode 100644 index 0000000..1c723b3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/maintenance.md @@ -0,0 +1,16 @@ +--- +name: Maintenance request +about: Request maintenance action +title: '' +labels: enhancement +assignees: '' + +--- + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Additional context** +Add any other context or screenshots about the feature request here. + +cc @very-doge-wow diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..baa3c03 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,9 @@ +### Description: + +Explain the purpose of the PR. + +### Checklist: + +* [ ] Does your PR pass tests? +* [ ] Have you written new tests for your changes? +* [ ] Have you linted your code locally prior to submission? diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..91abb11 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "pip" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" diff --git a/.github/workflows/lintmarkdown.yml b/.github/workflows/lintmarkdown.yml new file mode 100644 index 0000000..2d7b521 --- /dev/null +++ b/.github/workflows/lintmarkdown.yml @@ -0,0 +1,15 @@ +name: Markdownlint +on: [push] +jobs: + lint-markdown: + name: lint_markdown + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: lint_markdown + uses: docker://avtodev/markdown-lint:v1 + with: + args: './*.md' + ignore: './test/output.md ./test/custom-template-keywords.md ./EXAMPLE_OUTPUT.md' diff --git a/.gitignore b/.gitignore index 868bb0f..09bcf24 100644 --- a/.gitignore +++ b/.gitignore @@ -133,3 +133,5 @@ dmypy.json __pycache__ .idea lol.json +.DS_Store +.DS_Store diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8f894f2..3fffb0e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -69,4 +69,4 @@ Commits should follow the pattern as specified ## References This document was adapted from the open-source contribution guidelines for -[Facebook's Draft](https://github.com/facebook/draft-js/blob/main/CONTRIBUTING.md). \ No newline at end of file +[Facebook's Draft](https://github.com/facebook/draft-js/blob/main/CONTRIBUTING.md). diff --git a/README.md b/README.md index 85c8f29..22e0d6f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # đŸŽĩ amazify -![logo](logo.png) +![logo](https://github.com/very-doge-wow/amazify/blob/main/logo.png?raw=true) + +[![Lint Markdown](https://github.com/very-doge-wow/amazify/actions/workflows/lintmarkdown.yml/badge.svg)](https://github.com/very-doge-wow/amazify/actions/workflows/lintmarkdown.yml) Migrate your playlists from Amazon Music to Spotify using a simple Flask web interface. @@ -11,7 +13,7 @@ Migrate your playlists from Amazon Music to Spotify using a simple Flask web int Navigate to [developer.spotify.com](https://developer.spotify.com/dashboard) and create a new app. Use this as the callback URL: -``` +```shell http://127.0.0.1:5000/callback ``` @@ -19,18 +21,19 @@ Retrieve your client id and client secret for later use. ### 🔑 Amazon Authentication (Workaround) -Currently, the Amazon Music API won't let us create applications for OAuth ourselves without -them needing to be approved by Amazon. Since we only want to perform a one-time -migration, we can obtain an OAuth token via Amazon's own API reference, hence eliminating -the need for us to be able to create our own application. +Currently, the Amazon Music API won't let us create applications for OAuth +ourselves without them needing to be approved by Amazon. Since we only want +to perform a one-time migration, we can obtain an OAuth token via Amazon's +own interactive API reference, hence eliminating the need for us to be able +to create our own application. Navigate to [dashboard.music.amazon.dev](https://dashboard.music.amazon.dev/console/api/get-playlist/) and press the button `Get Token` in order to retrieve a valid token. Login using your Amazon Music profile's credentials when prompted. -Copy the resulting token and set it as environment variable as described in the next step. -Make sure to also copy the `x-api-key` value as provided in the example `curl` -command given on Amazon's website as well. +Copy the resulting token and set it as environment variable as described in +the next step. Make sure to also copy the `x-api-key` value as provided in +the example `curl` command given on Amazon's interactive API reference as well. ### ℹī¸ Required Environment Variables @@ -67,15 +70,19 @@ You can then open the webinterface under the URL `https://127.0.0.1:5000`. Press the button for authenticating at Spotify before running any migration. Errors will be printed in the Flask app's log, if any occurred. + | | Tip | |----|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 💡 | Try to verify the status code of the reponses from the Amazon/Spotify API using the log before opening an issue. Refreshing the credentials will most likely resolve the issue. | + ## 🚧 Caveats The following limitations exist: + 1. Do **not** run multiple migrations simultaneously. This will probably result in rate-limits being exceeded and the progress bar breaking. 2. The Amazon token will expire after about `30min`. Keep that in mind when running migrations. 3. The app does **not** check if a playlist with the same name already exists. A new playlist is created each time you start a migration. 4. If a song from the Amazon Playlist is not present in Spotify, the Spotify Search API might return false songs, which will then be added to the playlist. Make sure to check the result after the migration has finished. +