Metadata-Version: 2.4
Name: quicktoolbelt
Version: 0.1.0
Summary: A practical Python CLI toolkit for developers: file, text, time, network, and data utilities.
Author: quicktools contributors
License: MIT
Project-URL: Homepage, https://github.com/quicktoolbelt/quicktoolbelt
Project-URL: Repository, https://github.com/quicktoolbelt/quicktoolbelt
Keywords: cli,tools,utilities,developer,productivity
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"

# quicktools

A practical Python CLI toolkit for developers — file, text, time, network, and data utilities at your fingertips.

## Installation

```bash
pip install quicktools
```

Or from source:

```bash
git clone https://github.com/quicktools/quicktools.git
cd quicktools
pip install -e .
```

## Quick Start

```bash
quicktools --help
quicktools file --help
quicktools text --help
quicktools time --help
quicktools network --help
quicktools data --help
```

## Modules

### 1. File Tools (`quicktools file`)

| Command | Description |
|---------|-------------|
| `rename` | Batch rename files with find/replace or regex |
| `search` | Search and replace text across files |
| `split` | Split large files by lines or size |
| `encoding` | Convert file encoding (UTF-8, GBK, etc.) |

**Examples:**

```bash
# Batch rename: replace "old" with "new" in all .txt files
quicktools file rename "*.txt" --find "old" --replace "new"

# Regex rename: add prefix
quicktools file rename "*.jpg" --find "^(.*)$" --replace "photo_\1" --regex --dry-run

# Search and replace in Python files
quicktools file search "src/**/*.py" --find "deprecated_func" --replace "new_func"

# Split a 10GB log file into 100MB chunks
quicktools file split bigfile.log --size 100M --output-dir ./chunks/

# Convert GBK to UTF-8
quicktools file encoding data.csv --from gbk --to utf-8 --output data_utf8.csv
```

### 2. Text Tools (`quicktools text`)

| Command | Description |
|---------|-------------|
| `json` | Format or validate JSON |
| `base64` | Base64 encode/decode |
| `regex` | Test regular expressions |
| `stats` | Text statistics (chars, words, lines) |

**Examples:**

```bash
# Format JSON from file
quicktools text json data.json --indent 4 --sort-keys

# Validate JSON from stdin
cat response.json | quicktools text json - --validate

# Base64 encode
quicktools text base64 encode "Hello World"

# Base64 decode
echo "SGVsbG8gV29ybGQ=" | quicktools text base64 decode -

# Test regex
quicktools text regex "\d{4}-\d{2}-\d{2}" "Date: 2024-01-15"

# Text statistics
quicktools text stats README.md
```

### 3. Time Tools (`quicktools time`)

| Command | Description |
|---------|-------------|
| `ts` | Convert between timestamp and datetime |
| `calc` | Date calculations (add/subtract days, diff) |
| `tz` | Timezone conversion |
| `now` | Show current time |

**Examples:**

```bash
# Convert timestamp to datetime
quicktools time ts 1704067200

# Convert datetime to timestamp
quicktools time ts "2024-01-01 00:00:00"

# Current timestamp
quicktools time ts

# Add 30 days to a date
quicktools time calc 2024-01-01 --add 30

# Days between two dates
quicktools time calc 2024-01-01 --diff 2024-12-31

# Convert UTC to Asia/Shanghai
quicktools time tz "2024-01-01 12:00" --from UTC --to Asia/Shanghai

# Current time in UTC
quicktools time now --utc
```

### 4. Network Tools (`quicktools network`)

| Command | Description |
|---------|-------------|
| `url` | URL encode/decode |
| `portscan` | TCP port scanner |
| `http` | Quick HTTP request test |

**Examples:**

```bash
# URL encode
quicktools network url encode "hello world & more"

# URL decode
quicktools network url decode "hello%20world%20%26%20more"

# Scan common ports
quicktools network portscan example.com

# Scan specific ports
quicktools network portscan 192.168.1.1 --ports 80,443,3000-4000

# HTTP GET request
quicktools network http https://httpbin.org/json

# HTTP POST with data
quicktools network http https://httpbin.org/post --method POST --data '{"key":"value"}' -H "Content-Type:application/json"
```

### 5. Data Tools (`quicktools data`)

| Command | Description |
|---------|-------------|
| `convert` | Convert between CSV and JSON |
| `dedup` | Remove duplicate lines |
| `generate` | Generate random test data |

**Examples:**

```bash
# CSV to JSON
quicktools data convert data.csv --to json --output data.json

# JSON to CSV
quicktools data convert data.json --to csv --output data.csv

# Remove duplicate lines
quicktools data dedup logs.txt --output clean.txt

# Generate random CSV
quicktools data generate csv --count 100 --columns "id,name,email,age,city"

# Generate random JSON
quicktools data generate json --count 50

# Generate random names
quicktools data generate names --count 20

# Generate random numbers
quicktools data generate numbers --count 100

# Generate random dates
quicktools data generate dates --count 30
```

## Requirements

- Python 3.8+

## Development

```bash
# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest
```

## License

MIT
