-
Notifications
You must be signed in to change notification settings - Fork 1
/
atat.bat
64 lines (53 loc) · 1.87 KB
/
atat.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@echo off
title Automated Toner Audit Report
set WHID=Location
set CommunityString=Secret
set printers=color-2, mfp-1, mfp-2, mfp-3, mfp-4, plotter-1, mfp-5, mfp-9
set hostname=Hostname
echo Automated Toner Audit Report
for /f "delims=: tokens=*" %%A in ('findstr /b ::: "%~f0"') do @echo(%%A
set /P login=Login:
echo.
echo Connecting to Server
:confirm_values
echo Using the following values:
echo Warehouse ID: "%WHID%"
echo Community String: "%CommunityString%"
echo Printers: "%printers%"
echo.
:choice
set verify=Y
set /P verify=Is this correct [Y/n]:
if /I "%verify%" EQU "Y" goto :move_along
if /I "%verify%" EQU "N" goto :need_input
goto :choice
:need_input
set /P WHID=Enter Warehouse ID:
set /P CommunityString=Enter Community String:
set /P Printers=List all printers seperated by commas:
echo.
goto :confirm_values
:move_along
plink %hostname% -l %login% "echo Loading Data. This may take a minute && echo; /usr/share/atat.py %WHID% %CommunityString% ""%printers%"""
pause
::: ____________
::: _,.-Y | | Y-._
::: .-~" | | | | "-.
::: I == | ! ! | [] | _____
::: L__ [] |..----------| _[----I" .-{"-.
::: I___| | __________| [__L]_[I_/r(=}=-P
::: [L________[____________]______j~ '-=c_]/=-^
::: \_I_j \==I | I==_/ L_]
::: [_((==)[`---------"](==)j
::: I--I"~~~"""""~~~"I--I
::: | | | |
::: l__j l__j
::: | | | |
::: | | | |
::: ([]) ([])
::: ] [ ] [
::: [ ] [ ]
::: /| |\ /| |\
::: | } { | | } { |
::: .-^--r-^-. .-^--r-^-.
::: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~