aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-12-12 12:32:36 +0000
committerMatthew Lemon <y@yulqen.org>2024-12-12 12:32:36 +0000
commitba7d22e99a8ff47f5c04702294bd5ab29669edb6 (patch)
treeccb73716ef8e6644d89d2c9ee41d2eeef0dcb771
parent60ef12ed6bbc34f7b7d0c0eb16a10a68be7786ee (diff)
Tweaks
-rwxr-xr-xtjp.sh27
1 files changed, 18 insertions, 9 deletions
diff --git a/tjp.sh b/tjp.sh
index f348995..9eaeca8 100755
--- a/tjp.sh
+++ b/tjp.sh
@@ -45,7 +45,12 @@ list_MOD_entries() {
# Function to list all MOD contacts
list_MOD_contacts() {
- psql -h "$HOST" -U "$USER" -d "$DB_CONTACTS" -c "SELECT * FROM contacts WHERE contact_type = 3;"
+ psql -h "$HOST" -U "$USER" -d "$DB_CONTACTS" -c "SELECT id, first_name, last_name, email, phone, contact_comments FROM contacts WHERE contact_type = 3;"
+}
+
+# Function to list all MOD meetings
+list_MOD_meetings() {
+ psql -h "$HOST" -U "$USER" -d "$DB" -c "SELECT id, name, date, subject FROM meetings;"
}
# Function to add a new meeting
@@ -87,6 +92,9 @@ case "$1" in
-M)
list_MOD_entries
;;
+ -F)
+ list_MOD_meetings
+ ;;
-e)
add_meeting
;;
@@ -99,14 +107,15 @@ case "$1" in
;;
*)
echo "Usage:"
- echo " jlp -p - Add personal entry"
- echo " jlp -m - Add MOD entry"
- echo " jlp -C - Add MOD contact"
- echo " jlp -y - Select all MOD contacts"
- echo " jlp -l - Select all personal entries"
- echo " jlp -M - Select all MOD entries"
- echo " jlp -e - Add new meeting (returns meeting ID)"
- echo " jlp -E ID - Add new journal entry for meeting whose ID is ID"
+ echo " tjp -p - Add personal entry"
+ echo " tjp -m - Add MOD entry"
+ echo " tjp -C - Add MOD contact"
+ echo " tjp -y - Select all MOD contacts"
+ echo " tjp -l - Select all personal entries"
+ echo " tjp -M - Select all MOD entries"
+ echo " tjp -F - Select all MOD meetings"
+ echo " tjp -e - Add new meeting (returns meeting ID)"
+ echo " tjp -E ID - Add new journal entry for meeting whose ID is ID"
;;
esac