The script created to optimize the battery charging state of the MacBook.
Project description
Macarer: Carer for the battery of your important MacBook
Table of Contents
What is it?
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.
Benefits
-
Theoretically make the battery condition of the MacBook last longer
-
Easy and intuitive configuration and operation
-
Receive notifications on LINE
-
Schedule monitoring using cron
How To Use
1: Create the TOKEN of LINE Notify API
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.
2: Set Environment Variable (optional)
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.
3: Install or Clone Macarer
Install
pip install macarer
Clone
git clone https://github.com/myConsciousness/mac-battery-visitor.git
4: Import and Run Macarer
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()
5: Run with the CLI
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.
License
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.
More Information
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!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file macarer-1.0.2.tar.gz.
File metadata
- Download URL: macarer-1.0.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c427e511ce884fc4bd9ffdaf6090a78a0cd5db4a5d6d22f3a24c236ae04b29f
|
|
| MD5 |
0491eea8f44014116a277730d689f481
|
|
| BLAKE2b-256 |
0d773fca4aca87cb2a2182aa9940a26b39bb4c0e0f1aacee2e8224de9847ac91
|