include("WBInclusions") using HTTP global HICOLOR = HI_AQUA global version = "015" global doEnd = false global doStart = true # 2022-10-02 15:12 w/images/c/cc SmilingLady.jpg 123 b = split(String(HTTP.get("https://www.bmccedd.org/V2").body), "\n") println("WBYY v" * version) for itm in b if length(itm) < 42 || itm[24:32] != "w/images/" continue end try d = findlast(" ", itm).start c = itm[24:36] * "/" * itm[40:d - 1] len = itm[d + 1: length(itm)] doit = true what = "new " * len if isfile(c) sz = string(stat(c).size) what = (doit = (sz = string(stat(c).size)) != len) == true ? sz * ":" * len : len end if doit c113 = c[1:13] if !isdir(c113) && isdir(c[1:10]) mkdir(c113) print(" [ New directory: " * c113 * " ] ") end cc = "https://www.bmccedd.org/" * c if doStart println(" ") global doStart = false end print(" " * cc) #res = HTTP.get(cc) f = open(c, "w") write(f, HTTP.get(cc).body) close(f) println(" Done. " * what) global doEnd = true end catch ex s = string(ex) if length(s) > 200 s = s[1:200] * "..." end println(hilite(HICOLOR, "\n Failure: " * string(typeof(ex)) * ".\n" * s)) #return 0 end end if doEnd println(" ") end