mirror of
https://github.com/Ircama/epson_print_conf.git
synced 2024-10-18 01:00:36 -04:00
Review --write-poweroff-timer option
This commit is contained in:
parent
4e0f7ca3b7
commit
1889241ce1
2 changed files with 16 additions and 16 deletions
23
README.md
23
README.md
|
@ -37,12 +37,10 @@ It is tested with Ubuntu / Windows Subsystem for Linux, Windows.
|
|||
## Usage
|
||||
|
||||
```
|
||||
usage: epson_print_conf.py [-h] -m MODEL -a HOSTNAME [-p PORT] [-i] [-q QUERY_NAME]
|
||||
[--reset_waste_ink] [-d]
|
||||
[--write-first-ti-received-time YEAR MONTH DAY]
|
||||
[--write-poweroff-timer MINUTES] [--dry-run] [-R ADDRESS_SET]
|
||||
[-W ADDRESS_VALUE_SET] [-e FIRST_ADDRESS LAST_ADDRESS] [--detect-key]
|
||||
[-S SEQUENCE_STRING] [-t TIMEOUT] [-r RETRIES] [-c CONFIG_FILE]
|
||||
usage: epson_print_conf.py [-h] -m MODEL -a HOSTNAME [-p PORT] [-i] [-q QUERY_NAME] [--reset_waste_ink] [-d]
|
||||
[--write-first-ti-received-time YEAR MONTH DAY] [--write-poweroff-timer MINUTES]
|
||||
[--dry-run] [-R ADDRESS_SET] [-W ADDRESS_VALUE_SET] [-e FIRST_ADDRESS LAST_ADDRESS]
|
||||
[--detect-key] [-S SEQUENCE_STRING] [-t TIMEOUT] [-r RETRIES] [-c CONFIG_FILE]
|
||||
[--simdata SIMDATA_FILE]
|
||||
|
||||
optional arguments:
|
||||
|
@ -60,14 +58,13 @@ optional arguments:
|
|||
--write-first-ti-received-time YEAR MONTH DAY
|
||||
Change the first TI received time
|
||||
--write-poweroff-timer MINUTES
|
||||
Write poweroff tiler
|
||||
Update the poweroff timer. Use 0xffff or 65535 to disable it.
|
||||
--dry-run Dry-run change operations
|
||||
-R ADDRESS_SET, --read-eeprom ADDRESS_SET
|
||||
Read the values of a list of printer EEPROM addreses. Format is: address
|
||||
[, ...]
|
||||
Read the values of a list of printer EEPROM addreses. Format is: address [, ...]
|
||||
-W ADDRESS_VALUE_SET, --write-eeprom ADDRESS_VALUE_SET
|
||||
Write related values to a list of printer EEPROM addresses. Format is:
|
||||
address: value [, ...]
|
||||
Write related values to a list of printer EEPROM addresses. Format is: address: value
|
||||
[, ...]
|
||||
-e FIRST_ADDRESS LAST_ADDRESS, --eeprom-dump FIRST_ADDRESS LAST_ADDRESS
|
||||
Dump EEPROM
|
||||
--detect-key Detect the read_key via brute force
|
||||
|
@ -78,8 +75,8 @@ optional arguments:
|
|||
-r RETRIES, --retries RETRIES
|
||||
SNMP GET retries (floating point argument)
|
||||
-c CONFIG_FILE, --config CONFIG_FILE
|
||||
read a configuration file including the full log dump of a previous
|
||||
operation with '-d' flag (instead of accessing the printer via SNMP)
|
||||
read a configuration file including the full log dump of a previous operation with
|
||||
'-d' flag (instead of accessing the printer via SNMP)
|
||||
--simdata SIMDATA_FILE
|
||||
write SNMP dictionary map to simdata file
|
||||
|
||||
|
|
|
@ -1699,6 +1699,9 @@ if __name__ == "__main__":
|
|||
import argparse
|
||||
from pprint import pprint
|
||||
|
||||
def auto_int(x):
|
||||
return int(x, 0)
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
epilog='Epson Printer Configuration via SNMP (TCP/IP)')
|
||||
|
||||
|
@ -1721,7 +1724,7 @@ if __name__ == "__main__":
|
|||
'-p',
|
||||
'--port',
|
||||
dest='port',
|
||||
type=int,
|
||||
type=auto_int,
|
||||
default=161,
|
||||
action="store",
|
||||
help='Printer port (default is 161)')
|
||||
|
@ -1763,8 +1766,8 @@ if __name__ == "__main__":
|
|||
parser.add_argument(
|
||||
'--write-poweroff-timer',
|
||||
dest='poweroff',
|
||||
type=int,
|
||||
help='Write poweroff tiler',
|
||||
type=auto_int,
|
||||
help='Update the poweroff timer. Use 0xffff or 65535 to disable it.',
|
||||
nargs=1,
|
||||
metavar=('MINUTES'),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue