Use initials from whoami for StudyInfo

This commit is contained in:
2024-08-04 17:59:48 -04:00
parent 3ce87f4df5
commit f3e2b73460

View File

@@ -1292,10 +1292,10 @@ qhtcp() {
(( next_study_num++ )) (( next_study_num++ ))
done done
# Use initials from project not whoami # Use initials from project or whoami?
# Best I can do is first two letters of username # Best I can do is first two letters of username
# See TODO in markdown # See TODO in markdown
initials="${PROJECT_USER:0:2}" initials="${USER:0:2}"
INITIALS=${initials^^} INITIALS=${initials^^}
next_study_entry="$next_study_num,$PROJECT_SUFFIX,NA,NA,$INITIALS" next_study_entry="$next_study_num,$PROJECT_SUFFIX,NA,NA,$INITIALS"
debug "$next_study_entry" debug "$next_study_entry"
@@ -2061,7 +2061,7 @@ main() {
SCRIPT_DIR=$(dirname "$SCRIPT") SCRIPT_DIR=$(dirname "$SCRIPT")
APPS_DIR="$SCRIPT_DIR/apps" APPS_DIR="$SCRIPT_DIR/apps"
TEMPLATES_DIR="$SCRIPT_DIR/templates" TEMPLATES_DIR="$SCRIPT_DIR/templates"
PROJECT_USER="$(whoami)" USER="$(whoami)"
DATE="$(date +%Y%m%d)" # change in EASYconsole.m to match 'hardcode' DATE="$(date +%Y%m%d)" # change in EASYconsole.m to match 'hardcode'
# Find a scans directory # Find a scans directory
@@ -2118,7 +2118,7 @@ main() {
OUT_DIR=$(realpath -s "$OUT_DIR") OUT_DIR=$(realpath -s "$OUT_DIR")
# Set the automatic project directory prefix # Set the automatic project directory prefix
PROJECT_PREFIX="${DATE}_${PROJECT_USER}" # reversed these so easier to sort and parse date PROJECT_PREFIX="${DATE}_${USER}" # reversed these so easier to sort and parse date
sanitize_pn() { [[ $1 =~ [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]_.+_.+ ]]; } # sanitizer regex for prefix sanitize_pn() { [[ $1 =~ [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]_.+_.+ ]]; } # sanitizer regex for prefix
declare -ag PROJECTS=() # this array will hold all of the projects for this run declare -ag PROJECTS=() # this array will hold all of the projects for this run