Skip to content

Commit

Permalink
rename printend to print_final
Browse files Browse the repository at this point in the history
  • Loading branch information
cserteGT3 committed Jul 11, 2019
1 parent 3a519fa commit c8750f1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/manager/judoc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function serve(; clear::Bool=true, verb::Bool=false, port::Int=8000, single::Boo
sig = jd_fullpass(watched_files; clear=clear, verb=verb, prerender=prerender, isoptim=isoptim)
sig < 0 && return sig
fmsg = rpad("✔ full pass...", 40)
verb && (println(""); print(fmsg); printend(fmsg, start); println(""))
verb && (println(""); print(fmsg); print_final(fmsg, start); println(""))

# start the continuous loop
if !single
Expand Down Expand Up @@ -189,7 +189,7 @@ function jd_loop(cycle_counter::Int, ::LiveServer.FileWatcher, watched_files::Na
verb && println("→ full pass...")
start = time()
jd_fullpass(watched_files; clear=false, verb=false, prerender=false)
verb && (printend(rpad("✔ full pass...", 15), start); println(""))
verb && (print_final(rpad("✔ full pass...", 15), start); println(""))
else
fmsg = fmsg * rpad("→ updating... ", 15)
verb && print("\r" * fmsg)
Expand All @@ -200,7 +200,7 @@ function jd_loop(cycle_counter::Int, ::LiveServer.FileWatcher, watched_files::Na
pg_foot = read(joinpath(PATHS[:src_html], "page_foot.html"), String)
foot = read(joinpath(PATHS[:src_html], "foot.html"), String)
process_file(case, fpair, head, pg_foot, foot, cur_t; clear=false, prerender=false)
verb && printend(fmsg, start)
verb && print_final(fmsg, start)
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions src/manager/post_processing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function optimize(; prerender::Bool=true, minify::Bool=true, sig::Bool=false,
withpre = fmsg * ifelse(prerender, rpad(" (with pre-rendering)", 24), rpad(" (no pre-rendering)", 24))
print(withpre)
succ = (serve(single=true, prerender=prerender, nomess=true, isoptim=true) === nothing)
printend(withpre, start)
print_final(withpre, start)

#
# Minification
Expand All @@ -52,7 +52,7 @@ function optimize(; prerender::Bool=true, minify::Bool=true, sig::Bool=false,
succ = success(`$([e for e in split(PY)]) $JD_PY_MIN_NAME`)
# remove the script file
rm(JD_PY_MIN_NAME)
printend(mmsg, start)
print_final(mmsg, start)
else
@warn "I didn't find css_html_js_minify, you can install it via pip the output will "*
"not be minified."
Expand Down Expand Up @@ -90,7 +90,7 @@ function publish(; prerender::Bool=true, minify::Bool=true, nopass::Bool=false,
run(`git add -A `)
run(`git commit -m "jd-update" --quiet`)
run(`git push --quiet`)
printend(pubmsg, start)
print_final(pubmsg, start)
catch e
println("✘ Could not push updates, verify your connection and try manually.\n")
@show e
Expand Down
2 changes: 1 addition & 1 deletion src/misc_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ $(SIGNATURES)
Nicer printing of processes.
```
function printend(startmsg::AbstractString, starttime::Float64)::Nothing
function print_final(startmsg::AbstractString, starttime::Float64)::Nothing
tit = time_it_took(starttime)
println("\r$startmsg$tit")
end
Expand Down
2 changes: 1 addition & 1 deletion test/misc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ end
f = joinpath(d, "a.txt")
open(f, "w") do outf
redirect_stdout(outf) do
J.printend("elapsing",start)
J.print_final("elapsing",start)
end
end
r = read(f, String)
Expand Down

0 comments on commit c8750f1

Please sign in to comment.