Skip to content

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.

License

Notifications You must be signed in to change notification settings

myConsciousness/mac-battery-visitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Macarer: Carer for the battery of your important MacBook

PyPI version Python Versions

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!

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Languages