From 4dad88ad92f864fee95e03eea8ea653548182141 Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Wed, 26 May 2021 12:50:40 -0500 Subject: [PATCH] make more nu-32-ish --- make_readme_table.nu | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/make_readme_table.nu b/make_readme_table.nu index f62308a..15ce13b 100644 --- a/make_readme_table.nu +++ b/make_readme_table.nu @@ -10,12 +10,11 @@ # Hopefully, in the future someone will contribute a script to make this automatic. let nu_files = (ls **/*.nu) -let nu_table = (echo $nu_files | +let nu_table = ($nu_files | get name | wrap File | insert Category { |it| - let cat = (echo $it.File | path dirname) - + let cat = ($it.File | path dirname) if $cat == "" { "not assigned yet" } { @@ -25,9 +24,9 @@ let nu_table = (echo $nu_files | # Let's fix the file now let nu_table = (echo $nu_table | update File { |it| - let file_path = (echo $it.File) + let file_path = (echo $it.File | into string | str find-replace '\\' '/') let file_name = (echo $file_path | path basename) - let file_link = (build-string "[" $file_name "]" "(./" $file_path ")") - echo $file_link + $"[($file_name)](char lparen)./($file_path)(char rparen)" }) -$nu_table | to md --pretty + +echo $nu_table | to md --pretty