#] #] ********************* #] "$d_bin"'webLocal/4_webLocal lessons.txt' - usage notes for functions (procedure: see webLocal !) www.BillHowell.ca 25Sep2023 initial view in text editor, using constant-width font (eg courier), tabWidth = 3 #] step-by-step procedure is listed in: "$d_bin"'webLocal/webLocal run.sh' #] links for webSite up[load, grade]s: see "$d_bin"'webLocal/1_webLocal links.txt', #48************************************************48 #24************************24 # Table of Contents, generate with : # $ grep "^#]" "$d_bin"'webLocal/4_webLocal lessons.txt' | sed "s/^#\]/ /" >"$d_bin"'webLocal/4_webLocal lessons.txt'' TblOfCont.txt' # ********************* # 24**********************24 Not shown : revamp work - major changes from earlier processes, revamped web[Page, Dir]s Preps for onLine work, including [dWebHtmlOnly, lftp upload] log file for all these webSite functions (append mode) : pLogWeb769="$d_webWork"'pLog webSite.txt' this is like "$d_bin"'fileops log.txt' #] 08********08 #] step 0: #] before working backup entire computer!!! 05May2026 did incremental backup as per bin/start (easy) #] dWebWork_archiveLocal # local backups of key d_webWork files, hugely important! 05May2026 I skipped this - have backup anyways #] 08********08 #] step 1: separate link listS into [, non-]webPage #] dWeb_get_pHtmWebYesNonL # see "most of Howell's html files are NOT webPages!" # in "$d_bin"'webLocal/4_webLocal lessons.txt' (this file, below) +--+ 08May2025 excludes have been a major problem : 'webLocal library.sh' : find "$d_web" -type f -name "*.html" | grep --invert-match -i "References\/24Sep2021 Scientific Integrity\,\|\/References\/Schmidhuber \|0_test\|z_Old\|z_Archive" | sort -u >"$pHtmAll769" 0_test was added: don't want to change test files! Schmidhuber: somehow binary file match problem? -see step 2 - webSite_get_links (below) grep --invert-match --file="$pHtmExcDir769" -i "$pHtmAll769" >"$pHtmInc769" >> this is what differentiates pHtm[All, Inc] but must fix links in pHtmAll +--+ problem with corrupted 1st lines of html files, used to identify my web[fil, Page]s : 13h55m 06May25$ date_ymdhms=$(date +"%0y%0m%0d %0kh%0Mm%0Ss"); find "$d_web" -type f -name "*.html" | grep --invert-match -i "0_test\|z_Old\|z_Archive\|z_history" | tr \\n \\0 | xargs -0 -IFILE sed -n '1p' "FILE" | grep '/home/bill/web/' >"$d_webWork$date_ymdhms 1st line of html files.txt" grep: (standard input): binary file matches (caused by Schmidhuber?) >> 3.2 kBytes, 36 files only +--+ Extra stuff : get 1st line of legit webPages : $ date_ymdhms=$(date +"%0y%0m%0d %0kh%0Mm%0Ss"); find "$d_web" -type f -name "*.html" | grep --invert-match -i "0_test\|z_Old\|z_Archive\|z_history" | tr \\n \\0 | xargs -0 -IFILE sed -n '1p' "FILE" | grep "^<\![ ]\+\/home\/bill\/web\/" | sort -u >"$d_webWork$date_ymdhms 1st line of html files.txt" [find, fix] webPage (example) : $ find "$d_web" -type f -name "*.html" | grep --invert-match -i "0_test\|z_Old\|z_Archive\|z_history" | tr \\n \\0 | xargs -0 -IFILE grep --with-filename --line-number "\/home\/bill\/web\/webWork files\/head_one\.html" "FILE" +-----+ #] pHtmIncl.txt: html files to rm? +--+ grep --invert-match --file="$pHtmExcDir769" -i "$pHtmAll769" >"$pHtmInc769" >> pHtmExcDir769 is what differentiates pHtm[All, Inc] but must fix links in pHtmAll /home/bill/web/Personal/241115 IDtheft/[emails, letters]/ +-----+ #] fix errors IN pWebYes: GO BACK TO step 0 +-----+ #] 06May2025 IGNORE for now!: not main procedure path - for debugging? webLocal_get_internalLinksWithFnamLinNum #(no args) locate internal links (for debugging?, not core) pWebPag_sedStrt_get_pLnkL #(sedStrt pWebPag) extract lnkL with [start, end] code webUpdateTmp_local # (no args) 05May2025 can't find this now??? #] 08********08 #] step 2 - [get, check] links [All, Int, Ext, Bad, BMkInn, BmkOut] #] webSite_get_links #(no args) extract links from webSite 06May2025 minor corrections, runs easily, will have to finish entire webOnlin update to be sure it works 08May2025 should it be starting with pWebYes769="$d_webWork"'pWebYesL.txt' ??? Schnmidhuber problem etc #] pLnkIntPthL_get_pLnkIntPthGodBadLL #(no args) split pLnkIntPthL into [good, bad]linkL 06May2025 runs easily, will have to finish entire webOnlin update to be sure it works #] pLnkIntPthGodL_get_pLnkIntBmkGodBadLL #(no args) good links split by [good, bad] bookmarks 06May2025 problem with pth assignments, code inconsistencies 05May2025 can't find these now : GodL_pBadL_bandAid # pHtmBmkL_get_pGoodL_pFailL # split pLnkAllL into with[, out] bookmarks #] step1 fix errors: pLnkInt[Pth, Bmk]Fail.txt #] 08********08 #] step 3 - manual [setup, fix] * [phrases, links, pClassAll_L.txt, etc] #] 08********08 #] step 4 - doesn't exist yet...?? #] 08********08 #] step 5 - clean up failed links #] pLnkBadFail_put_pStrPAll_L #] pLnkL_diffNum_pLogs #] bad_to_worse #08********08 #] +-----+ #] 'webLocal library.sh' instructions # A variety of 'fileops run' bash scripts are in project directories, where it is perhaps easier to see the [data, intermediate results, etc] for scripts in the context of that project. # # A major reason for creating these "fileops run *.sh" files was to have a description of [manual, script] combinations of steps for a specific process. This should be enormously helpful [say, month, year]s later when the process has to be : [repeat, modify, used elsewhere]. # # #] Here is a listing of 'fileops run' bash scripts, built by : # $ find "$d_web" -type f -name "fileops run*.sh*" | sort # /home/bill/web/bin/fileops run.sh # /home/bill/web/ProjMini/TrNNs_ART/webWork/fileops run Grossberg imageCaptions.sh # /home/bill/web/ProjMini/TrNNs_ART/webWork/fileops run TrNN_ART.sh # /home/bill/web/webWork/fileops run webSite general.sh # #] most of Howell's html files are NOT webPages! initial list via : "$d_bin"'webLocal/webLocal library.sh' - library of handy bash functions for webSite maintenance find "$d_web" -type f -name "*.html" | grep --invert-match -i "z_Old\|z_Archive\|z_history" | sort -u >"$pHtmAll769" grep --invert-match --file="$pHtmExcDir769" -i "$pHtmAll769" >"$pHtmInc769" "$d_web"'webWork/pHtmExcL dirs.txt' #] pHtmlExclL - to manually create an initial list of grep [dir, file]s #] as a first filter to exclude pths # this whole process is focussed on my webPages, # so clean up the list early to reduce problems downstream # each run of dWeb_get_pWebPageL() below may add new exclusions # great way to see if I DIDN'T turn an html file into a webPage! # 2024? <06May2025 pHtmlExclL="$d_webWork"'pHtmlExclL.txt' - based on experience and looking at pHtmlPathAll_L : +-----+ (copy) /0_test/ /Conference guides/ /Cool emails/ /Electric Universe/References/Randi Foundation 2008-2011 /Forms/ /Grossberg/captions html/ /Grossberg/captions sideBar/ /Grossberg/z_[core, fun, strange] /Isabelle2023/contrib/ /Isabelle2023/doc/ /Isabelle2023/lib/ /Isabelle2023/src/ /OPM/OPM/ /Qnial/code develop_test/ /Qnial/Manuals/ /Qnial/Qnial_bag/ /References/Niroma/ /References/Weart 2003 - The Discovery of Global Warming/ /Solar system/Cdn Solar Forecasting/ /Sudbury Neutrino Observatory (SNO)/ /System_maintenance/ /Top 75 Immunotherapy startups_files/ /Yoonsuck Choe - conf program book/ /z_Archive/ /z_archive/ /z_history/ /z_historic/ /z_Old/ /z_old/ +-----+ The following exclusions are key to distuinguishing "real" webPages : /Conference guides/ /Cool emails/ /Grossberg/captions html/ /Grossberg/captions sideBar/ /Grossberg/z_[core, fun, strange] Also grep --invert-match -i "z_Old\|z_Archive\|z_history" avoids z_[H,h]istory #] Manually edit AFTER dWeb_get_pWebPageL ?dWeb_get_pHtmWebYesNonL? #] pHtmlClassAll_L - class must be MANUALLY [add, modify]ed for each line # must include all [renamed, moved, new] files!! #] pHeader template[ TrNN].txt - manually [check, edit] # "$webWork"'pHeader template.txt' # "$d_web"'Neural nets/TrNNs_ART/webWork/pHeader template TrNN.txt' #] new webPage manually add to pHtmlClassAll_L.txt : # automatically added by pHtmlPathAll_L.txt, but check # copy lines above to "$d_bin"'webSite update notes.txt', for taking notes during work # # example notes : # +--+ # "230817 change [pStrPAll_L, pHtmlClassAll_L, pHeader template TrNN.txt]" : # /ProjMini/Transformer NNs/ /Neural nets/Transformer NNs/ # /ProjMini/TrNNs_ART/ /Neural nets/TrNNs_ART/ # # # Manually edit AFTER doing dWeb_get_pWebPageL (these are NOT updated by script) : # OK 'pStrPAll_L change.txt' - # OK pHtmlClassAll_L - class must be MANUALLY [add, modify]ed for each line # # pHeader templates - manually [check, edit] # x "$webWork"'pHeader template.txt' # OK "$d_web"'Neural nets/TrNNs_ART/webWork/pHeader template TrNN.txt' # # new webPage manually add to pHtmlClassAll_L.txt : # x automatically added by pHtmlPathAll_L.txt, but check # # OK done # x not affected by "230817 change" # * ignored, didn't check # # comment line #] pStrPAll_L - check to make sure that all intended strP are tabbed #] pStrP : put dir changes AFTER pth changes - safer, [no-tab, empty] pStrP lines are OK # 23Sep2023 see instructions above, need a script... #simple manual check : #sed s'|\x9|xyZyx|' "$d_webWork"'pStrPAll_L change.txt' | grep --invert-match 'xyZyx' #15Sep2023 gave me : #<:5 paths with fileName 5:> # #/home/bill/web/ProjMini/Puetz & Borchardt/Howell - comments on Puetz UWS, the greatest of cycles, human implications.odt #/home/bill/web/ProjMini/Puetz & Borchardt/Howell - possible phenomenological origins of Puetz Universal Wave Series (UWS).html # #<:5 bookmarks - hopefully these wont backfile 5:> # # #<:5 here is where I start changes to dirs 5:> # #very easy to see the two cases that were NOT tabbed #don't know yet if povrL_pStrP_replace will bliw up with non-tabbed (incl empty) lines... # +--+ 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 # +--+ [get, change, check] [, non-]webPages # dWeb_get_pHtmWebYesNonL(no args) - generate pthLsts of Howells [web, Href, Img, Extrn] # webPage is html file starting with '