Automatically get FREE sheets of specific user on mymusicsheet and more.
HalyconMusic(ハルシオン Anime Piano Covers) is an exceptionally talented piano content creator. Not only does he produce high-quality videos, but he also generously shares his sheet music for free for a limited time after his videos' release. To prevent missing out on the free sheet music due to a busy personal life, I created this repo to get freesheets of but not limited to him. However, whenever I have time, I make sure to support the channel by liking, giving coins(bilibili), favoriting and leaving a comment. So even if using the flow, let's not just be passive viewers.
Use github action to periodically get user's free sheets and download them. Finally we send files via email or upload to onedrive. The sensitive data is saved in Github repo's secrets thus it's safe. Note: If you want to enable uploading to onedrive: see About Onedrive.
Then the action will be triggered when pushing to repo or reaching a certain time everyday. The latter can be set in the auto_download.yml.
wget https://github.com/Freddd13/auto-Halcyon/blob/main/localconfig.yaml?raw=true -O .localconfig.yaml
docker pull fredyu13/autoscore
docker run -d --name autoscore -v $(pwd)/.localconfig.yaml:/app/.localconfig.yaml fredyu13/autoscore
Variable | Description | Example Value |
---|---|---|
MMS_email |
Email associated with MMS website. | user@example.com |
MMS_password |
Password for the MMS. | passwordiiyokoiyo |
MMS_savefolder_path |
Path to the save folder for MMS. | files (recommended) |
enable_email_notify |
Whether to notify downloading result via email (1 enable, 0 disable) | 1 |
Email_sender |
Email address used to send emails. | sender@example.com |
Email_receivers |
Email addresses designated to receive emails. | receiver@example.com |
Email_smtp_host |
SMTP server address used to send emails. | smtp.example.com |
Email_smtp_port |
SMTP server port used to send emails. | 11451 |
Email_mail_license |
SMTP password or authorization used for sending emails. | 1145141919810 |
Email_send_logs |
Whether to send email with logs (1 enable, 0 disable) | 1 |
use_oauth2_outlook |
Whether to use outlook oauth2 email (1 enable, 0 disable) | 1 |
outlook_client_id |
outlook azure app client ID | 114514 |
outlook_client_secret |
outlook azure app client secret value | 114514 |
outlook_redirect_uri |
outlook azure app redirect URI | http://localhost:9001 |
enable_od_upload |
Whether to also upload sheets to OneDrive (1 enable, 0 disable) | 0 |
od_client_id |
OneDrive app client ID | 114514 |
od_client_secret |
OneDrive app client secret value | 114514 |
od_redirect_uri |
OneDrive app redirect URI | http://localhost:9001 |
od_upload_dir |
Directory on OneDrive to upload sheets (relative to root, do NOT start with '/') | halycon_sheets |
pip install -r requirements.txt
AUTO_HALCYON_ENV
to LOCAL
python main.py
docker build -t autoscore-f docker/Dockerfile .
docker run -d --name autoscore autoscore:latest
The schedule task can be adjusted by modifing the ./docker/crontab.To save to onedrive, you need to create an app in Azure. Note that currently only onedrive business international is tested.
Check out here for detailed instructions of getting required data.
The onedrive needs a login for the first time, after that the token will be saved to _od_refresh_token
. As I have no idea how to receive auth callback in github action, the code assumes there's already a token file with token. Thus you need to run on local first to generate the token file.
For github action:
git add _refresh_token && git commit -m "add token" && git push -f
The enable_email_notify
is used to send you downloading result including sheets and app log. If you disable the email, there's still another way to save your sheets: remove the MMS_savefolder_path
directory if it exists in the .gitignore
. The action will update the downloaded sheets to your repo. But it's not a good behavior to share others' sheets without permission, thus it's not recommended to disable email before other uploading method is supported.
If you use outlook
, remember to set use_oauth2_outlook to 1
. Besides, you also have to create an app in azure and set params like outlook_client_id to send emails for that basic auth is not supported anymore and replaced by oauth2 by microsoft. The app params is the same as that in About Onedrive
The scripts provided in this repo is intended for personal use and convenience. It is the user's responsibility to use this tool in accordance with the terms of service and policies of MMS.
The author of this repo shall not be held responsible for any misuse or improper use of this tool, including but not limited to any violations of MMS's terms of service, copyright infringement, or any other legal or ethical concerns.
Users are advised to exercise discretion and adhere to all applicable laws and regulations when using this tool. The author of this tool disclaim all liability for any consequences resulting from the use of this tool.
By using this tool, you agree to accept all responsibility and legal consequences that may arise from its use. Please use this tool responsibly and in compliance with MMS's terms and conditions.