summaryrefslogtreecommitdiffstats
path: root/.local/bin/joblook
blob: 904bcd5661756b792fae957b03bce7e7e1b2edc0 (plain) (blame)
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
#!/bin/bash

#Description: Looks into your JOBDIR's folders for potential jobs, presents them to you, then asks your opinion on them.

#Axioms: JOBDIR

#Dependencies: https://git.techchud.xyz/indeedwatcher https://packages.debian.org/trash-cli


numofjobs=1
potentialjob="$(find /home/"$USER"/Documents/Jobs/Potential -maxdepth 1 -type f | shuf | head -1)"
if [[ $# = 0 ]]
then
    less "$potentialjob"
    read -r -p "Are you interested? (y/n): " Choice
    if [ "$Choice" = 'y' ]
    then
        mv -v "$potentialjob" /home/$USER/Documents/Jobs/Considering/
    elif [ "$Choice" = 'n' ]
    then
        trash "$potentialjob"
    fi
fi

while [[ "$numofjobs" -le "$1" ]]
do 
    less "$potentialjob"
    read -r -p "Are you interested? (y/n): " Choice
    if [ "$Choice" = 'y' ]
    then
        mv -v "$potentialjob" /home/$USER/Documents/Jobs/Considering/
    elif [ "$Choice" = 'n' ]
    then
        trash "$potentialjob"
    fi
    potentialjob="$(find /home/"$USER"/Documents/Jobs/Potential -maxdepth 1 -type f | shuf | head -1)"
    numofjobs=$numofjobs+1
done