mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-07-30 13:47:46 +00:00

Hi! I reduced some of the errors in the daily CI. Still there are a few of them, but at least is something - Added the badge for the `daily.yml` (currently failing) - removed old `docker` from v0.60 - removed old `git` from auto-generate completions - removed `nethack` from auto-generate completions (wasn't very useful) - removed `root` from auto-generate completions (wasn't very useful) - removed `valgrind` from auto-generate completions (wasn't very useful) - moved `less` from auto-generate to custom-completions. - moved `mix` from auto-generate to custom-completions. - moved `tar` from auto-generate to custom-completions. - moved `tcpdump` from auto-generate to custom-completions. - moved `virsh` from auto-generate to custom-completions. - moved `zef` from auto-generate to custom-completions. - fixed `base16.nu` - fixed `from-cpuinfo.nu` - fixed `from-dmicode.nu` - fixed `to-number-format.nu` - fixed `to-json-schema.nu`
22 lines
478 B
Text
22 lines
478 B
Text
# Convert from contents of /proc/cpuinfo to structured data
|
|
export def "from cpuinfo" [] {
|
|
lines
|
|
| split list ''
|
|
| each {
|
|
split column ':'
|
|
| str trim
|
|
| update column1 {
|
|
get column1
|
|
| str replace -a ' ' '_'
|
|
}
|
|
| transpose -r -d
|
|
| update flags {
|
|
get flags
|
|
| split row ' '
|
|
}
|
|
| update bugs {
|
|
get bugs
|
|
| split row ' '
|
|
}
|
|
}
|
|
}
|