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

チャンネルIDとアセットのパスを環境ファイルに移動 #13

Merged
merged 3 commits into from
Apr 9, 2020
Merged

チャンネルIDとアセットのパスを環境ファイルに移動 #13

merged 3 commits into from
Apr 9, 2020

Conversation

ryohidaka
Copy link
Contributor

@ryohidaka ryohidaka commented Apr 8, 2020

概要

他のライバーに対応させる際にメインの関数を触らないように、チャンネルID, アラーム音のパス, アイコン画像のパスなどの設定データを.envファイルに移動させましたぺこ。

他のライバー対応予定なければリジェクトして頂いて構いません。

変更箇所と内容

  • .env (new)
    チャンネルID, アセットのパスがある環境ファイルです。

  • mikochiku_alarm.py
    settings.pyをimportし、チャンネルID等をsettingsから参照するようにしています。
    こちらのフォーマッターが勝手に改行してしまい変更箇所増えてますが、濃くハイライトされて部分のみ変更点です。

  • requirements.txt
    私の環境でpip freezeしたときに自動生成されました。
    もし不具合等出ましたら、さいとう様の環境でpip freeze > requirements.txtしていただくと大丈夫かと思います。

  • settings.py (new)
    起動時にmikochiku_alarm.pyから呼ばれ、.envのデータを読み込みます。

注意点

通常.envファイルはセキュアな内容を書き込むものなので、.gitignoreで弾かれることが多いのでgitignoreに登録しないように注意してくださいぺこ。

@pusaitou
Copy link
Owner

pusaitou commented Apr 8, 2020

他のライバーさんの対応予定あります!確認させていただきます!

@pusaitou
Copy link
Owner

pusaitou commented Apr 9, 2020

requirements.txtの中にpyinstallerが入っていませんが、こちらはビルドの時のみに使うために.github内のymlファイルに移動させておきます

@pusaitou pusaitou merged commit e24653e into pusaitou:master Apr 9, 2020
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.

2 participants