lit ncov report
v2.2.1
An unofficial Python封装库
, CLI工具
and拓展实现
of Luoyang Institute of Technology's "Health Status Management and Control Platform"
If you need an older version, please go to v1
Serverless (such as cloud functions) please go to scf
# Python3.6+ with pippip install litncov --upgrade
docker run -it --rm icepie/litncov
# Import module from litncov.user import litUesr# Create a new instance testme = litUesr("username", "password")# Determine whether the login is successful if testme.is_logged():# Print user information print(testme.info)# Print the last time Report information print(testme.get_last_record())# Query 2021-01-04 Reported information so far print(testme.query_record('2021-01-04'))# Query reported information from 2021-01-04 to 2021-01-18 print(testme.query_record('2021-01-04', ' 2021-01-18'))# Print student status information print(testme.get_instructor())# Print user family information print(testme.get_familys())# Print user outing information print(testme.get_trips())# Print severe epidemic areas print(testme.get_important_city() )# Determine whether it has been reported today if not testme.is_record_today():# Perform the first body temperature report of the day ## Mode: use the last reported information, Number of times: Only report the first print(testme.first_record(mode='last', rtimes=1))# Determine whether it has been reported for the second time today if not testme.is_record_today(2):# Report the second temperature of the day ## Mode: manual filling, temperature: 36.6 degrees Celsius print(testme.second_record(mode='manual', temperature=36.6))# Determine whether it has been reported for the third time today if not testme.is_record_today(rtime=3):# Perform the third body temperature report of the day## Mode: Randomly generate normal body temperature (36.0~37.2 degrees Celsius) print(testme.third_record(mode='random'))
Use the previous reporting record to make three reports today
$ litncov -u USERNAME -p PASSWORD report -a# Without the -a parameter, only the first report of today will be performed
Use random temperatures for the second report today
$ litncov -u USERNAME -p PASSWORD report -r 2 -m random
Manually enter the temperature for the third report today
$ litncov -u USERNAME -p PASSWORD report -r 3 -t 36.7
$ litncov report -h usage: litncov report [-h] [-a] [-f] [-r RTIME] [-m MODE] [-t TEMP] optional arguments: -h, --help show this help message and exit -a, --all do the all report tasks today -f, --force forcely report -r RTIME, --rtime RTIME the report time {1,2,3} -m MODE, --mode MODE the report mode {last,random,manual}, default last -t TEMP, --temp TEMP the body temperature (float), only use in manual
Main personal information
$ litncov -u USERNAME -p USERNAME info --user
out of office information
$ litncov -u USERNAME -p USERNAME info --trip
Last reported record
$ litncov -u USERNAME -p USERNAME info -l
$ litncov info -h usage: litncov info [-h] [-u] [-l] [-f] [-i] [-t] optional arguments: -h, --help show this help message and exit -u, --user the user main info -l, --last_record the user last record info -f, --family the user family info -i, --instructor the user instructor info -t, --tirp the user tirp info
Query from a certain date to the present
$ litncov -u USERNAME -p PASSWORD query -s 2020-01-01
Query from a certain date to a certain date
$ litncov -u USERNAME -p PASSWORD query -s 2020-01-01 -e 2020-01-15
usage: litncov query [-h] -s START_TIME [-e END_TIME] optional arguments: -h, --help show this help message and exit -s START_TIME, --start_time START_TIME the start time of the report history (Year-Month-Day) -e END_TIME, --end_time END_TIME the end time of the report history, default Today (Year-Month-Day)