From f772230d0089c4547284bf37cf4d043f3ef136c0 Mon Sep 17 00:00:00 2001
From: Vitor Trovisco <vmt25@cam.ac.uk>
Date: Thu, 28 Jul 2022 15:47:33 +0000
Subject: [PATCH] Update delete_pub_list.sh - improved commenting

---
 delete_pub_list.sh | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/delete_pub_list.sh b/delete_pub_list.sh
index 91906bb..baa8630 100644
--- a/delete_pub_list.sh
+++ b/delete_pub_list.sh
@@ -12,17 +12,18 @@ sudo ./canto/script/canto_docker ./script/canto_delete.pl --pub $(cat "${FILENAM
 sed -n -e '/  /p' "temp_output.txt" > "temp_output1.txt"
 sed 's/  //' "temp_output1.txt" > "temp_output2.txt"
 
-#this will replace the odd character '/r' with a white-space and write the sessions list into the file "sessions_to_delete.txt"
-# ('/r' characters would prevent sessions from being deleted, therefore they need to be deleted)
+#the curs_key/ID output includes the the odd character '/r', which will block the deletion of curation sessions. 
+# the following lines will replace any odd character '/r' with a white-space and write the sessions list into the file "sessions_to_delete.txt"
 FILENAME1="temp_output2.txt"
 SESS_DEL=$(cat "${FILENAME1}")
 echo ${SESS_DEL} | tr '\r' ' ' > "sessions_to_delete.txt"
 
-#the following lines will a) 1st remove all sessions and b) repeat the command to delete the original list of publications
+#the following lines a) remove all sessions in 'sessions_to_delete.txt' and b) repeat the original command to delete the initial list of publications in 'PMID_to_delete.tsv'
 FILENAME2="sessions_to_delete.txt"
 sudo ./canto/script/canto_docker ./script/canto_delete.pl --curs $(cat "${FILENAME2}")
 sudo ./canto/script/canto_docker ./script/canto_delete.pl --pub $(cat "${FILENAME}")
 
+#the following cleanup the temporary files created by the script
 rm "temp_output.txt"
 rm "temp_output1.txt"
 rm "temp_output2.txt"
-- 
GitLab