#!/bin/sh
#] 
#] *********************
#] $ bash "$d_bin"'webLocal/webLocal run.sh'  - 
#]    special webSite functions, often [one-time, rare] changes
# www.BillHowell.ca  10Sep2023 initial, from 'fileops run.sh'
# view in text editor, using constant-width font (eg courier), tabWidth = 3

# Read-Eval-Print Loop (REPL) is typically running in a terminal in workspace 3
# backup this file:	REPL$ sudo pinn_arcArch   "$d_bin"'webLocal/webLocal run.sh' 
# backup workspace: REPL$ sudo pinnL_arcArch  "$d_start"'webLocal wrkSpc REPL pLst.txt'
# 48********************************************48



#24************************24
# List of "runable" functions (this file), generate with :
# $ grep  "^#]"  "$d_bin"'webLocal/webLocal library.sh' |  sed 's|^#] |#\t|'  >"$d_bin"'webLocal/webLocal library.sh'' TblOfCont.txt';  grep --invert-match  '_sub\|_dif\|#	__'  "$d_bin"'webLocal/webLocal library.sh'' TblOfCont.txt' >"$d_temp"'webLocal library.sh'' TblOfCont.txt';  cat  "$d_bin"'webLocal/7_webLocal run top.txt'  "$d_temp"'webLocal library.sh'' TblOfCont.txt'  >"$d_bin"'webLocal/webLocal run.sh'

# 24**********************24
# Setup 

source  "$d_bin"'webLocal/webLocal library.sh'

# find active run functions: 
# $ grep  "^[ 	]\+[A-Za-z0-9_]\+[ 	]\+.*#"  "$d_bin"'webLocal/webLocal run.sh'
# note 	use of tab key in grep search expression
# func defs come BEFORE 'titleLine capture for TableOfContents: 
#		uncomment (delete '#]') of titleLine to run choice, BUT put back later!

# to run : 
#	edit [function, expression]s below, un-comment 
#	check that only one is "active"
#	then run
# 24**********************24



# $ bash "$d_bin"'webLocal/webLocal run.sh' 

#	*********************
#	"$d_bin"'webLocal/webLocal library.sh'  - 
#	   library of handy bash functions for webSite maintenance
#	+-----+
#	Archives
#	dWebWork_archiveLocal						#() local backups of key d_webWork files
#	+-----+  
#	htmlHeadings_to_TblOfContents
#	htmlHeadings_to_TblOfContents				#(pHtml) create a TblOfContents from headings in html file
#	htmlHeadings_to_TblOfContents_printf	#(pHtml) unsuccessful replace echo with printf
#	+-----+
#	processWebSite_find: [pHtmTypLL, pLnkAllL, pLnkTypLL, pLnk[Local, BmkPth]LGodBadLL]]
#	dWeb_get_pHtmTypLL							#() find Howell's pHtmTypLL, some with local links 
#	pHtmTypAllL_pLnkPLHrfImg_get_pHtmLnkPL_pLnkTypAllL_pLnkTypAllSortUL	#(pHtmNlkNwpWebL...etc) 
#	pLnkNlkNwpWebSortUL_get_pLnkTypLL		#(noArgs just enVars) sort links by type
#	pLnkBmkBilLoc_catSort						# http[s]://www.BillHowell.ca/ -> /home/bill/web/
	pLnkLoc_get_pLnkGod_pLnkBad				#() check links, split into [good, bad]
#	processWebSite_find							#() initiate Howell's d_web stuff
#	+----------+
#	processWww_fix: convert all http[s]://www.BillHowell.ca -> /home/bill/web, 
#	pLnkNlkNwpWebL_check_nLnkBad				#() check the number of bad links
#	pHtpWwwBilPL_replace_strHtpHom			#() replace links http://www.BillHowell.ca/ -> /home/bill/web/
#	pNlkWwwL_rename_pHtmNwpL					#() rename files with links pNlkWwwL -> pHtmNwpL
#	processWww_fix									#() [routine, special] cleanup of non-Local links to my webSite
#	+----------+
#	processWebSite_fix: 
#	pLnkPLBadBad_get_pLnkPLBadGod_pLnkBadDunnoPL	#() split linkPLs into [good, unknown]
#	povrLnkBadPL_pLnkPLBadGod_replace		#(pPovrLnkBadPL, pLnkPLBadGod) replace links 
#	processWebSite_fix							#() initiate link fixes (manual preparation of fixL)
#	pLnkVerifyL_get_pLnkImgL					#() generate pLnkImgL of links to images, not created yet
#	+-----+  
#	class-related
#	pHtmWebL_get_pClassL							#() extract a list of classes from all my html files
#	pWebPageL_notIn_pHtmlClassAllL			#() not created- add Path notIn Class, rm Class notIn Path ()
#	pHtmWebL_put_pClassPL						#(pHtmlL  pStrPL) replace <:code:> phrases in pNlkNwpWebL 
#	pOvrClassL_put_pHead							#() replace webPages headers, pHtmlClass[All_ then TrNN]L


# $ bash "$d_bin"'webLocal/webLocal run.sh' 

# enddoc
