#!/bin/sh
#] 
#] *********************
#] $ bash "$d_bin"'reviews get [nomenclature, tool] list.sh' 
# www.BillHowell.ca  12Sep2024 initial 
# view in text editor, using constant-width font (eg courier), tabWidth = 3


#24************************24




#24************************24
# List of operators, generated with :
# $ grep  "^#]"  "$d_bin"'reviews get [nomenclature, tool] list.sh' |  sed "s/^#\]/  /" 

#


#08********08
# Setup 

source  "$d_bin"'fileops.sh'



#08********08
# code 

#] dReviews_get_pNomTolL()  - extract [nomenclature, tool] list from my NN reviews
#]    default assumes pinn_getLinseq_povr() ["^#linSeqStrt:","^#linSeqEndd:"]=[strt, endd] markers
#]    this assumes there is only ONE linSeq per file!! (12Sep2024)
# see overall standard line markers : "$d_bin"'4_txtLin markers notes.txt'
	dReviews_get_pNomTolL() 
{
	dReviews="$d_PROJECTS"'My Reviews/'
	pNomTolL="$dReviews"'9_reviews [nomenclature, tool] list.txt'
	pTmp___L="$d_temp"'dReviews_get_pNomTolL single file.txt'
	pReviewL="$d_temp"'review file list.txt'

	if  [ -f  "$pNomTolL" ]; then 
		pinn_archiveLocalRm  "$pNomTolL"
	fi

	echo  >>"$pNomTolL"  '[nomenclature, tool] list from my NN reviews' 
	echo  >>"$pNomTolL"  '   built by: '"$chr_quote"'$d_bin"$chr_quote$chr_apo"reviews get [nomenclature, tool] list.sh'"$chr_apo"  
	echo  >>"$pNomTolL"  ''  

	find "$dReviews"  -type f  -name "*.txt"  |  grep  --invert-match  "z_Old\|z_Archive"  |  grep  ' r '  |  sort  >"$pReviewL"

	flag_nLinSeq=0
	while IFS='' read -r pReview; do
		pinn_getLinseq_povr "$pReview"  "$pTmp___L"
		if  [ -s  "$pTmp___L" ]; then 
			echo  >>"$pNomTolL"  ''  
			echo  >>"$pNomTolL"  '+-----+'  
			echo  >>"$pNomTolL"  "$pReview"  
			cat   >>"$pNomTolL"  "$pTmp___L"  
			rm    "$pTmp___L"  
		fi
	done <"$pReviewL"
}


#08********08
# Procedures -  To run :
# simple - no args, just run to update list
# many historical reviews must be annotated with ["^#strt:","^#endd:"]

	dReviews_get_pNomTolL



# $ bash  "$d_bin"'reviews get [nomenclature, tool] list.sh'  

# enddoc
