Skip to content

Sign into this GitHub wiki

David-Apps edited this page Sep 22, 2024 · 9 revisions

You can edit this function so that it can sign you into this GitHub wiki. If the GitHub system sends you a device verification code, this function checks your IMAP mail account, reads the verification code, and enters the verification code in the form.

# Sign into the edbrowse wiki on GitHub.
# usage: <ghwiki
function+ghwiki {
db0
H-
sw+
js-
b https://github.com/CMB/edbrowse/wiki
/{Sign in}/g
if(*) {
# Replace [email protected] with the email address that you use for GitHub.
/Username/ [email protected]
# Replace my_password with your GitHub password.
# or, to enter your password each time, replace i=my_password with ipass
/Password/ i=my_password
i2*
/^Device Verification Code <>/X
if(*) {
etmp
# Check the first mail account in the configuration file.
imap 1
l=1
/INBOX/X
/s [GitHub] Please verify your device
while(?) {
sleep 5
/s [GitHub] Please verify your device
}
g
/^Verification code: /X
etmp
r+1@.
s/^Verification code: //
up4
i1<-4@.
down2
d
if(*) {
}
up2
i*
}
}
/^h1 /X
/^h1 Home/X
/^h1 /
}