Table of Contents
Make your MacBook's battery condition last longer!
Macarer
is a script created with the purpose of optimizing the battery state of MacBook.
Monitor MacBook's battery status and battery life to prevent overcharged and undercharged conditions.
If Macarer
detects an overcharge and undercharge condition, it uses the LINE Notify API
to send a notification to the LINE room associated with the specified token.
-
Theoretically make the battery condition of the MacBook last longer
-
Easy and intuitive configuration and operation
-
Receive notifications on LINE
-
Schedule monitoring using cron
Read public documentation and create the token of LINE Notify API.
Note:
The tokens you create in this step are required.
This token will be used to send notifications to Notify room on LINE.
Set the token created in the above step to environment variable.
export LINE_NOTIFY_TOKEN_FOR_MACARER=0123456789abcdefghijk
Note:
This step is not necessary if you want to pass in the token you created as an argument.
Install
pip install macarer
Clone
git clone https://github.com/myConsciousness/mac-battery-visitor.git
Default:
The default case runs in the following states.
Option | Value |
---|---|
battery_upper_limit | 0.71 |
battery_lower_limit | 0.31 |
line_notify_token | The environment value (LINE_NOTIFY_TOKEN_FOR_MACARER) |
from macarer.macarer import Macarer
Macarer().examine()
With specific options:
from macarer.macarer import Macarer
Macarer(battery_upper_limit=0.65, battery_lower_limit=0.21, line_notify_token='0123456789abcdefghijk').examine()
Default:
The default case runs in the following states.
Option | Value |
---|---|
battery_upper_limit | 0.71 |
battery_lower_limit | 0.31 |
line_notify_token | The environment value (LINE_NOTIFY_TOKEN_FOR_MACARER) |
macarer
With specific options:
macarer upper_limit=0.65, lower_limit=0.21, line_notify_token=0123456789abcdefghijk
Note:
With specific options, the above format is required.
Copyright 2020 Kato Shinya.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied. See the License for the specific language governing permissions and limitations under
the License.
Macarer
was designed and implemented by Kato Shinya, who works as a freelance developer.
Regardless of the means or content of communication, I would love to hear from you if you have any questions or concerns. I do not check my email box very often so a response may be delayed, anyway thank you for your interest!