adding vara alias options

This commit is contained in:
tb14
2025-01-26 20:07:37 -06:00
parent 1075a9571f
commit ac5d63d5e2
+36 -6
View File
@@ -252,18 +252,48 @@ findalias_menu
function findalias_menu() { function findalias_menu() {
LISTLOC="$HOME/Documents/ardop-list" LISTLOC="$HOME/Documents"
if [[ -f $LISTLOC/ardoplist.txt ]]; then
FINDALIAS=$(yad --center --wrap --show-uri \
--title="Select Modem" \
--text="Please choose the modem type you would like to search aliases." \
--image=$DIR/images/corps-icon.png \
--button="VARA:3" \
--button="ARDOP:2" \
--button="Exit:1" \
${c} ${r})
rc=$?
if [[ $rc -eq 2 ]]; then
if [[ -f $LISTLOC/ardop-list/ardoplist.txt ]]; then
LASTUPDATE=$(cat $HOME/Documents/ardop-list/ardoplist.txt | head -n 1) LASTUPDATE=$(cat $HOME/Documents/ardop-list/ardoplist.txt | head -n 1)
else else
getardoplist | yad --center --progress --pulsate --auto-close --auto-kill --button gtk-cancel:1 --title "Downloading ARDOP Station lists" --text "Please wait while I download the current list of ARDOP stations..." ${r} ${c} getardoplist | yad --center --progress --pulsate --auto-close --auto-kill --button gtk-cancel:1 --title "Downloading ARDOP Station lists" --text "Please wait while I download the current list of ARDOP stations..." ${r} ${c}
fi fi
MODE=ardop
MODEUPDATE=getardoplist
LISTTXT=ardoplist.txt
elif [[ $rc -eq 1 ]]; then
exit 1
elif [[ $rc -eq 3 ]]; then
if [[ -f $LISTLOC/vara-list/varalist.txt ]]; then
LASTUPDATE=$(cat $HOME/Documents/vara-list/varalist.txt | head -n 1)
else
getvaralist | yad --center --progress --pulsate --auto-close --auto-kill --button gtk-cancel:1 --title "Downloading VARA Station lists" --text "Please wait while I download the current list of VARA stations..." ${r} ${c}
fi
MODE=vara
MODEUPDATE=getvaralist
LISTTXT=varalist.txt
fi
VIEWER="evince -w" VIEWER="evince -w"
GRIDMAP="$HOME/Documents/grid-map.pdf" GRIDMAP="$HOME/Documents/grid-map.pdf"
BANDS=$(echo 20M,30M,40M,80M) BANDS=$(echo 20M,30M,40M,80M)
GRIDS=$(echo CN,DN,EN,FN,CM,DM,EM,FM,DL,EL,FL) GRIDS=$(echo CN,DN,EN,FN,CM,DM,EM,FM,DL,EL,FL)
if [[ $(jq .ardop.rig $PATCONFIG | tr -d \") == "" ]]; then if [[ $(jq .$MODE.rig $PATCONFIG | tr -d \") == "" ]]; then
FORMAT=$(echo "Manual Tuning,Rigctl Tuning") FORMAT=$(echo "Manual Tuning,Rigctl Tuning")
else else
FORMAT=$(echo "Rigctl Tuning,Manual Tuning") FORMAT=$(echo "Rigctl Tuning,Manual Tuning")
@@ -286,7 +316,7 @@ FINDALIAS=$(yad --center --wrap --show-uri \
${c} ${r}) ${c} ${r})
rc=$? rc=$?
if [[ $rc -eq 2 ]]; then if [[ $rc -eq 2 ]]; then
{ getardoplist | yad --center --progress --pulsate --auto-close --auto-kill --button gtk-cancel:1 --title "Downloading ARDOP Station lists" --text "Please wait while I download the current list of ARDOP stations..." ${r} ${c}; findalias_menu; return; } { $MODEUPDATE | yad --center --progress --pulsate --auto-close --auto-kill --button gtk-cancel:1 --title "Downloading Station lists" --text "Please wait while I download the current list of stations..." ${r} ${c}; findalias_menu; return; }
elif [[ $rc -eq 1 ]]; then elif [[ $rc -eq 1 ]]; then
exit 1 exit 1
elif [[ $rc -eq 3 ]]; then elif [[ $rc -eq 3 ]]; then
@@ -299,13 +329,13 @@ BAND=$(echo $FINDALIAS | awk -F "," '{print $1}' | tr [:upper:] [:lower:])
GRID=$(echo $FINDALIAS | awk -F "," '{print $2}') GRID=$(echo $FINDALIAS | awk -F "," '{print $2}')
TUNEMODE=$(echo $FINDALIAS | awk -F "," '{print $4}' | awk '{print $1}') TUNEMODE=$(echo $FINDALIAS | awk -F "," '{print $4}' | awk '{print $1}')
cat $LISTLOC/${BAND}ardoplist.txt | awk '$2 ~/'${GRID}'/{print $1,$2,$3,$4,$7,$11}' | sed 's/^/false /' | tr ' ' '\012' > /tmp/stationlist cat $LISTLOC/${BAND}${LISTTXT} | awk '$2 ~/'${GRID}'/{print $1,$2,$3,$4,$7,$11}' | sed 's/^/false /' | tr ' ' '\012' > /tmp/stationlist
cat /tmp/stationlist | yad --image=$DIR/images/corps-icon.png --center \ cat /tmp/stationlist | yad --image=$DIR/images/corps-icon.png --center \
--checklist \ --checklist \
--separator="," \ --separator="," \
--title "ARDOP Stations" \ --title "Stations" \
--text "Select the stations you would like to add to your PAT alias list" \ --text "Select the stations you would like to add to your PAT alias list" \
--list \ --list \
--button="Exit:1" \ --button="Exit:1" \