mirror of
https://codeberg.org/unspeaker/perch.git
synced 2025-12-06 17:46:42 +01:00
wip: drawing table using Content::content
This commit is contained in:
parent
c3b9e0d9ec
commit
53132da551
5 changed files with 70 additions and 47 deletions
|
|
@ -39,15 +39,17 @@ fn cli () -> clap::Command {
|
|||
|
||||
fn main () -> Usually<()> {
|
||||
let args = cli().get_matches();
|
||||
|
||||
let path = if let Some(path) = args.get_one::<PathBuf>("path") {
|
||||
path.into()
|
||||
} else {
|
||||
current_dir()?
|
||||
};
|
||||
let threads = args.get_one::<usize>("threads").map(|x|*x).unwrap_or_default().max(1);
|
||||
set_current_dir(&path)?;
|
||||
|
||||
let threads = args.get_one::<usize>("threads").map(|x|*x).unwrap_or(4);
|
||||
let results = collect(&path, threads)?;
|
||||
|
||||
if let Ok(results) = Arc::try_unwrap(results) {
|
||||
let mut results = results.into_inner()?;
|
||||
results.sort();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue