Last active
May 26, 2022 23:40
-
-
Save luckylittle/32fbed2e36e79e60cfdc14ed12e93b8b to your computer and use it in GitHub Desktop.
Wrapper for @crackhub-dev script predb-ovh-cli
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
################ | |
## Add alias predb='/home/lmaly/Projects/predb-ovh-cli/THIS_SCRIPT.sh' | |
## Usage: predb <SEARCH QUERY> | |
## Example: predb wild territory | |
################ | |
C='' | |
source /home/lmaly/Projects/predb-ovh-cli/venv/bin/activate | |
for i in "$@"; do | |
i="${i//\\/\\\\}" | |
C="$C \"${i//\"/\\\"}\"" | |
done | |
python /home/lmaly/Projects/predb-ovh-cli/predb.py search "$C" | |
deactivate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
################ | |
## Add alias whatsnew='/home/lmaly/Projects/predb-ovh-cli/THIS_SCRIPT.sh' | |
################ | |
RED="\033[1;31m" | |
GREEN="\033[1;32m" | |
NOCOLOR="\033[0m" | |
scene_groups=( | |
B2B | |
BAE | |
BIGDOC | |
CAFFEiNE | |
CBFM | |
DARKFLiX | |
iCZi | |
KOGi | |
KOMPOST | |
NAISU | |
OPUS | |
PiGNUS | |
RUMOUR | |
SLOT | |
WaLMaRT | |
WEBTUBE | |
) | |
source /home/lmaly/Projects/predb-ovh-cli/venv/bin/activate | |
date +%c | |
for group in ${scene_groups} | |
do | |
echo -e "### ${RED}${group}${NOCOLOR} ###" | |
list_of_five=$( python /home/lmaly/Projects/predb-ovh-cli/predb.py search "@team ${group}" | head -5 ) | |
echo -e ${GREEN}${list_of_five}${NOCOLOR} | |
echo -n "\n" | |
done | |
deactivate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment