チャンネルIDとアセットのパスを環境ファイルに移動 - #13
Merged
Merged
Conversation
Owner
|
他のライバーさんの対応予定あります!確認させていただきます! |
Owner
|
requirements.txtの中にpyinstallerが入っていませんが、こちらはビルドの時のみに使うために.github内のymlファイルに移動させておきます |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
他のライバーに対応させる際にメインの関数を触らないように、チャンネル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に登録しないように注意してくださいぺこ。