Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Paste
P942
jitsiroom - get a fresh URL for a Jitsi room
Active
Public
Actions
Authored by
zack
on Feb 8 2021, 10:31 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
#!/bin/bash
# SPDX-FileCopyrightText: © 2021 Stefano Zacchiroli <zack@upsilon.cc>
# SPDX-License-Identifier: GPL-3.0-or-later
# Usage:
#
# $ jitsiroom
# https://meet.jit.si/TreasureNikeIrsGarage
JITSI_URL
=
"https://meet.jit.si/"
ROOM_NAME_LEN
=
4
WORD_LIST_URL
=
"https://raw.githubusercontent.com/first20hours/google-10000-english/master/google-10000-english-no-swears.txt"
WORD_LIST
=
"
${
HOME
}
/.cache/
$(
basename
${
WORD_LIST_URL
}
)
"
if
!
[
-f
"
$WORD_LIST
"
]
;
then
echo
"I: word list not found, downloading and caching it"
mkdir -p
$(
dirname
"
$WORD_LIST
"
)
if
! wget -O
"
$WORD_LIST
"
"
$WORD_LIST_URL
"
;
then
echo
"E: failed to retrieve word list from
${
WORD_LIST_URL
}
, stopping."
exit
2
fi
fi
echo
-n
"
$JITSI_URL
"
for
word in
$(
shuf -n
"
$ROOM_NAME_LEN
"
"
$WORD_LIST
"
)
;
do
echo
-n
${
word
^
}
done
echo
Event Timeline
zack
created this paste.
Feb 8 2021, 10:31 AM
2021-02-08 10:31:29 (UTC+1)
zack
changed the title of this paste from
Command-Line Input
to
jitsiroom - get a fresh URL for a Jitsi room
.
Feb 8 2021, 10:31 AM
2021-02-08 10:31:52 (UTC+1)
zack
updated the paste's language from
autodetect
to
bash
.
Log In to Comment