# # ********************* # "$d_bin"'webSite.sh' - library of handy bash functions for webSite maintenance # do NOT run this directly! use "$d_bin"'webSite run.sh' # +-----+ # Setup # 02Jun2021 I have assigned not-so-random numbers to FILE with read loops # to avoid "crossover effects of nesting" of this bash library. # dWebWork_archiveLocal(no args) - local backups of key d_webWork files # +--+ early-stage [check, build, edit] # pWebPageL_str_get_pFnamLinNumL(str) - list str occurences with [fNam, linNum] # pWebPageL_pStrP_replace(no args) - general str replacement in webPages # htmlHeadings_to_TblOfContents(pHtml) - create a TblOfContents from headings in html file # +--+ class-related # pWebPageL_notIn_pHtmlClassAllL(no args) - add Path notIn Class, rm Class notIn Path # pOvrClassL_get_pClassL(no args) - extract a list of classes from pOvrClassL # pHtmlL_putClass_pStrPL(pHtmlL pStrPL) - replace ALL <:code:> phrases in pHtmlL # must have tab separator between each search-replace pair per line in pStatus # pOvrClassL_put_pHead_sub(pClassL pHeadTplt) - replace header, eg webPages # pOvrClassL_put_pHead(no args) - replace webPages headers, pHtmlClass[All_ then TrNN]L # [title, class] is inserted into a modified copy of pHead # [modified header, old povr] are catenated to replacement povr # +--+ [get, change, check] [, non-]webPages # dWeb_get_pHtmWebYesNonL(no args) - generate pthLsts of Howells [web, Href, Img, Extrn] # does povrL_idx_strTst_cut check of htmls, add to pHtmlPathExclL, needs manual cleanup # +--+ [get, change, check] links # webSite_get_internalLinksWithFnamLinNum(no args) - extract internal links (within webSite) # output includes [pth, linNum] # pWebL_get_pLnkL_run(no args) - extract strL with [start, end] code, reverse line each item # webSite_get_links(no args) - extract links, note pLnkBadL.txt captures initial bads # webSite_check_internalLinks(no args) - check internal links, 2nd set of bads to pLnkFailL # webSite_strP_findReplace_dirMoved(bol_backup strOld strNew) - # replace [changed, moved] subDirs # obsolete? needs update! with noChrBads like [apo, quote, &] # pWebPageL_pStrP_replaceGetBad(no args) - clean [pth, link], errorOutputs # after going through [add, remove, correct] steps: update webPages, check results # dWeb_update_online - update one-way only! separate [, non-]html files