mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-02 07:07:46 +00:00
make more nu-32-ish
This commit is contained in:
parent
b66510fcca
commit
4dad88ad92
1 changed files with 6 additions and 7 deletions
|
@ -10,12 +10,11 @@
|
||||||
# Hopefully, in the future someone will contribute a script to make this automatic.
|
# Hopefully, in the future someone will contribute a script to make this automatic.
|
||||||
|
|
||||||
let nu_files = (ls **/*.nu)
|
let nu_files = (ls **/*.nu)
|
||||||
let nu_table = (echo $nu_files |
|
let nu_table = ($nu_files |
|
||||||
get name |
|
get name |
|
||||||
wrap File |
|
wrap File |
|
||||||
insert Category { |it|
|
insert Category { |it|
|
||||||
let cat = (echo $it.File | path dirname)
|
let cat = ($it.File | path dirname)
|
||||||
|
|
||||||
if $cat == "" {
|
if $cat == "" {
|
||||||
"not assigned yet"
|
"not assigned yet"
|
||||||
} {
|
} {
|
||||||
|
@ -25,9 +24,9 @@ let nu_table = (echo $nu_files |
|
||||||
|
|
||||||
# Let's fix the file now
|
# Let's fix the file now
|
||||||
let nu_table = (echo $nu_table | update File { |it|
|
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_name = (echo $file_path | path basename)
|
||||||
let file_link = (build-string "[" $file_name "]" "(./" $file_path ")")
|
$"[($file_name)](char lparen)./($file_path)(char rparen)"
|
||||||
echo $file_link
|
|
||||||
})
|
})
|
||||||
$nu_table | to md --pretty
|
|
||||||
|
echo $nu_table | to md --pretty
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue