From daf59126f320fe39fc80d8d50c05dde9a803c8f9 Mon Sep 17 00:00:00 2001 From: Diego Javier Zea Date: Wed, 17 Jul 2024 17:22:29 +0200 Subject: [PATCH] Test using #setup and hide --- docs/src/Scripts.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/docs/src/Scripts.md b/docs/src/Scripts.md index 63b400d8..c6e1c466 100644 --- a/docs/src/Scripts.md +++ b/docs/src/Scripts.md @@ -21,14 +21,14 @@ To install **MIToS_Scripts.jl**, you only need Julia 1.9 or later installed on y system. Executing `julia` in the terminal to open the Julia REPL, and finally, run the following command: -```@example scripts +```julia using Pkg Pkg.add(url="https://github.com/MIToSOrg/MIToS_Scripts.jl") ``` Then, you can get the location of the installed scripts by running the following command: -```@example scripts +```julia using MIToS_Scripts scripts_folder = joinpath(pkgdir(MIToS_Scripts), "scripts") ``` @@ -53,11 +53,21 @@ julia Buslje09.jl -h ## Scripts +```@setup scripts +using Pkg +project_folder = "MIToS_Scripts_Project" +isdir(project_folder) || mkdir(project_folder) +Pkg.activate(project_folder) +Pkg.add(url="https://github.com/MIToSOrg/MIToS_Scripts.jl") +using MIToS_Scripts +scripts_folder = joinpath(pkgdir(MIToS_Scripts), "scripts") +``` + ### Buslje09.jl -```@repl scripts -script_path = joinpath(scripts_folder, "Buslje09.jl") # path to the script -run(`$(Base.julia_cmd()) $script_path -h`) +```@example scripts +script_path = joinpath(scripts_folder, "Buslje09.jl") # hide +run(`$(Base.julia_cmd()) --project=$project_folder $script_path -h`) #hide ``` ### BLMI.jl