A program for checking electricity charge.
Free yourself from the tedious operation, now you can just use a one-line command to view the electricity information of your dormitory.
The data comes from the BUPT Work WeChat. But please notice that this utility tool can only query the dormitory which is located on Xitucheng Campus. The other campuses are not supported at the moment.
- Get your power data easily, including surplus, voltage, current, power, etc.
- Calculate available time.
- Python 3
Step 1: Install from PyPI
pip install buptelecmon
Step 3: Run it
The dormitory-number must be in the correct format (ApartmentNumber-DormitoryNumber, e.g 1-101).
Also, this command tool will remember the dormitory number of the last query. Next time, if you want to query the same dormitory as last query, just type:
Use this tool to visit the recharge page directly.
elecinfo --recharge <dormitory-number>
Then, a QR code will be shown on your terminal. Please use your WeChat to scan the QR code and pay for it.
Full Command Line
elecinfo [ --version | --set-auth | [--loop] <dormitory-number-1> [... <dormitory-number-n>] | --recharge <dormitory-number>]
|–version||Display the version of this tool.|
|–set-auth||Set your authorization information, as the Quick Start - Step 2 shows.|
|–loop||Repeat querying electricity information every 60 seconds.|
|–recharge||Display a recharge QR code.|
Note: Please DO NOT query too many dormitories at the same time or query too frequently, otherwise you may receive HTTP 500 Internal Server Error s from the remote server.
We allow you to use the APIs to build your applications, for example:
import buptelecmon em = buptelecmon.electricitymonitor.ElectricityMonitor() em.login('student_id', 'password') em.query(['x-xxx'])
For more information, please read the APIs Document.
Mon, 13 Aug 2018: 1.2.2 released. Fix a bug that prevent the program from quitting when an exception raises. :bookmark:
Mon, 13 Aug 2018: 1.2.1 released. Fix documentation error. :bookmark:
Sun, 12 Aug 2018: 1.2.0 released :bookmark:
- Added recharge mode
Sat, 11 Aug 2018: 1.1.0 released :bookmark:
- Removed daemon mode
- Added configuration mode - We don’t need to write json file manually anymore
- Published to PyPI
Fri, 30 Mar 2018: First version. :tada:
This software is distributed under the MIT License.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size buptelecmon-1.2.3.tar.gz (8.3 kB)||File type Source||Python version None||Upload date||Hashes View|