Remove unused compression options, add man page installation
- Remove --compress/--algorithm CLI options (not wired to encode flow) - Add man page installation to rpi/setup.sh - Document man page installation in README.md and CLI.md - Update man page to remove compression options Compression will be properly implemented in v4.1.8. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
12
CLI.md
12
CLI.md
@@ -64,6 +64,18 @@ python -c "from stegasoo import has_dct_support; print('DCT:', 'available' if ha
|
|||||||
stegasoo channel show
|
stegasoo channel show
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Man Page
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install man page
|
||||||
|
sudo mkdir -p /usr/local/share/man/man1
|
||||||
|
sudo cp docs/stegasoo.1 /usr/local/share/man/man1/
|
||||||
|
sudo mandb
|
||||||
|
|
||||||
|
# View
|
||||||
|
man stegasoo
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## What's New in v4.1.0
|
## What's New in v4.1.0
|
||||||
|
|||||||
@@ -146,6 +146,7 @@ See [rpi/README.md](rpi/README.md) for manual installation.
|
|||||||
- [UNDER_THE_HOOD.md](UNDER_THE_HOOD.md) - Technical deep-dive
|
- [UNDER_THE_HOOD.md](UNDER_THE_HOOD.md) - Technical deep-dive
|
||||||
- [CHANGELOG.md](CHANGELOG.md) - Version history
|
- [CHANGELOG.md](CHANGELOG.md) - Version history
|
||||||
- [CONTRIBUTING.md](CONTRIBUTING.md) - Contributor guide
|
- [CONTRIBUTING.md](CONTRIBUTING.md) - Contributor guide
|
||||||
|
- `man stegasoo` - Man page (install: `sudo cp docs/stegasoo.1 /usr/local/share/man/man1/ && sudo mandb`)
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
@@ -57,12 +57,6 @@ Passphrase (recommend 4+ words). Prompts if not provided.
|
|||||||
.B \-\-pin " " \fITEXT\fR
|
.B \-\-pin " " \fITEXT\fR
|
||||||
PIN code. Prompts if not provided.
|
PIN code. Prompts if not provided.
|
||||||
.TP
|
.TP
|
||||||
.B \-\-compress\fR/\fB\-\-no\-compress
|
|
||||||
Enable/disable compression (default: enabled).
|
|
||||||
.TP
|
|
||||||
.B \-\-algorithm " " [\fIzlib\fR|\fIlz4\fR|\fInone\fR]
|
|
||||||
Compression algorithm.
|
|
||||||
.TP
|
|
||||||
.B \-\-dry\-run
|
.B \-\-dry\-run
|
||||||
Show capacity usage without encoding.
|
Show capacity usage without encoding.
|
||||||
.PP
|
.PP
|
||||||
@@ -143,7 +137,7 @@ Encode message into multiple images.
|
|||||||
[\fIoptions\fR]
|
[\fIoptions\fR]
|
||||||
.PP
|
.PP
|
||||||
Options: \fB\-m\fR, \fB\-f\fR, \fB\-o\fR/\fB\-\-output\-dir\fR, \fB\-\-suffix\fR, \fB\-\-passphrase\fR, \fB\-\-pin\fR,
|
Options: \fB\-m\fR, \fB\-f\fR, \fB\-o\fR/\fB\-\-output\-dir\fR, \fB\-\-suffix\fR, \fB\-\-passphrase\fR, \fB\-\-pin\fR,
|
||||||
\fB\-\-compress\fR, \fB\-\-algorithm\fR, \fB\-r\fR/\fB\-\-recursive\fR, \fB\-j\fR/\fB\-\-jobs\fR, \fB\-v\fR/\fB\-\-verbose\fR.
|
\fB\-r\fR/\fB\-\-recursive\fR, \fB\-j\fR/\fB\-\-jobs\fR, \fB\-v\fR/\fB\-\-verbose\fR.
|
||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
.B batch decode
|
.B batch decode
|
||||||
|
|||||||
@@ -428,6 +428,14 @@ if [ -f "$INSTALL_DIR/rpi/skel/.bashrc" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Install man page
|
||||||
|
if [ -f "$INSTALL_DIR/docs/stegasoo.1" ]; then
|
||||||
|
sudo mkdir -p /usr/local/share/man/man1
|
||||||
|
sudo cp "$INSTALL_DIR/docs/stegasoo.1" /usr/local/share/man/man1/
|
||||||
|
sudo mandb -q 2>/dev/null || true
|
||||||
|
echo " Installed man page (man stegasoo)"
|
||||||
|
fi
|
||||||
|
|
||||||
echo -e "${GREEN}[12/12]${NC} Setting up login banner..."
|
echo -e "${GREEN}[12/12]${NC} Setting up login banner..."
|
||||||
|
|
||||||
# Create dynamic MOTD script
|
# Create dynamic MOTD script
|
||||||
|
|||||||
@@ -80,12 +80,6 @@ from .batch import (
|
|||||||
batch_capacity_check,
|
batch_capacity_check,
|
||||||
print_batch_result,
|
print_batch_result,
|
||||||
)
|
)
|
||||||
from .compression import (
|
|
||||||
HAS_LZ4,
|
|
||||||
CompressionAlgorithm,
|
|
||||||
algorithm_name,
|
|
||||||
get_available_algorithms,
|
|
||||||
)
|
|
||||||
from .constants import (
|
from .constants import (
|
||||||
DEFAULT_PASSPHRASE_WORDS, # v3.2.0: renamed from DEFAULT_PHRASE_WORDS
|
DEFAULT_PASSPHRASE_WORDS, # v3.2.0: renamed from DEFAULT_PHRASE_WORDS
|
||||||
DEFAULT_PIN_LENGTH,
|
DEFAULT_PIN_LENGTH,
|
||||||
@@ -183,19 +177,10 @@ def cli(ctx, json_output):
|
|||||||
help="Passphrase (recommend 4+ words)",
|
help="Passphrase (recommend 4+ words)",
|
||||||
)
|
)
|
||||||
@click.option("--pin", prompt=True, hide_input=True, confirmation_prompt=True, help="PIN code")
|
@click.option("--pin", prompt=True, hide_input=True, confirmation_prompt=True, help="PIN code")
|
||||||
@click.option(
|
|
||||||
"--compress/--no-compress", default=True, help="Enable/disable compression (default: enabled)"
|
|
||||||
)
|
|
||||||
@click.option(
|
|
||||||
"--algorithm",
|
|
||||||
type=click.Choice(["zlib", "lz4", "none"]),
|
|
||||||
default="zlib",
|
|
||||||
help="Compression algorithm",
|
|
||||||
)
|
|
||||||
@click.option("--dry-run", is_flag=True, help="Show capacity usage without encoding")
|
@click.option("--dry-run", is_flag=True, help="Show capacity usage without encoding")
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
def encode(
|
def encode(
|
||||||
ctx, carrier, reference, message, file_payload, output, passphrase, pin, compress, algorithm, dry_run
|
ctx, carrier, reference, message, file_payload, output, passphrase, pin, dry_run
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Encode a message or file into an image.
|
Encode a message or file into an image.
|
||||||
@@ -214,18 +199,6 @@ def encode(
|
|||||||
if not message and not file_payload:
|
if not message and not file_payload:
|
||||||
raise click.UsageError("Either --message or --file is required")
|
raise click.UsageError("Either --message or --file is required")
|
||||||
|
|
||||||
# Parse compression algorithm
|
|
||||||
algo_map = {
|
|
||||||
"zlib": CompressionAlgorithm.ZLIB,
|
|
||||||
"lz4": CompressionAlgorithm.LZ4,
|
|
||||||
"none": CompressionAlgorithm.NONE,
|
|
||||||
}
|
|
||||||
compression_algo = algo_map[algorithm] if compress else CompressionAlgorithm.NONE
|
|
||||||
|
|
||||||
if algorithm == "lz4" and not HAS_LZ4:
|
|
||||||
click.echo("Warning: LZ4 not available, falling back to zlib", err=True)
|
|
||||||
compression_algo = CompressionAlgorithm.ZLIB
|
|
||||||
|
|
||||||
# Calculate payload size
|
# Calculate payload size
|
||||||
if file_payload:
|
if file_payload:
|
||||||
payload_size = Path(file_payload).stat().st_size
|
payload_size = Path(file_payload).stat().st_size
|
||||||
@@ -247,7 +220,6 @@ def encode(
|
|||||||
"capacity_bytes": capacity_bytes,
|
"capacity_bytes": capacity_bytes,
|
||||||
"payload_type": payload_type,
|
"payload_type": payload_type,
|
||||||
"payload_size": payload_size,
|
"payload_size": payload_size,
|
||||||
"compression": algorithm_name(compression_algo),
|
|
||||||
"usage_percent": round(payload_size / capacity_bytes * 100, 1),
|
"usage_percent": round(payload_size / capacity_bytes * 100, 1),
|
||||||
"fits": payload_size < capacity_bytes,
|
"fits": payload_size < capacity_bytes,
|
||||||
}
|
}
|
||||||
@@ -259,7 +231,6 @@ def encode(
|
|||||||
click.echo(f"Reference: {reference}")
|
click.echo(f"Reference: {reference}")
|
||||||
click.echo(f"Capacity: {capacity_bytes:,} bytes ({capacity_bytes//1024} KB)")
|
click.echo(f"Capacity: {capacity_bytes:,} bytes ({capacity_bytes//1024} KB)")
|
||||||
click.echo(f"Payload: {payload_size:,} bytes ({payload_type})")
|
click.echo(f"Payload: {payload_size:,} bytes ({payload_type})")
|
||||||
click.echo(f"Compression: {algorithm_name(compression_algo)}")
|
|
||||||
click.echo(f"Usage: {result['usage_percent']}%")
|
click.echo(f"Usage: {result['usage_percent']}%")
|
||||||
click.echo(f"Status: {'✓ Fits' if result['fits'] else '✗ Too large'}")
|
click.echo(f"Status: {'✓ Fits' if result['fits'] else '✗ Too large'}")
|
||||||
return
|
return
|
||||||
@@ -306,7 +277,6 @@ def encode(
|
|||||||
"reference": reference,
|
"reference": reference,
|
||||||
"output": output,
|
"output": output,
|
||||||
"payload_type": payload_type,
|
"payload_type": payload_type,
|
||||||
"compression": algorithm_name(compression_algo),
|
|
||||||
},
|
},
|
||||||
indent=2,
|
indent=2,
|
||||||
)
|
)
|
||||||
@@ -314,7 +284,6 @@ def encode(
|
|||||||
else:
|
else:
|
||||||
click.echo(f"✓ Encoded {payload_type} to {output}")
|
click.echo(f"✓ Encoded {payload_type} to {output}")
|
||||||
click.echo(f" Reference: {reference}")
|
click.echo(f" Reference: {reference}")
|
||||||
click.echo(f" Compression: {algorithm_name(compression_algo)}")
|
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if ctx.obj.get("json"):
|
if ctx.obj.get("json"):
|
||||||
@@ -474,13 +443,6 @@ def batch():
|
|||||||
help="Passphrase (recommend 4+ words)",
|
help="Passphrase (recommend 4+ words)",
|
||||||
)
|
)
|
||||||
@click.option("--pin", prompt=True, hide_input=True, confirmation_prompt=True, help="PIN code")
|
@click.option("--pin", prompt=True, hide_input=True, confirmation_prompt=True, help="PIN code")
|
||||||
@click.option("--compress/--no-compress", default=True, help="Enable/disable compression")
|
|
||||||
@click.option(
|
|
||||||
"--algorithm",
|
|
||||||
type=click.Choice(["zlib", "lz4", "none"]),
|
|
||||||
default="zlib",
|
|
||||||
help="Compression algorithm",
|
|
||||||
)
|
|
||||||
@click.option("-r", "--recursive", is_flag=True, help="Search directories recursively")
|
@click.option("-r", "--recursive", is_flag=True, help="Search directories recursively")
|
||||||
@click.option("-j", "--jobs", default=4, help="Parallel workers (default: 4)")
|
@click.option("-j", "--jobs", default=4, help="Parallel workers (default: 4)")
|
||||||
@click.option("-v", "--verbose", is_flag=True, help="Show detailed output")
|
@click.option("-v", "--verbose", is_flag=True, help="Show detailed output")
|
||||||
@@ -494,8 +456,6 @@ def batch_encode(
|
|||||||
suffix,
|
suffix,
|
||||||
passphrase,
|
passphrase,
|
||||||
pin,
|
pin,
|
||||||
compress,
|
|
||||||
algorithm,
|
|
||||||
recursive,
|
recursive,
|
||||||
jobs,
|
jobs,
|
||||||
verbose,
|
verbose,
|
||||||
@@ -530,7 +490,6 @@ def batch_encode(
|
|||||||
output_dir=Path(output_dir) if output_dir else None,
|
output_dir=Path(output_dir) if output_dir else None,
|
||||||
output_suffix=suffix,
|
output_suffix=suffix,
|
||||||
credentials=credentials,
|
credentials=credentials,
|
||||||
compress=compress,
|
|
||||||
recursive=recursive,
|
recursive=recursive,
|
||||||
progress_callback=progress if not ctx.obj.get("json") else None,
|
progress_callback=progress if not ctx.obj.get("json") else None,
|
||||||
)
|
)
|
||||||
@@ -821,10 +780,6 @@ def info(ctx, full):
|
|||||||
"fingerprint": channel_fingerprint,
|
"fingerprint": channel_fingerprint,
|
||||||
"source": channel_source,
|
"source": channel_source,
|
||||||
} if channel_fingerprint else None,
|
} if channel_fingerprint else None,
|
||||||
"compression": {
|
|
||||||
"available": [algorithm_name(a) for a in get_available_algorithms()],
|
|
||||||
"lz4_installed": HAS_LZ4,
|
|
||||||
},
|
|
||||||
"limits": {
|
"limits": {
|
||||||
"max_message_bytes": MAX_MESSAGE_SIZE,
|
"max_message_bytes": MAX_MESSAGE_SIZE,
|
||||||
"max_file_payload_bytes": MAX_FILE_PAYLOAD_SIZE,
|
"max_file_payload_bytes": MAX_FILE_PAYLOAD_SIZE,
|
||||||
|
|||||||
Reference in New Issue
Block a user