cloudflare-images-migrator 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cloudflare_images_migrator-1.0.0.dist-info/METADATA +474 -0
- cloudflare_images_migrator-1.0.0.dist-info/RECORD +17 -0
- cloudflare_images_migrator-1.0.0.dist-info/WHEEL +5 -0
- cloudflare_images_migrator-1.0.0.dist-info/entry_points.txt +3 -0
- cloudflare_images_migrator-1.0.0.dist-info/licenses/LICENSE +21 -0
- cloudflare_images_migrator-1.0.0.dist-info/top_level.txt +1 -0
- src/__init__.py +1 -0
- src/audit.py +620 -0
- src/cloudflare_client.py +746 -0
- src/config.py +161 -0
- src/image_tracker.py +405 -0
- src/logger.py +160 -0
- src/migrator.py +491 -0
- src/parsers.py +609 -0
- src/quality.py +558 -0
- src/security.py +528 -0
- src/utils.py +355 -0
@@ -0,0 +1,474 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: cloudflare-images-migrator
|
3
|
+
Version: 1.0.0
|
4
|
+
Summary: Enterprise-grade tool to migrate images to Cloudflare Images with persistent tracking and duplicate detection
|
5
|
+
Home-page: https://github.com/mariolqn/Cloudflare-Images-Migrator
|
6
|
+
Author: Mario Quinones
|
7
|
+
Author-email: Mario Lemos Quirino Neto <mariolqn@users.noreply.github.com>
|
8
|
+
License: MIT
|
9
|
+
Project-URL: Homepage, https://github.com/mariolqn/Cloudflare-Images-Migrator
|
10
|
+
Project-URL: Bug Tracker, https://github.com/mariolqn/Cloudflare-Images-Migrator/issues
|
11
|
+
Project-URL: Documentation, https://github.com/mariolqn/Cloudflare-Images-Migrator#readme
|
12
|
+
Project-URL: Source Code, https://github.com/mariolqn/Cloudflare-Images-Migrator
|
13
|
+
Keywords: cloudflare,images,migration,cdn,optimization,duplicate-detection,enterprise,security,tracking,automation
|
14
|
+
Classifier: Development Status :: 5 - Production/Stable
|
15
|
+
Classifier: Intended Audience :: Developers
|
16
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
17
|
+
Classifier: Topic :: Multimedia :: Graphics
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
19
|
+
Classifier: Topic :: System :: Archiving :: Backup
|
20
|
+
Classifier: License :: OSI Approved :: MIT License
|
21
|
+
Classifier: Programming Language :: Python :: 3
|
22
|
+
Classifier: Programming Language :: Python :: 3.8
|
23
|
+
Classifier: Programming Language :: Python :: 3.9
|
24
|
+
Classifier: Programming Language :: Python :: 3.10
|
25
|
+
Classifier: Programming Language :: Python :: 3.11
|
26
|
+
Classifier: Programming Language :: Python :: 3.12
|
27
|
+
Classifier: Operating System :: OS Independent
|
28
|
+
Classifier: Environment :: Console
|
29
|
+
Requires-Python: >=3.8
|
30
|
+
Description-Content-Type: text/markdown
|
31
|
+
License-File: LICENSE
|
32
|
+
Requires-Dist: requests>=2.28.0
|
33
|
+
Requires-Dist: pillow>=9.0.0
|
34
|
+
Requires-Dist: tqdm>=4.64.0
|
35
|
+
Requires-Dist: colorama>=0.4.4
|
36
|
+
Requires-Dist: pyyaml>=6.0
|
37
|
+
Requires-Dist: python-magic>=0.4.24
|
38
|
+
Requires-Dist: beautifulsoup4>=4.11.0
|
39
|
+
Requires-Dist: python-dotenv>=0.19.0
|
40
|
+
Provides-Extra: dev
|
41
|
+
Requires-Dist: pytest>=6.0; extra == "dev"
|
42
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
43
|
+
Requires-Dist: black; extra == "dev"
|
44
|
+
Requires-Dist: flake8; extra == "dev"
|
45
|
+
Requires-Dist: mypy; extra == "dev"
|
46
|
+
Dynamic: author
|
47
|
+
Dynamic: home-page
|
48
|
+
Dynamic: license-file
|
49
|
+
Dynamic: requires-python
|
50
|
+
|
51
|
+
# Cloudflare Images Migration Tool
|
52
|
+
|
53
|
+
A powerful Python tool to automatically migrate all images in a codebase to Cloudflare Images, replacing local and external image references with optimized Cloudflare URLs.
|
54
|
+
|
55
|
+
## Features
|
56
|
+
|
57
|
+
### 🔒 **Enterprise Security & Quality**
|
58
|
+
- **Advanced Threat Detection**: Multi-layer security validation with malware scanning
|
59
|
+
- **File Signature Verification**: Magic byte validation and MIME type checking
|
60
|
+
- **Content Security Scanning**: Deep analysis for malicious patterns and XSS threats
|
61
|
+
- **URL Security Validation**: HTTPS enforcement and domain reputation checking
|
62
|
+
- **EXIF Data Sanitization**: Removes potentially sensitive metadata
|
63
|
+
- **Rate Limiting Protection**: Prevents abuse and ensures compliance
|
64
|
+
- **Premium Image Optimization**: AI-powered quality enhancement and compression
|
65
|
+
- **Responsive Variants**: Automatic generation of multiple image sizes
|
66
|
+
- **Enterprise Audit Logging**: SOX, GDPR, HIPAA, PCI DSS compliance support
|
67
|
+
|
68
|
+
### 📊 **Enterprise Tracking & Deduplication**
|
69
|
+
- **Persistent Duplicate Detection**: Never re-uploads the same image across sessions
|
70
|
+
- **Comprehensive Tracking Database**: SQLite database with full metadata storage
|
71
|
+
- **CSV Export Support**: Export migration data for spreadsheet analysis
|
72
|
+
- **Session Tracking**: Unique migration IDs for audit trails
|
73
|
+
- **Cross-Session Statistics**: Performance metrics across multiple runs
|
74
|
+
- **Multi-Level Duplicate Detection**: File hash, URL hash, and path matching
|
75
|
+
- **Cloudflare Library Integration**: Checks existing images before uploading
|
76
|
+
|
77
|
+
### 🚀 **Core Migration Features**
|
78
|
+
- **Enhanced Image Detection**: Finds badges, GitHub assets, CDN images, and traditional formats
|
79
|
+
- **Multi-Format Parsing**: Supports HTML, CSS, JavaScript, TypeScript, Markdown, JSON, and more
|
80
|
+
- **Batch Processing**: Efficiently uploads multiple images with progress tracking
|
81
|
+
- **Smart Deduplication**: Avoids duplicate uploads using content hashing
|
82
|
+
- **Zip Support**: Works with both directories and zip files
|
83
|
+
- **Safe Operation**: Creates backups and supports dry-run mode
|
84
|
+
- **Colored Logging**: Beautiful console output with progress bars
|
85
|
+
- **Flexible Configuration**: Environment variables, config files, or command-line options
|
86
|
+
|
87
|
+
## Installation
|
88
|
+
|
89
|
+
1. **Clone or download this repository**
|
90
|
+
2. **Install dependencies**:
|
91
|
+
```bash
|
92
|
+
pip install -r requirements.txt
|
93
|
+
```
|
94
|
+
|
95
|
+
## Prerequisites
|
96
|
+
|
97
|
+
Before using the tool, you need:
|
98
|
+
|
99
|
+
1. **Cloudflare Account ID**: Found in your Cloudflare dashboard
|
100
|
+
2. **Cloudflare API Token**: Create one with Images permissions
|
101
|
+
|
102
|
+
### Getting Your Credentials
|
103
|
+
|
104
|
+
1. **Account ID**:
|
105
|
+
- Go to [Cloudflare Dashboard](https://dash.cloudflare.com/)
|
106
|
+
- Select your account
|
107
|
+
- Find "Account ID" in the right sidebar
|
108
|
+
|
109
|
+
2. **API Token**:
|
110
|
+
- Go to [Cloudflare API Tokens](https://dash.cloudflare.com/profile/api-tokens)
|
111
|
+
- Click "Create Token"
|
112
|
+
- Use "Custom token" template
|
113
|
+
- Add permissions: `Cloudflare Images:Edit`
|
114
|
+
- Choose your account in "Account Resources"
|
115
|
+
|
116
|
+
## Usage
|
117
|
+
|
118
|
+
### Basic Usage
|
119
|
+
|
120
|
+
```bash
|
121
|
+
python main.py /path/to/your/codebase --account-id YOUR_ACCOUNT_ID --api-token YOUR_API_TOKEN
|
122
|
+
```
|
123
|
+
|
124
|
+
### Tracking & Statistics
|
125
|
+
|
126
|
+
```bash
|
127
|
+
# Show comprehensive statistics
|
128
|
+
python main.py /path/to/your/codebase --show-stats
|
129
|
+
|
130
|
+
# Export migration data to CSV
|
131
|
+
python main.py /path/to/your/codebase --export-csv ./migration-data.csv
|
132
|
+
|
133
|
+
# View statistics without running migration
|
134
|
+
python main.py --show-stats
|
135
|
+
```
|
136
|
+
|
137
|
+
### Using Environment Variables
|
138
|
+
|
139
|
+
```bash
|
140
|
+
export CLOUDFLARE_ACCOUNT_ID="your_account_id"
|
141
|
+
export CLOUDFLARE_API_TOKEN="your_api_token"
|
142
|
+
python main.py /path/to/your/codebase
|
143
|
+
```
|
144
|
+
|
145
|
+
### Using Configuration File
|
146
|
+
|
147
|
+
Create a `config.yaml` file:
|
148
|
+
|
149
|
+
```yaml
|
150
|
+
account_id: "your_account_id"
|
151
|
+
api_token: "your_api_token"
|
152
|
+
dry_run: false
|
153
|
+
backup: true
|
154
|
+
batch_size: 10
|
155
|
+
```
|
156
|
+
|
157
|
+
Then run:
|
158
|
+
|
159
|
+
```bash
|
160
|
+
python main.py /path/to/your/codebase --config-file config.yaml
|
161
|
+
```
|
162
|
+
|
163
|
+
## Command Line Options
|
164
|
+
|
165
|
+
| Option | Description | Default |
|
166
|
+
|--------|-------------|---------|
|
167
|
+
| `--account-id` | Cloudflare Account ID | Required |
|
168
|
+
| `--api-token` | Cloudflare API Token | Required |
|
169
|
+
| `--output-dir` | Output directory for results | Auto-generated |
|
170
|
+
| `--dry-run` | Preview changes without making them | False |
|
171
|
+
| `--backup/--no-backup` | Create backup before modifying | True |
|
172
|
+
| `--config-file` | Path to configuration file | None |
|
173
|
+
| `--verbose, -v` | Enable verbose logging | False |
|
174
|
+
| `--file-types` | Comma-separated file extensions | Auto-detected |
|
175
|
+
| `--exclude-dirs` | Comma-separated directories to exclude | Common build dirs |
|
176
|
+
| `--show-stats` | Display comprehensive statistics | False |
|
177
|
+
| `--export-csv` | Export migration data to CSV file | None |
|
178
|
+
|
179
|
+
## Examples
|
180
|
+
|
181
|
+
### Tracking & Statistics Examples
|
182
|
+
```bash
|
183
|
+
# View comprehensive statistics
|
184
|
+
python main.py --show-stats
|
185
|
+
|
186
|
+
# Export migration history to CSV
|
187
|
+
python main.py --export-csv ./my-migration-data.csv
|
188
|
+
|
189
|
+
# Run migration with statistics display
|
190
|
+
python main.py ./my-website --show-stats --verbose
|
191
|
+
```
|
192
|
+
|
193
|
+
### Dry Run (Preview Changes)
|
194
|
+
```bash
|
195
|
+
python main.py ./my-website --dry-run --verbose
|
196
|
+
```
|
197
|
+
|
198
|
+
### Process Specific File Types
|
199
|
+
```bash
|
200
|
+
python main.py ./project --file-types=".html,.css,.js"
|
201
|
+
```
|
202
|
+
|
203
|
+
### Exclude Directories
|
204
|
+
```bash
|
205
|
+
python main.py ./app --exclude-dirs="node_modules,dist,build"
|
206
|
+
```
|
207
|
+
|
208
|
+
### Process Zip File
|
209
|
+
```bash
|
210
|
+
python main.py ./website-backup.zip --output-dir ./migrated-website
|
211
|
+
```
|
212
|
+
|
213
|
+
### Enterprise Security Examples
|
214
|
+
```bash
|
215
|
+
# Maximum security with audit report
|
216
|
+
python main.py ./project --security-level enterprise --generate-security-report
|
217
|
+
|
218
|
+
# Premium quality optimization
|
219
|
+
python main.py ./images --optimization-level aggressive --security-level enterprise
|
220
|
+
|
221
|
+
# Compliance-focused migration with tracking
|
222
|
+
python main.py ./app --security-level enterprise --backup --verbose --show-stats
|
223
|
+
```
|
224
|
+
|
225
|
+
## Supported File Types
|
226
|
+
|
227
|
+
The tool automatically detects and processes these file types:
|
228
|
+
|
229
|
+
- **Web Files**: `.html`, `.htm`, `.css`, `.js`, `.jsx`, `.ts`, `.tsx`
|
230
|
+
- **Documentation**: `.md`, `.markdown`
|
231
|
+
- **Configuration**: `.json`, `.xml`, `.yaml`, `.yml`
|
232
|
+
- **Stylesheets**: `.scss`, `.sass`, `.less`
|
233
|
+
|
234
|
+
## Enhanced Image Detection
|
235
|
+
|
236
|
+
The tool now detects a wide variety of image types:
|
237
|
+
|
238
|
+
### **Traditional Images**
|
239
|
+
- PNG, JPEG, GIF, WebP, SVG, BMP, ICO with file extensions
|
240
|
+
|
241
|
+
### **Badge Services**
|
242
|
+
- Shield.io badges (`img.shields.io`)
|
243
|
+
- GitHub status badges
|
244
|
+
- NPM badges
|
245
|
+
- Travis CI badges
|
246
|
+
- And many more badge services
|
247
|
+
|
248
|
+
### **GitHub Assets**
|
249
|
+
- GitHub raw content (`raw.githubusercontent.com`)
|
250
|
+
- GitHub user content (`user-images.githubusercontent.com`)
|
251
|
+
- GitHub assets (`github.com/*/assets/`)
|
252
|
+
|
253
|
+
### **CDN Images**
|
254
|
+
- Images served from CDNs without traditional extensions
|
255
|
+
- Image-like paths (containing 'icon', 'logo', 'banner', etc.)
|
256
|
+
- URLs with image-like query parameters
|
257
|
+
|
258
|
+
## Supported Image Formats
|
259
|
+
|
260
|
+
- PNG, JPEG, GIF, WebP, SVG, BMP, ICO
|
261
|
+
- Maximum file size: 10MB
|
262
|
+
- Maximum dimensions: 12,000 pixels
|
263
|
+
- Maximum area: 100 megapixels
|
264
|
+
|
265
|
+
## Configuration File Format
|
266
|
+
|
267
|
+
Create a `config.yaml` file with these options:
|
268
|
+
|
269
|
+
```yaml
|
270
|
+
# Required
|
271
|
+
account_id: "your_cloudflare_account_id"
|
272
|
+
api_token: "your_cloudflare_api_token"
|
273
|
+
|
274
|
+
# Optional
|
275
|
+
dry_run: false
|
276
|
+
backup: true
|
277
|
+
batch_size: 10
|
278
|
+
retry_count: 3
|
279
|
+
timeout: 30
|
280
|
+
|
281
|
+
# File processing
|
282
|
+
file_types:
|
283
|
+
- ".html"
|
284
|
+
- ".css"
|
285
|
+
- ".js"
|
286
|
+
- ".jsx"
|
287
|
+
- ".ts"
|
288
|
+
- ".tsx"
|
289
|
+
- ".md"
|
290
|
+
- ".json"
|
291
|
+
|
292
|
+
exclude_dirs:
|
293
|
+
- "node_modules"
|
294
|
+
- ".git"
|
295
|
+
- "dist"
|
296
|
+
- "build"
|
297
|
+
```
|
298
|
+
|
299
|
+
## How It Works
|
300
|
+
|
301
|
+
1. **📁 Preparation**: Extracts zip files if needed, creates backups
|
302
|
+
2. **🔍 Enhanced Scanning**: Recursively scans files for all types of image references
|
303
|
+
3. **🎯 Duplicate Detection**: Checks against existing Cloudflare Images and local database
|
304
|
+
4. **🚀 Smart Upload**: Uploads only new, unique images to Cloudflare Images
|
305
|
+
5. **📊 Tracking**: Records all metadata in persistent SQLite database
|
306
|
+
6. **✏️ Replacement**: Replaces old references with Cloudflare URLs
|
307
|
+
7. **📋 Comprehensive Report**: Provides detailed migration statistics and history
|
308
|
+
|
309
|
+
## Tracking & Statistics
|
310
|
+
|
311
|
+
### **Migration Database**
|
312
|
+
The tool maintains a persistent SQLite database (`cloudflare_images.db`) that tracks:
|
313
|
+
- Every image processed across all sessions
|
314
|
+
- File metadata (size, dimensions, format, quality)
|
315
|
+
- Upload timestamps and session IDs
|
316
|
+
- Cloudflare URLs and variants
|
317
|
+
- File hashes for duplicate detection
|
318
|
+
- Performance metrics and statistics
|
319
|
+
|
320
|
+
### **Statistics Display**
|
321
|
+
Use `--show-stats` to see:
|
322
|
+
- **Session Statistics**: Current migration metrics
|
323
|
+
- **Total Statistics**: All-time migration history
|
324
|
+
- **Performance Metrics**: Average upload times, success rates
|
325
|
+
- **Duplicate Prevention**: Images skipped due to existing uploads
|
326
|
+
- **Size Optimization**: Compression ratios and savings
|
327
|
+
|
328
|
+
### **CSV Export**
|
329
|
+
Export your migration data with `--export-csv filename.csv`:
|
330
|
+
- Complete migration history
|
331
|
+
- File metadata and performance metrics
|
332
|
+
- Timestamps and session tracking
|
333
|
+
- Cloudflare URLs and variants
|
334
|
+
- Perfect for reporting and analysis
|
335
|
+
|
336
|
+
## Output
|
337
|
+
|
338
|
+
### **Enhanced Output Example**
|
339
|
+
|
340
|
+
```
|
341
|
+
15:30:45 - INFO - Starting migration of: ./my-website
|
342
|
+
15:30:45 - INFO - ✓ Successfully connected to Cloudflare Images API
|
343
|
+
15:30:45 - INFO - ✓ Loaded 1,250 existing Cloudflare Images for duplicate detection
|
344
|
+
15:30:45 - INFO - ✓ Connected to tracking database (3,847 images tracked)
|
345
|
+
15:30:45 - INFO - Created backup: ./my-website_backup
|
346
|
+
15:30:45 - INFO - Phase 1: Enhanced scanning for image references...
|
347
|
+
Scanning files: 100%|██████████| 150/150 [00:02<00:00, 75.0it/s]
|
348
|
+
15:30:47 - INFO - Found 156 image references (45 unique, 111 duplicates)
|
349
|
+
15:30:47 - INFO - Phase 2: Smart uploading with duplicate detection...
|
350
|
+
Uploading images: 100%|██████████| 23/23 [00:15<00:00, 1.5it/s]
|
351
|
+
15:31:02 - INFO - Upload complete: 23/23 images uploaded (100.0% success rate)
|
352
|
+
15:31:02 - INFO - Phase 3: Replacing image references in code...
|
353
|
+
Modifying files: 100%|██████████| 12/12 [00:01<00:00, 10.0it/s]
|
354
|
+
|
355
|
+
==================================================
|
356
|
+
Migration Summary
|
357
|
+
==================================================
|
358
|
+
Files processed: 150
|
359
|
+
Images found: 156 (45 unique, 111 duplicates)
|
360
|
+
Images uploaded: 23 (0 skipped as duplicates)
|
361
|
+
Files modified: 12
|
362
|
+
URLs replaced: 156
|
363
|
+
Average file size reduction: 45.2%
|
364
|
+
Time elapsed: 0:00:17
|
365
|
+
|
366
|
+
Session Statistics:
|
367
|
+
- New images uploaded: 23
|
368
|
+
- Duplicate images skipped: 0
|
369
|
+
- Security threats blocked: 0
|
370
|
+
- Quality optimizations applied: 23
|
371
|
+
|
372
|
+
Total Statistics (All Sessions):
|
373
|
+
- Total images tracked: 3,870
|
374
|
+
- Total migrations completed: 47
|
375
|
+
- Total file size saved: 2.3 GB
|
376
|
+
- Average success rate: 99.2%
|
377
|
+
==================================================
|
378
|
+
|
379
|
+
✓ Tracking data saved to: cloudflare_images.db
|
380
|
+
✓ Migration completed successfully!
|
381
|
+
```
|
382
|
+
|
383
|
+
## Troubleshooting
|
384
|
+
|
385
|
+
### Common Issues
|
386
|
+
|
387
|
+
1. **"Failed to connect to Cloudflare Images API"**
|
388
|
+
- Check your account ID and API token
|
389
|
+
- Ensure API token has Images permissions
|
390
|
+
- Verify internet connection
|
391
|
+
|
392
|
+
2. **"Database locked" errors**
|
393
|
+
- Ensure no other migration processes are running
|
394
|
+
- Check database file permissions
|
395
|
+
- Consider running with `--verbose` for more details
|
396
|
+
|
397
|
+
3. **"File too large" errors**
|
398
|
+
- Cloudflare Images has a 10MB limit per image
|
399
|
+
- Consider optimizing large images before migration
|
400
|
+
|
401
|
+
4. **"No image references found"**
|
402
|
+
- Check if file types are supported
|
403
|
+
- Use `--verbose` to see detailed scanning logs
|
404
|
+
- Verify exclude directories aren't too broad
|
405
|
+
|
406
|
+
5. **Duplicate detection issues**
|
407
|
+
- Check if images were previously uploaded with different settings
|
408
|
+
- Use `--show-stats` to see duplicate detection statistics
|
409
|
+
- Consider clearing the tracking database if needed
|
410
|
+
|
411
|
+
### Advanced Troubleshooting
|
412
|
+
|
413
|
+
```bash
|
414
|
+
# View detailed statistics
|
415
|
+
python main.py --show-stats --verbose
|
416
|
+
|
417
|
+
# Export data for analysis
|
418
|
+
python main.py --export-csv debug-data.csv
|
419
|
+
|
420
|
+
# Check database status
|
421
|
+
python main.py --show-stats # Shows database statistics
|
422
|
+
```
|
423
|
+
|
424
|
+
### Getting Help
|
425
|
+
|
426
|
+
- Use `--verbose` flag for detailed logging
|
427
|
+
- Check the generated log file for full operation details
|
428
|
+
- Use `--show-stats` to understand tracking database status
|
429
|
+
- Export CSV data for external analysis
|
430
|
+
|
431
|
+
## Environment Variables
|
432
|
+
|
433
|
+
You can set these environment variables instead of using command-line options:
|
434
|
+
|
435
|
+
- `CLOUDFLARE_ACCOUNT_ID` or `CF_ACCOUNT_ID`
|
436
|
+
- `CLOUDFLARE_API_TOKEN` or `CF_API_TOKEN`
|
437
|
+
|
438
|
+
## Security Notes
|
439
|
+
|
440
|
+
- Never commit API tokens to version control
|
441
|
+
- Use environment variables or config files with proper permissions
|
442
|
+
- The tool only reads from source files and uploads to Cloudflare
|
443
|
+
- Backups are created locally for safety
|
444
|
+
- Tracking database contains metadata only, no sensitive data
|
445
|
+
|
446
|
+
## Database Management
|
447
|
+
|
448
|
+
The tool creates a `cloudflare_images.db` SQLite database to track:
|
449
|
+
- All processed images and their metadata
|
450
|
+
- Migration sessions and timestamps
|
451
|
+
- Duplicate detection hashes
|
452
|
+
- Performance statistics
|
453
|
+
|
454
|
+
### Database Location
|
455
|
+
- Default: `./cloudflare_images.db` in the current directory
|
456
|
+
- Contains no sensitive data (API tokens, personal info)
|
457
|
+
- Safe to backup and share for analysis
|
458
|
+
|
459
|
+
## Contributing
|
460
|
+
|
461
|
+
This tool is designed to be extensible:
|
462
|
+
|
463
|
+
- Add new file type parsers in `src/parsers.py`
|
464
|
+
- Extend configuration options in `src/config.py`
|
465
|
+
- Add new utility functions in `src/utils.py`
|
466
|
+
- Enhance tracking features in `src/image_tracker.py`
|
467
|
+
|
468
|
+
## License
|
469
|
+
|
470
|
+
This project is provided as-is for educational and practical use.
|
471
|
+
|
472
|
+
---
|
473
|
+
|
474
|
+
**Made with ❤️ for the Cloudflare Images community**
|
@@ -0,0 +1,17 @@
|
|
1
|
+
cloudflare_images_migrator-1.0.0.dist-info/licenses/LICENSE,sha256=q_GOanS_whxguhI63ykZMgb0fFhm42mVN1IGXR9tUdo,1081
|
2
|
+
src/__init__.py,sha256=bwslfUk2uqWfV7_zaL2ps3Uu5CgfPQwNkyolEyV_AtA,35
|
3
|
+
src/audit.py,sha256=nfd1U2JL8eNlAylCiRdtw9zSoacYrGJG_AHysIHLK7k,24170
|
4
|
+
src/cloudflare_client.py,sha256=RcoLzrlaE91XXJtlWml4WFsYk2gCXYrvN8ts-G8Xrfs,30923
|
5
|
+
src/config.py,sha256=nApsCEK7ktXoZ8PYR1lWy1Mh9aKcJ5kWSR4cJHtLqQM,5851
|
6
|
+
src/image_tracker.py,sha256=zEsnUjkJqUIsguoNV3dd9Du2XfFtIwUYWJaNeuD_Z74,18336
|
7
|
+
src/logger.py,sha256=s23PzChAcdPCo4ea6hPW55zN31VItWwdkHOAe6d6yZM,5656
|
8
|
+
src/migrator.py,sha256=FzmtBIltd6gLgeHNO0x7fmh4YrlrZfbGXpmWD0ZI_IM,21245
|
9
|
+
src/parsers.py,sha256=bPs-d9VipElW5sB_Pv1a-trCINaes4kV19u9mPbBPe8,24834
|
10
|
+
src/quality.py,sha256=_LsiAekbsZqE7FUySLGNOqx3_TczTVweZSv1hvS0IBU,22225
|
11
|
+
src/security.py,sha256=fLKFmJnmvUK0ESECfzQMG9JNgyi-HuxAveroeAHJtok,20968
|
12
|
+
src/utils.py,sha256=HIquvYns9dkG-JXuLC9AxhAmoMYPJTMQVuF36zoDQvM,8572
|
13
|
+
cloudflare_images_migrator-1.0.0.dist-info/METADATA,sha256=wJNY1TiIKU9iKc40ub59BghgsRMt1_Q-7MRNQAWM8q8,15564
|
14
|
+
cloudflare_images_migrator-1.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
15
|
+
cloudflare_images_migrator-1.0.0.dist-info/entry_points.txt,sha256=37pDOXye2Gcvq0RGjeK_umDvwFF5oj74fL3YAHBPFkc,87
|
16
|
+
cloudflare_images_migrator-1.0.0.dist-info/top_level.txt,sha256=74rtVfumQlgAPzR5_2CgYN24MB0XARCg0t-gzk6gTrM,4
|
17
|
+
cloudflare_images_migrator-1.0.0.dist-info/RECORD,,
|
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2025 Mario Lemos Quirino Neto
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -0,0 +1 @@
|
|
1
|
+
src
|
src/__init__.py
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# Cloudflare Images Migration Tool
|