Skip to content

Commit

Permalink
Merge pull request #93 from chaqchase/fix/fix-plugin-args
Browse files Browse the repository at this point in the history
fix plugin arguments in the readmes and help command for the plugins
  • Loading branch information
chaqchase authored Jan 8, 2025
2 parents e8a482a + 93b3051 commit 1ba0574
Show file tree
Hide file tree
Showing 22 changed files with 69 additions and 67 deletions.
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/categorizer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "categorizer"
description = "Categorizes files based on their extensions and metadata"
version = "0.3.1"
version = "0.3.2"
edition = "2021"

[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions plugins/categorizer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ File categorization plugin for `lla` that organizes files based on extensions, w

```bash
# Add category
lla plugin --name categorizer --action add-category "Images" "yellow" "jpg,png,gif"
lla plugin --name categorizer --action add-category --args "Images" "yellow" "jpg,png,gif"

# Add subcategory
lla plugin --name categorizer --action add-subcategory "Images" "Raster" "jpg,png,gif"
lla plugin --name categorizer --action add-subcategory --args "Images" "Raster" "jpg,png,gif"

# List categories
lla plugin --name categorizer --action list-categories
Expand Down
8 changes: 4 additions & 4 deletions plugins/categorizer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ lazy_static! {
"add-category",
"add-category <name> <color> <ext1,ext2,...> [description]",
"Add a new category",
vec!["lla plugin --name categorizer --action add-category Documents blue txt,doc,pdf \"Text documents\""],
vec!["lla plugin --name categorizer --action add-category --args Documents blue txt,doc,pdf \"Text documents\""],
|args| {
if args.len() < 3 {
return Err("Usage: add-category <name> <color> <ext1,ext2,...> [description]".to_string());
Expand All @@ -45,7 +45,7 @@ lazy_static! {
"add-subcategory",
"add-subcategory <category> <subcategory> <ext1,ext2,...>",
"Add a subcategory to an existing category",
vec!["lla plugin --name categorizer --action add-subcategory Documents Text txt,md"],
vec!["lla plugin --name categorizer --action add-subcategory --args Documents Text txt,md"],
|args| {
if args.len() != 3 {
return Err(
Expand Down Expand Up @@ -132,12 +132,12 @@ lazy_static! {
.add_command(
"add-category".to_string(),
"Add a new category".to_string(),
vec!["lla plugin --name categorizer --action add-category Documents blue txt,doc,pdf \"Text documents\"".to_string()],
vec!["lla plugin --name categorizer --action add-category --args Documents blue txt,doc,pdf \"Text documents\"".to_string()],
)
.add_command(
"add-subcategory".to_string(),
"Add a subcategory to an existing category".to_string(),
vec!["lla plugin --name categorizer --action add-subcategory Documents Text txt,md".to_string()],
vec!["lla plugin --name categorizer --action add-subcategory --args Documents Text txt,md".to_string()],
)
.add_command(
"list-categories".to_string(),
Expand Down
2 changes: 1 addition & 1 deletion plugins/code_complexity/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "code_complexity"
description = "Analyzes code complexity and provides metrics"
version = "0.3.1"
version = "0.3.2"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion plugins/code_complexity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ A code analysis plugin for `lla` that performs real-time complexity analysis of

```bash
# Set complexity thresholds
lla plugin --name code_complexity --action set-thresholds 10 20 30 40
lla plugin --name code_complexity --action set-thresholds --args 10 20 30 40

# Show report
lla plugin --name code_complexity --action show-report
Expand Down
4 changes: 2 additions & 2 deletions plugins/code_complexity/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ lazy_static! {
"set-thresholds",
"set-thresholds <low> <medium> <high> <very-high>",
"Set complexity thresholds",
vec!["lla plugin --name code_complexity --action set-thresholds 10 20 30 40"],
vec!["lla plugin --name code_complexity --action set-thresholds --args 10 20 30 40"],
|args| {
if args.len() != 4 {
return Err(
Expand Down Expand Up @@ -92,7 +92,7 @@ lazy_static! {
"set-thresholds".to_string(),
"Set complexity thresholds".to_string(),
vec![
"lla plugin --name code_complexity --action set-thresholds 10 20 30 40"
"lla plugin --name code_complexity --action set-thresholds --args 10 20 30 40"
.to_string(),
],
)
Expand Down
2 changes: 1 addition & 1 deletion plugins/code_snippet_extractor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "code_snippet_extractor"
version = "0.3.1"
version = "0.3.2"
edition = "2021"
description = "Extract and manage code snippets with tagging support"

Expand Down
14 changes: 7 additions & 7 deletions plugins/code_snippet_extractor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,32 @@ default = "Solarized (dark)"

```bash
# Extract snippet with context
lla plugin --name code_snippet_extractor --action extract "file.rs" "function_name" 10 20 3
lla plugin --name code_snippet_extractor --action extract --args "file.rs" "function_name" 10 20 3

# List snippets
lla plugin --name code_snippet_extractor --action list

# View snippet
lla plugin --name code_snippet_extractor --action get "snippet_id"
lla plugin --name code_snippet_extractor --action get --args "snippet_id"
```

### Organization

```bash
# Add/remove tags
lla plugin --name code_snippet_extractor --action add-tags "snippet_id" "tag1" "tag2"
lla plugin --name code_snippet_extractor --action remove-tags "snippet_id" "tag1"
lla plugin --name code_snippet_extractor --action add-tags --args "snippet_id" "tag1" "tag2"
lla plugin --name code_snippet_extractor --action remove-tags --args "snippet_id" "tag1"

# Category management
lla plugin --name code_snippet_extractor --action set-category "snippet_id" "category_name"
lla plugin --name code_snippet_extractor --action set-category --args "snippet_id" "category_name"
```

### Import/Export

```bash
# Export/Import snippets
lla plugin --name code_snippet_extractor --action export "snippets.json"
lla plugin --name code_snippet_extractor --action import "snippets.json"
lla plugin --name code_snippet_extractor --action export --args "snippets.json"
lla plugin --name code_snippet_extractor --action import --args "snippets.json"
```

## Display Format
Expand Down
2 changes: 1 addition & 1 deletion plugins/dirs_meta/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dirs_meta"
description = "Analyzes directories and shows metadata"
version = "0.3.1"
version = "0.3.2"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion plugins/dirs_meta/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ time = "bright_magenta"

```bash
# Show stats
lla plugin --name dirs_meta --action stats "/path/to/directory"
lla plugin --name dirs_meta --action stats --args "/path/to/directory"

# Clear cache
lla plugin --name dirs_meta --action clear-cache
Expand Down
2 changes: 1 addition & 1 deletion plugins/file_copier/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "file_copier"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
description = "A plugin for lla that provides clipboard functionality for copying files and directories"

Expand Down
12 changes: 6 additions & 6 deletions plugins/file_copier/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ path = "bright_yellow"
lla plugin --name file_copier --action add

# Add files from a specific directory to clipboard
lla plugin --name file_copier --action add /path/to/source
lla plugin --name file_copier --action add --args /path/to/source

# Copy all files from clipboard to current directory
lla plugin --name file_copier --action copy-all

# Copy all files from clipboard to specific directory
lla plugin --name file_copier --action copy-all /path/to/destination
lla plugin --name file_copier --action copy-all --args /path/to/destination

# Copy selected files from clipboard to current directory
lla plugin --name file_copier --action copy-partial

# Copy selected files from clipboard to specific directory
lla plugin --name file_copier --action copy-partial /path/to/destination
lla plugin --name file_copier --action copy-partial --args /path/to/destination
```

### Clipboard Management
Expand All @@ -66,11 +66,11 @@ lla plugin --name file_copier --action help

```bash
# Add files from source directory
lla plugin --name file_copier --action add /path/to/source
lla plugin --name file_copier --action add --args /path/to/source
# Select files to copy using space, confirm with enter

# Copy all files to target directory
lla plugin --name file_copier --action copy-all /path/to/target
lla plugin --name file_copier --action copy-all --args /path/to/target
```

### 2. Copying Files Using Current Directory Navigation
Expand Down Expand Up @@ -100,7 +100,7 @@ lla plugin --name file_copier --action add
# Select files to add to clipboard

# Copy selected files to a specific directory without changing location
lla plugin --name file_copier --action copy-partial /path/to/target
lla plugin --name file_copier --action copy-partial --args /path/to/target
```

## Display Format
Expand Down
13 changes: 7 additions & 6 deletions plugins/file_copier/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ lazy_static! {
"Add files/directories to clipboard from current or specified directory",
vec![
"lla plugin --name file_copier --action add",
"lla plugin --name file_copier --action add /path/to/dir"
"lla plugin --name file_copier --action add --args /path/to/dir"
],
|args| FileCopierPlugin::add_action(args)
);
Expand All @@ -115,7 +115,7 @@ lazy_static! {
"Copy all items from clipboard to current or specified directory",
vec![
"lla plugin --name file_copier --action copy-all",
"lla plugin --name file_copier --action copy-all /path/to/target"
"lla plugin --name file_copier --action copy-all --args /path/to/target"
],
|args| FileCopierPlugin::copy_all_action(args)
);
Expand All @@ -127,7 +127,7 @@ lazy_static! {
"Copy selected items from clipboard to current or specified directory",
vec![
"lla plugin --name file_copier --action copy-partial",
"lla plugin --name file_copier --action copy-partial /path/to/target"
"lla plugin --name file_copier --action copy-partial --args /path/to/target"
],
|args| FileCopierPlugin::copy_partial_action(args)
);
Expand Down Expand Up @@ -402,23 +402,24 @@ impl FileCopierPlugin {
.to_string(),
vec![
"lla plugin --name file_copier --action add".to_string(),
"lla plugin --name file_copier --action add /path/to/dir".to_string(),
"lla plugin --name file_copier --action add --args /path/to/dir".to_string(),
],
)
.add_command(
"copy-all [target_path]".to_string(),
"Copy all items from clipboard to current or specified directory".to_string(),
vec![
"lla plugin --name file_copier --action copy-all".to_string(),
"lla plugin --name file_copier --action copy-all /path/to/target".to_string(),
"lla plugin --name file_copier --action copy-all --args /path/to/target"
.to_string(),
],
)
.add_command(
"copy-partial [target_path]".to_string(),
"Copy selected items from clipboard to current or specified directory".to_string(),
vec![
"lla plugin --name file_copier --action copy-partial".to_string(),
"lla plugin --name file_copier --action copy-partial /path/to/target"
"lla plugin --name file_copier --action copy-partial --args /path/to/target"
.to_string(),
],
);
Expand Down
2 changes: 1 addition & 1 deletion plugins/file_mover/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "file_mover"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
description = "A plugin for lla that provides clipboard functionality for moving files and directories"

Expand Down
12 changes: 6 additions & 6 deletions plugins/file_mover/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ path = "bright_yellow"
lla plugin --name file_mover --action add

# Add files from a specific directory to clipboard
lla plugin --name file_mover --action add /path/to/source
lla plugin --name file_mover --action add --args /path/to/source

# Move all files from clipboard to current directory
lla plugin --name file_mover --action move-all

# Move all files from clipboard to specific directory
lla plugin --name file_mover --action move-all /path/to/destination
lla plugin --name file_mover --action move-all --args /path/to/destination

# Move selected files from clipboard to current directory
lla plugin --name file_mover --action move-partial

# Move selected files from clipboard to specific directory
lla plugin --name file_mover --action move-partial /path/to/destination
lla plugin --name file_mover --action move-partial --args /path/to/destination
```

### Clipboard Management
Expand All @@ -66,11 +66,11 @@ lla plugin --name file_mover --action help

```bash
# Add files from source directory
lla plugin --name file_mover --action add /path/to/source
lla plugin --name file_mover --action add --args /path/to/source
# Select files to move using space, confirm with enter

# Move all files to target directory
lla plugin --name file_mover --action move-all /path/to/target
lla plugin --name file_mover --action move-all --args /path/to/target
```

### 2. Moving Files Using Current Directory Navigation
Expand Down Expand Up @@ -100,7 +100,7 @@ lla plugin --name file_mover --action add
# Select files to add to clipboard

# Move selected files to a specific directory without changing location
lla plugin --name file_mover --action move-partial /path/to/target
lla plugin --name file_mover --action move-partial --args /path/to/target
```

## Display Format
Expand Down
Loading

0 comments on commit 1ba0574

Please sign in to comment.