Skip to content

Commit 4781a0d

Browse files
committed
initial upload
1 parent 768d55f commit 4781a0d

29 files changed

+817
-0
lines changed

expect-scripts/dropbox.exp

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/usr/bin/expect -f
2+
#
3+
# This Expect script was generated by autoexpect on Sun Jul 25 20:00:46 2021
4+
# Expect and autoexpect were both written by Don Libes, NIST.
5+
#
6+
# Note that autoexpect does not guarantee a working script. It
7+
# necessarily has to guess about certain things. Two reasons a script
8+
# might fail are:
9+
#
10+
# 1) timing - A surprising number of programs (rn, ksh, zsh, telnet,
11+
# etc.) and devices discard or ignore keystrokes that arrive "too
12+
# quickly" after prompts. If you find your new script hanging up at
13+
# one spot, try adding a short sleep just before the previous send.
14+
# Setting "force_conservative" to 1 (see below) makes Expect do this
15+
# automatically - pausing briefly before sending each character. This
16+
# pacifies every program I know of. The -c flag makes the script do
17+
# this in the first place. The -C flag allows you to define a
18+
# character to toggle this mode off and on.
19+
20+
set force_conservative 0 ;# set to 1 to force conservative mode even if
21+
;# script wasn't run conservatively originally
22+
if {$force_conservative} {
23+
set send_slow {1 .1}
24+
proc send {ignore arg} {
25+
sleep .1
26+
exp_send -s -- $arg
27+
}
28+
}
29+
30+
#
31+
# 2) differing output - Some programs produce different output each time
32+
# they run. The "date" command is an obvious example. Another is
33+
# ftp, if it produces throughput statistics at the end of a file
34+
# transfer. If this causes a problem, delete these patterns or replace
35+
# them with wildcards. An alternative is to use the -p flag (for
36+
# "prompt") which makes Expect only look for the last line of output
37+
# (i.e., the prompt). The -P flag allows you to define a character to
38+
# toggle this mode off and on.
39+
#
40+
# Read the man page for more info.
41+
#
42+
# -Don
43+
44+
45+
set timeout -1
46+
spawn rclone config
47+
match_max 100000
48+
expect -exact "e/n/d/r/c/s/q> "
49+
send -- "n\r"
50+
expect -exact "name> "
51+
send -- "$env(drivename)\r"
52+
expect -exact "Storage> "
53+
send -- "dropbox\r"
54+
expect -exact "client_id> "
55+
send -- "\r"
56+
expect -exact "client_secret> "
57+
send -- "\r"
58+
59+
#Edit advanced config?
60+
expect -exact "y/n> "
61+
send -- "n\r"
62+
63+
#Use auto config?
64+
expect -exact "y/n> "
65+
send -- "y\r"
66+
67+
expect -exact "y/e/d> "
68+
send -- "y\r"
69+
expect -exact "e/n/d/r/c/s/q> "
70+
send -- "q\r"
71+
expect eof

expect-scripts/gdrive.exp

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#!/usr/bin/expect -f
2+
#
3+
# This Expect script was generated by autoexpect on Sun Jul 25 17:43:41 2021
4+
# Expect and autoexpect were both written by Don Libes, NIST.
5+
#
6+
# Note that autoexpect does not guarantee a working script. It
7+
# necessarily has to guess about certain things. Two reasons a script
8+
# might fail are:
9+
#
10+
# 1) timing - A surprising number of programs (rn, ksh, zsh, telnet,
11+
# etc.) and devices discard or ignore keystrokes that arrive "too
12+
# quickly" after prompts. If you find your new script hanging up at
13+
# one spot, try adding a short sleep just before the previous send.
14+
# Setting "force_conservative" to 1 (see below) makes Expect do this
15+
# automatically - pausing briefly before sending each character. This
16+
# pacifies every program I know of. The -c flag makes the script do
17+
# this in the first place. The -C flag allows you to define a
18+
# character to toggle this mode off and on.
19+
20+
set force_conservative 0 ;# set to 1 to force conservative mode even if
21+
;# script wasn't run conservatively originally
22+
if {$force_conservative} {
23+
set send_slow {1 .1}
24+
proc send {ignore arg} {
25+
sleep .1
26+
exp_send -s -- $arg
27+
}
28+
}
29+
30+
#
31+
# 2) differing output - Some programs produce different output each time
32+
# they run. The "date" command is an obvious example. Another is
33+
# ftp, if it produces throughput statistics at the end of a file
34+
# transfer. If this causes a problem, delete these patterns or replace
35+
# them with wildcards. An alternative is to use the -p flag (for
36+
# "prompt") which makes Expect only look for the last line of output
37+
# (i.e., the prompt). The -P flag allows you to define a character to
38+
# toggle this mode off and on.
39+
#
40+
# Read the man page for more info.
41+
#
42+
# -Don
43+
44+
45+
set timeout -1
46+
spawn rclone config
47+
match_max 100000
48+
expect "e/n/d/r/c/s/q> "
49+
send -- "n\r"
50+
expect "name> "
51+
send -- "$env(drivename)\r"
52+
expect "Storage> "
53+
send -- "drive\r"
54+
expect "client_id> "
55+
send -- "\r"
56+
expect "client_secret> "
57+
send -- "\r"
58+
expect "scope> "
59+
send -- "drive\r"
60+
expect "root_folder_id> "
61+
send -- "\r"
62+
expect "service_account_file> "
63+
send -- "\r"
64+
65+
#edit advanced config?
66+
expect "y/n> "
67+
send -- "n\r"
68+
69+
#use auto config?
70+
expect "y/n> "
71+
send -- "y\r"
72+
#Configure this as a Shared Drive (Team Drive)?
73+
expect "y/n> "
74+
send -- "n\r"
75+
76+
#Is this ok?
77+
expect "y/e/d> "
78+
send -- "y\r"
79+
80+
#Quit
81+
expect "e/n/d/r/c/s/q> "
82+
send -- "q\r"
83+
expect eof

expect-scripts/onedrive.exp

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
#!/usr/bin/expect -f
2+
#
3+
# This Expect script was generated by autoexpect on Sun Jul 25 19:55:26 2021
4+
# Expect and autoexpect were both written by Don Libes, NIST.
5+
#
6+
# Note that autoexpect does not guarantee a working script. It
7+
# necessarily has to guess about certain things. Two reasons a script
8+
# might fail are:
9+
#
10+
# 1) timing - A surprising number of programs (rn, ksh, zsh, telnet,
11+
# etc.) and devices discard or ignore keystrokes that arrive "too
12+
# quickly" after prompts. If you find your new script hanging up at
13+
# one spot, try adding a short sleep just before the previous send.
14+
# Setting "force_conservative" to 1 (see below) makes Expect do this
15+
# automatically - pausing briefly before sending each character. This
16+
# pacifies every program I know of. The -c flag makes the script do
17+
# this in the first place. The -C flag allows you to define a
18+
# character to toggle this mode off and on.
19+
20+
set force_conservative 0 ;# set to 1 to force conservative mode even if
21+
;# script wasn't run conservatively originally
22+
if {$force_conservative} {
23+
set send_slow {1 .1}
24+
proc send {ignore arg} {
25+
sleep .1
26+
exp_send -s -- $arg
27+
}
28+
}
29+
30+
#
31+
# 2) differing output - Some programs produce different output each time
32+
# they run. The "date" command is an obvious example. Another is
33+
# ftp, if it produces throughput statistics at the end of a file
34+
# transfer. If this causes a problem, delete these patterns or replace
35+
# them with wildcards. An alternative is to use the -p flag (for
36+
# "prompt") which makes Expect only look for the last line of output
37+
# (i.e., the prompt). The -P flag allows you to define a character to
38+
# toggle this mode off and on.
39+
#
40+
# Read the man page for more info.
41+
#
42+
# -Don
43+
44+
45+
set timeout -1
46+
spawn rclone config
47+
match_max 100000
48+
expect -exact "e/n/d/r/c/s/q> "
49+
send -- "n\r"
50+
expect -exact "name> "
51+
send -- "$env(drivename)\r"
52+
expect -exact "Storage> "
53+
send -- "onedrive\r"
54+
expect -exact "client_id> "
55+
send -- "\r"
56+
expect -exact "client_secret> "
57+
send -- "\r"
58+
59+
#Edit advanced config?
60+
expect -exact "y/n> "
61+
send -- "n\r"
62+
63+
#Use auto config?
64+
expect -exact "y/n> "
65+
send -- "y\r"
66+
expect -exact "Your choice> "
67+
send -- "onedrive\r"
68+
expect -exact "Chose drive to use:> "
69+
send -- "0\r"
70+
71+
#Is that okay?
72+
expect -exact "y/n> "
73+
send -- "y\r"
74+
expect -exact "y/e/d> "
75+
send -- "y\r"
76+
expect -exact "e/n/d/r/c/s/q> "
77+
send -- "q\r"
78+
expect eof

icons/back.png

6.23 KB
Loading

icons/browse.png

287 Bytes
Loading

icons/cloud.png

34.5 KB
Loading

icons/cloud.svg

+83
Loading

icons/download.png

178 Bytes
Loading

icons/dropbox-24.png

995 Bytes
Loading

icons/dropbox.png

2.96 KB
Loading

icons/eject.png

388 Bytes
Loading

icons/folder.png

309 Bytes
Loading

icons/gdrive-24.png

923 Bytes
Loading

icons/gdrive.png

2.18 KB
Loading

icons/link.png

5.99 KB
Loading

icons/move.png

201 Bytes
Loading

icons/new.png

167 Bytes
Loading

icons/none-24.png

102 Bytes
Loading

icons/onedrive-24.png

704 Bytes
Loading

icons/onedrive.png

1.74 KB
Loading

icons/other-24.png

102 Bytes
Loading

icons/remove.png

130 Bytes
Loading

icons/search.png

308 Bytes
Loading

icons/stop.png

181 Bytes
Loading

icons/trash.png

184 Bytes
Loading

icons/upload.png

175 Bytes
Loading

icons/webinterface.png

224 Bytes
Loading

0 commit comments

Comments
 (0)