rjc

bash dir | rjc dir

json {"meta":{"drive":"F","serial":"38EC-3395","directory":"F:\\Dev\\rjc","files":3,"directories":4},"resources":[{"date":"01/15/2023","time":"04:14 PM","is_dir":true,"size":null,"name":"."},{"date":"01/15/2023","time":"04:14 PM","is_dir":true,"size":null,"name":".."},{"date":"01/14/2023","time":"04:25 PM","is_dir":false,"size":8,"name":".gitignore"},{"date":"01/15/2023","time":"10:38 PM","is_dir":false,"size":11117,"name":"Cargo.lock"},{"date":"01/20/2023","time":"12:53 AM","is_dir":false,"size":437,"name":"Cargo.toml"},{"date":"01/21/2023","time":"02:18 PM","is_dir":true,"size":null,"name":"src"},{"date":"01/20/2023","time":"12:53 AM","is_dir":true,"size":null,"name":"target"}]}

Installation

Cargo Install (MacOS, Linux, Windows)

crate version rjc

bash cargo install rjc

Binaries

For precompiled binaries, check the releases in this repo.

Library

rjc can also be used as a library.

```rust use rjc::win32::dir::{DirData, parse}; use std::process::Command;

fn main() { let output = Command::new("cmd").args(["/C", "dir"]).output().expect("Failed to execute process.");

let dir_data: DirData = parse(Some(String::from_utf8_lossy(&output.stdout).to_string()));

println!("{}", dir_data.meta.drive);

} ```

Parsers

Win32

| Commands | Documentation | | --------- | -------------------------------------------------------- | | assoc | details | | dir | details | | netstat | details | | tasklist | details |

Unix

| Commands | Documentation | | --------- | ----------------------------------------------------- | | cksum | details | | du | details | | env | details | | file | details | | ls | details | | shadow | details | | wc | details |

Darwin

| Commands | Documentation | | ----------- | -------------------------------------------------------- | | airport | details |

External

| Commands | Documentation | | -------------------------------------------- | ---------------------------------------------------- | | lsd | details |

Formats

| Commands | Documentation | | ----------------- | -------------------------------------------------------- | | email-address | details |