xsl 0.1.5__py3-none-any.whl → 0.1.6__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.
@@ -0,0 +1,548 @@
1
+ Metadata-Version: 2.3
2
+ Name: xsl
3
+ Version: 0.1.6
4
+ Summary: Universal File Editor for XML/SVG/HTML with XPath and CSS selector support
5
+ License: Apache-2.0
6
+ Keywords: xml,svg,html,xpath,editor,cli
7
+ Author: Tom Sapletta
8
+ Author-email: info@softreck.dev
9
+ Requires-Python: >=3.8,<4.0
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Topic :: Text Processing :: Markup :: HTML
22
+ Classifier: Topic :: Text Processing :: Markup :: XML
23
+ Provides-Extra: css
24
+ Provides-Extra: full
25
+ Provides-Extra: remote
26
+ Provides-Extra: xpath
27
+ Requires-Dist: beautifulsoup4 (>=4.11.0,<5.0.0) ; extra == "full" or extra == "css"
28
+ Requires-Dist: lxml (>=4.9.0,<5.0.0) ; extra == "full" or extra == "xpath"
29
+ Requires-Dist: requests (>=2.28.0,<3.0.0) ; extra == "full" or extra == "remote"
30
+ Project-URL: Documentation, https://github.com/veridock/xsl/docs
31
+ Project-URL: Homepage, https://github.com/veridock/xsl
32
+ Project-URL: Repository, https://github.com/veridock/xsl
33
+ Description-Content-Type: text/markdown
34
+
35
+ # Skrypty i komendy setup dla xsl
36
+
37
+ ## 🚀 Inicjalizacja projektu
38
+
39
+ ### 1. Klonowanie repozytorium
40
+ ```bash
41
+ git clone git@github.com:veridock/xsl.git
42
+ cd xsl
43
+ ```
44
+
45
+ ### 2. Setup Poetry i dependencies
46
+ ```bash
47
+ # Zainstaluj Poetry (jeśli nie masz)
48
+ curl -sSL https://install.python-poetry.org | python3 -
49
+
50
+ # Lub przez pip
51
+ pip install poetry
52
+
53
+ # Zainstaluj dependencies
54
+ poetry install
55
+
56
+ # Instalacja z wszystkimi dodatkami
57
+ poetry install --extras "full"
58
+ ```
59
+
60
+ ### 3. Inicjalizacja struktur katalogów
61
+ ```bash
62
+ # Utwórz wszystkie potrzebne katalogi
63
+ mkdir -p xsl tests docs scripts tests/fixtures
64
+
65
+ # Skopiuj pliki testowe
66
+ poetry run python scripts/create_examples.py --dir tests/fixtures
67
+ ```
68
+
69
+ ## 📝 Pliki które musisz utworzyć
70
+
71
+ ### xsl/editor.py
72
+ ```python
73
+ # Skopiuj z głównego artifact file_editor_tool
74
+ # klasy FileEditor i powiązane
75
+ ```
76
+
77
+ ### xsl/cli.py
78
+ ```python
79
+ # Skopiuj z głównego artifact file_editor_tool
80
+ # klasę CLI i funkcję main
81
+ ```
82
+
83
+ ### xsl/server.py
84
+ ```python
85
+ # Skopiuj z głównego artifact file_editor_tool
86
+ # klasę FileEditorServer i funkcję main dla serwera
87
+ ```
88
+
89
+ ### LICENSE
90
+ ```
91
+ MIT License
92
+
93
+ Copyright (c) 2025 xsl Contributors
94
+
95
+ Permission is hereby granted, free of charge, to any person obtaining a copy
96
+ of this software and associated documentation files (the "Software"), to deal
97
+ in the Software without restriction, including without limitation the rights
98
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
99
+ copies of the Software, and to permit persons to whom the Software is
100
+ furnished to do so, subject to the following conditions:
101
+
102
+ The above copyright notice and this permission notice shall be included in all
103
+ copies or substantial portions of the Software.
104
+
105
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
106
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
107
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
108
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
109
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
110
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
111
+ SOFTWARE.
112
+ ```
113
+
114
+ ### .gitignore
115
+ ```gitignore
116
+ # Python
117
+ __pycache__/
118
+ *.py[cod]
119
+ *$py.class
120
+ *.so
121
+ .Python
122
+ build/
123
+ develop-eggs/
124
+ dist/
125
+ downloads/
126
+ eggs/
127
+ .eggs/
128
+ lib/
129
+ lib64/
130
+ parts/
131
+ sdist/
132
+ var/
133
+ wheels/
134
+ *.egg-info/
135
+ .installed.cfg
136
+ *.egg
137
+ MANIFEST
138
+
139
+ # Virtual environments
140
+ .env
141
+ .venv
142
+ env/
143
+ venv/
144
+ ENV/
145
+ env.bak/
146
+ venv.bak/
147
+
148
+ # Testing
149
+ htmlcov/
150
+ .tox/
151
+ .coverage
152
+ .coverage.*
153
+ .cache
154
+ nosetests.xml
155
+ coverage.xml
156
+ *.cover
157
+ .hypothesis/
158
+ .pytest_cache/
159
+
160
+ # IDEs
161
+ .vscode/
162
+ .idea/
163
+ *.swp
164
+ *.swo
165
+
166
+ # OS
167
+ .DS_Store
168
+ Thumbs.db
169
+
170
+ # Project specific
171
+ *.backup
172
+ *.tmp
173
+ test_output/
174
+ examples/output/
175
+ ```
176
+
177
+ ## 🧪 Development commands
178
+
179
+ ### Testy
180
+ ```bash
181
+ # Uruchom wszystkie testy
182
+ poetry run pytest
183
+
184
+ # Testy z coverage
185
+ poetry run pytest --cov=xsl --cov-report=html
186
+
187
+ # Tylko szybkie testy (bez slow)
188
+ poetry run pytest -m "not slow"
189
+
190
+ # Testy z output
191
+ poetry run pytest -v -s
192
+ ```
193
+
194
+ ### Code quality
195
+ ```bash
196
+ # Formatowanie
197
+ poetry run black xsl/ tests/
198
+ poetry run isort xsl/ tests/
199
+
200
+ # Linting
201
+ poetry run flake8 xsl/ tests/
202
+
203
+ # Type checking
204
+ poetry run mypy xsl/
205
+ ```
206
+
207
+ ### Build i publikacja
208
+ ```bash
209
+ # Build package
210
+ poetry build
211
+
212
+ # Check package
213
+ poetry run twine check dist/*
214
+
215
+ # Publish to PyPI (po skonfigurowaniu credentials)
216
+ poetry publish
217
+
218
+ # Publish to Test PyPI
219
+ poetry config repositories.testpypi https://test.pypi.org/legacy/
220
+ poetry publish -r testpypi
221
+ ```
222
+
223
+ ## 📚 Development workflow
224
+
225
+ ### 1. Nowa funkcjonalność
226
+ ```bash
227
+ # Utwórz branch
228
+ git checkout -b feature/nowa-funkcjonalność
229
+
230
+ # Zrób zmiany
231
+ # Dodaj testy
232
+ # Uruchom testy
233
+ poetry run pytest
234
+
235
+ # Format code
236
+ poetry run black xsl/
237
+ poetry run isort xsl/
238
+
239
+ # Commit i push
240
+ git add .
241
+ git commit -m "Add: nowa funkcjonalność"
242
+ git push origin feature/nowa-funkcjonalność
243
+ ```
244
+
245
+ ### 2. Przed release
246
+ ```bash
247
+ # Aktualizuj wersję w pyproject.toml
248
+ # Aktualizuj CHANGELOG.md
249
+ # Uruchom wszystkie testy
250
+ poetry run pytest
251
+
252
+ # Build i sprawdź
253
+ poetry build
254
+ poetry run twine check dist/*
255
+
256
+ # Tag i push
257
+ git tag v0.1.0
258
+ git push origin v0.1.0
259
+ ```
260
+
261
+ ## 🔧 Dodatkowe skrypty
262
+
263
+ ### scripts/create_examples.py
264
+ ```python
265
+ #!/usr/bin/env python3
266
+ """Create example files for testing and documentation."""
267
+
268
+ import argparse
269
+ from pathlib import Path
270
+
271
+ def create_examples(output_dir: str):
272
+ """Create example XML/SVG/HTML files."""
273
+ # Implementacja z głównego narzędzia
274
+ pass
275
+
276
+ if __name__ == "__main__":
277
+ parser = argparse.ArgumentParser()
278
+ parser.add_argument("--dir", default="examples")
279
+ args = parser.parse_args()
280
+ create_examples(args.dir)
281
+ ```
282
+
283
+ ### scripts/benchmark.py
284
+ ```python
285
+ #!/usr/bin/env python3
286
+ """Benchmark xsl performance."""
287
+
288
+ import time
289
+ from xsl import FileEditor
290
+
291
+ def benchmark_xpath_queries():
292
+ """Benchmark XPath query performance."""
293
+ # Implementacja benchmarków
294
+ pass
295
+
296
+ if __name__ == "__main__":
297
+ benchmark_xpath_queries()
298
+ ```
299
+
300
+ ## 📋 Checklist przed publikacją
301
+
302
+ - [ ] Wszystkie testy przechodzą
303
+ - [ ] Code coverage > 80%
304
+ - [ ] Dokumentacja zaktualizowana
305
+ - [ ] CHANGELOG.md zaktualizowany
306
+ - [ ] Wersja w pyproject.toml zaktualizowana
307
+ - [ ] README.md kompletny z przykładami
308
+ - [ ] LICENSE plik dodany
309
+ - [ ] .gitignore skonfigurowany
310
+ - [ ] CI/CD skonfigurowane (GitHub Actions)
311
+ - [ ] Package zbudowany i sprawdzony
312
+ - [ ] Tag git utworzony
313
+
314
+ ## 🌐 CI/CD z GitHub Actions
315
+
316
+ ### .github/workflows/test.yml
317
+ ```yaml
318
+ name: Tests
319
+
320
+ on: [push, pull_request]
321
+
322
+ jobs:
323
+ test:
324
+ runs-on: ubuntu-latest
325
+ strategy:
326
+ matrix:
327
+ python-version: [3.8, 3.9, 3.10, 3.11]
328
+
329
+ steps:
330
+ - uses: actions/checkout@v3
331
+ - name: Set up Python ${{ matrix.python-version }}
332
+ uses: actions/setup-python@v4
333
+ with:
334
+ python-version: ${{ matrix.python-version }}
335
+
336
+ - name: Install Poetry
337
+ uses: snok/install-poetry@v1
338
+
339
+ - name: Install dependencies
340
+ run: poetry install --extras "full"
341
+
342
+ - name: Run tests
343
+ run: poetry run pytest --cov=xsl --cov-report=xml
344
+
345
+ - name: Upload coverage to Codecov
346
+ uses: codecov/codecov-action@v3
347
+ ```
348
+
349
+ ### .github/workflows/publish.yml
350
+ ```yaml
351
+ name: Publish
352
+
353
+ on:
354
+ release:
355
+ types: [published]
356
+
357
+ jobs:
358
+ publish:
359
+ runs-on: ubuntu-latest
360
+ steps:
361
+ - uses: actions/checkout@v3
362
+ - name: Set up Python
363
+ uses: actions/setup-python@v4
364
+ with:
365
+ python-version: 3.9
366
+
367
+ - name: Install Poetry
368
+ uses: snok/install-poetry@v1
369
+
370
+ - name: Build package
371
+ run: poetry build
372
+
373
+ - name: Publish to PyPI
374
+ env:
375
+ POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
376
+ run: poetry publish
377
+ ```
378
+
379
+ ## 📖 Użycie po instalacji
380
+
381
+ ```bash
382
+ # Zainstaluj z PyPI
383
+ pip install xsl[full]
384
+
385
+ # Użyj CLI
386
+ xsl load example.svg
387
+ xsl query "//svg:text"
388
+ xsl server --port 8080
389
+
390
+ # Użyj w Python
391
+ python -c "from xsl import FileEditor; print('Works!')"
392
+ ```
393
+
394
+
395
+ 🛠️ Powerful CLI tool and library for editing XML, SVG, and HTML files using XPath and CSS selectors.
396
+
397
+ ## ✨ Features
398
+
399
+ - **XPath & CSS Selectors** - Precise element targeting
400
+ - **Multiple Formats** - XML, SVG, HTML support
401
+ - **Local & Remote Files** - Edit files locally or from URLs
402
+ - **Data URI Extraction** - Extract and decode embedded content (PDFs, images)
403
+ - **Multiple Interfaces** - CLI commands, interactive shell, HTTP server
404
+ - **Web Interface** - Browser-based editor with API
405
+
406
+ ## 🚀 Quick Start
407
+
408
+ ### Installation
409
+
410
+ ```bash
411
+ # Basic installation
412
+ pip install xsl
413
+
414
+ # Full installation with all features
415
+ pip install xsl[full]
416
+
417
+ # Specific features
418
+ pip install xsl[xpath] # XPath support
419
+ pip install xsl[css] # CSS selectors
420
+ pip install xsl[remote] # Remote file support
421
+
422
+ [XPath File Editing CLI Tool - Claude](https://claude.ai/chat/c8910e64-c97a-448f-bee7-7b6237b8145f)
423
+
424
+ > ### Usage
425
+ >
426
+ > bash
427
+ >
428
+ > # CLI Commands
429
+ > xsl load example.svg
430
+ > xsl query "//svg:text[@id='title']"
431
+ > xsl set "//svg:text[@id='title']" "New Title"
432
+ > xsl extract "//svg:image/@xlink:href" --output document.pdf
433
+ > xsl save --output modified.svg
434
+ >
435
+ > # Interactive Shell
436
+ > xsl shell
437
+ >
438
+ > # HTTP Server
439
+ > xsl server --port 8080
440
+ >
441
+ > ### Python API
442
+ >
443
+ > python
444
+ >
445
+ > from xsl import FileEditor
446
+ >
447
+ > # Load and edit file
448
+ > editor = FileEditor('example.svg')
449
+ > editor.set_element_text("//svg:text[@id='title']", "New Title")
450
+ > editor.save('modified.svg')
451
+ >
452
+ > # Extract Data URI
453
+ > result = editor.extract_data_uri("//svg:image/@xlink:href")
454
+ > print(f"Found {result['mime_type']} ({result['size']} bytes)")
455
+ >
456
+ > ## 📖 Documentation
457
+ >
458
+ > - [CLI Reference](https://claude.ai/chat/docs/cli.md)
459
+ > - [API Documentation](https://claude.ai/chat/docs/api.md)
460
+ > - [Examples](https://claude.ai/chat/docs/examples.md)
461
+ >
462
+ > ## 🤝 Contributing
463
+ >
464
+ > 1. Fork the repository
465
+ > 2. Create feature branch (`git checkout -b feature/amazing-feature`)
466
+ > 3. Commit changes (`git commit -m 'Add amazing feature'`)
467
+ > 4. Push to branch (`git push origin feature/amazing-feature`)
468
+ > 5. Open Pull Request
469
+
470
+
471
+
472
+ Teraz stworzę jeszcze kilka kluczowych plików dla kompletnego pakietu:## 🎉 **Kompletny pakiet xsl gotowy!**
473
+
474
+ Stworzyłem kompletną strukturę pakietu Poetry dla repozytorium `git@github.com:veridock/xsl.git` z następującymi komponentami:
475
+
476
+ ### 📁 **Struktura plików:**
477
+ ```
478
+ xsl/
479
+ ├── pyproject.toml # ✅ Poetry konfiguracja
480
+ ├── README.md # ✅ Dokumentacja
481
+ ├── LICENSE # ✅ MIT License
482
+ ├── .gitignore # ✅ Git ignore rules
483
+ ├── xsl/
484
+ │ ├── __init__.py # ✅ Package init z auto-detection
485
+ │ ├── editor.py # 📝 Do skopiowania z głównego narzędzia
486
+ │ ├── cli.py # 📝 Do skopiowania z głównego narzędzia
487
+ │ ├── server.py # 📝 Do skopiowania z głównego narzędzia
488
+ │ └── utils.py # ✅ Funkcje pomocnicze
489
+ ├── tests/
490
+ │ ├── test_editor.py # ✅ Kompletne testy jednostkowe
491
+ │ └── fixtures/ # 📁 Pliki testowe
492
+ └── docs/ # 📁 Dokumentacja
493
+ ```
494
+
495
+ ### 🚀 **Instrukcje setup:**
496
+
497
+ 1. **Klonuj repo i inicjalizuj:**
498
+ ```bash
499
+ git clone git@github.com:veridock/xsl.git
500
+ cd xsl
501
+ poetry install --extras "full"
502
+ ```
503
+
504
+ 2. **Skopiuj kod z głównego narzędzia:**
505
+ - Z artifact `file_editor_tool` skopiuj klasę `FileEditor` do `xsl/editor.py`
506
+ - Klasę `CLI` do `xsl/cli.py`
507
+ - Klasę `FileEditorServer` do `xsl/server.py`
508
+
509
+ 3. **Uruchom testy:**
510
+ ```bash
511
+ poetry run pytest
512
+ ```
513
+
514
+ 4. **Build i publish:**
515
+ ```bash
516
+ poetry build
517
+ poetry publish
518
+ ```
519
+
520
+ ### ⭐ **Kluczowe funkcjonalności pakietu:**
521
+
522
+ - **Opcjonalne dependencies** - `pip install xsl[full]` dla wszystkich funkcji
523
+ - **CLI commands** - `xsl` i `xsl-server` jako executables
524
+ - **Python API** - `from xsl import FileEditor`
525
+ - **Kompletne testy** - z pytest, coverage, fixtures
526
+ - **Type hints** - mypy support
527
+ - **Code quality** - black, isort, flake8
528
+ - **CI/CD ready** - GitHub Actions workflows
529
+ - **PyPI ready** - wszystkie metadane skonfigurowane
530
+
531
+ ### 🎯 **Po instalacji użytkownicy będą mogli:**
532
+
533
+ ```bash
534
+ # Instalacja
535
+ pip install xsl[full]
536
+
537
+ # CLI usage
538
+ xsl load example.svg
539
+ xsl extract "//svg:image/@xlink:href" --output doc.pdf
540
+ xsl server --port 8080
541
+
542
+ # Python API
543
+ from xsl import FileEditor
544
+ editor = FileEditor('file.svg')
545
+ editor.extract_data_uri("//svg:image/@xlink:href")
546
+ ```
547
+
548
+
@@ -3,8 +3,8 @@ xsl/cli.py,sha256=0aVSrYYFfduc0QemNJ-V4ZWzF6S-929Ccz0M2RkGp2g,51564
3
3
  xsl/editor.py,sha256=_yjNbYtP-zKujFbg2eO5HqO2uYmBBUnSTIDbXEdCQjg,43
4
4
  xsl/server.py,sha256=6tWPUtyKqJdcdyhy4LW1fQu-bKOkuchVk8GzmHKsRT4,33
5
5
  xsl/utils.py,sha256=fBhJ6DRe95-f_WW0-6ieNiS5KGseY3XJFoag0h0DhBI,38
6
- xsl-0.1.5.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
7
- xsl-0.1.5.dist-info/METADATA,sha256=E6JzO1XP-GgRrtAdj7kj8oeApQvVSuWV6GOTfTlcnvE,3740
8
- xsl-0.1.5.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
9
- xsl-0.1.5.dist-info/entry_points.txt,sha256=OCJEYD2p9Q9Ly4BC03mboowG4H1NMVPVQrrFvKkB-DE,71
10
- xsl-0.1.5.dist-info/RECORD,,
6
+ xsl-0.1.6.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
7
+ xsl-0.1.6.dist-info/METADATA,sha256=XOsC8gzQML_c8_pehONc5nDRIW-n2IHhKaXr75Rioss,12981
8
+ xsl-0.1.6.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
9
+ xsl-0.1.6.dist-info/entry_points.txt,sha256=Y83cfbwCADO-vxI6_fJ4pmonCXlrC39nPYCjJw0N1pc,63
10
+ xsl-0.1.6.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ [console_scripts]
2
+ xsl=xsl.cli:main
3
+ xsl-server=xsl.server:main
4
+
@@ -1,110 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: xsl
3
- Version: 0.1.5
4
- Summary: Universal File Editor for XML/SVG/HTML with XPath and CSS selector support
5
- License: Apache-2.0
6
- Keywords: xml,svg,html,xpath,editor,cli
7
- Author: Tom Sapletta
8
- Author-email: info@softreck.dev
9
- Requires-Python: >=3.8,<4.0
10
- Classifier: Development Status :: 4 - Beta
11
- Classifier: Intended Audience :: Developers
12
- Classifier: License :: OSI Approved :: Apache Software License
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.8
15
- Classifier: Programming Language :: Python :: 3.9
16
- Classifier: Programming Language :: Python :: 3.10
17
- Classifier: Programming Language :: Python :: 3.11
18
- Classifier: Programming Language :: Python :: 3.12
19
- Classifier: Programming Language :: Python :: 3.13
20
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
- Classifier: Topic :: Text Processing :: Markup :: HTML
22
- Classifier: Topic :: Text Processing :: Markup :: XML
23
- Provides-Extra: css
24
- Provides-Extra: full
25
- Provides-Extra: remote
26
- Provides-Extra: xpath
27
- Requires-Dist: beautifulsoup4 (>=4.11.0,<5.0.0) ; extra == "full" or extra == "css"
28
- Requires-Dist: lxml (>=4.9.0,<5.0.0) ; extra == "full" or extra == "xpath"
29
- Requires-Dist: requests (>=2.28.0,<3.0.0) ; extra == "full" or extra == "remote"
30
- Project-URL: Documentation, https://github.com/veridock/filex/docs
31
- Project-URL: Homepage, https://github.com/veridock/filex
32
- Project-URL: Repository, https://github.com/veridock/filex
33
- Description-Content-Type: text/markdown
34
-
35
- # FileX - Universal File Editor
36
-
37
- 🛠️ Powerful CLI tool and library for editing XML, SVG, and HTML files using XPath and CSS selectors.
38
-
39
- ## ✨ Features
40
-
41
- - **XPath & CSS Selectors** - Precise element targeting
42
- - **Multiple Formats** - XML, SVG, HTML support
43
- - **Local & Remote Files** - Edit files locally or from URLs
44
- - **Data URI Extraction** - Extract and decode embedded content (PDFs, images)
45
- - **Multiple Interfaces** - CLI commands, interactive shell, HTTP server
46
- - **Web Interface** - Browser-based editor with API
47
-
48
- ## 🚀 Quick Start
49
-
50
- ### Installation
51
-
52
- ```bash
53
- # Basic installation
54
- pip install filex
55
-
56
- # Full installation with all features
57
- pip install filex[full]
58
-
59
- # Specific features
60
- pip install filex[xpath] # XPath support
61
- pip install filex[css] # CSS selectors
62
- pip install filex[remote] # Remote file support
63
-
64
- [XPath File Editing CLI Tool - Claude](https://claude.ai/chat/c8910e64-c97a-448f-bee7-7b6237b8145f)
65
-
66
- > ### Usage
67
- >
68
- > bash
69
- >
70
- > # CLI Commands
71
- > filex load example.svg
72
- > filex query "//svg:text[@id='title']"
73
- > filex set "//svg:text[@id='title']" "New Title"
74
- > filex extract "//svg:image/@xlink:href" --output document.pdf
75
- > filex save --output modified.svg
76
- >
77
- > # Interactive Shell
78
- > filex shell
79
- >
80
- > # HTTP Server
81
- > filex server --port 8080
82
- >
83
- > ### Python API
84
- >
85
- > python
86
- >
87
- > from filex import FileEditor
88
- >
89
- > # Load and edit file
90
- > editor = FileEditor('example.svg')
91
- > editor.set_element_text("//svg:text[@id='title']", "New Title")
92
- > editor.save('modified.svg')
93
- >
94
- > # Extract Data URI
95
- > result = editor.extract_data_uri("//svg:image/@xlink:href")
96
- > print(f"Found {result['mime_type']} ({result['size']} bytes)")
97
- >
98
- > ## 📖 Documentation
99
- >
100
- > - [CLI Reference](https://claude.ai/chat/docs/cli.md)
101
- > - [API Documentation](https://claude.ai/chat/docs/api.md)
102
- > - [Examples](https://claude.ai/chat/docs/examples.md)
103
- >
104
- > ## 🤝 Contributing
105
- >
106
- > 1. Fork the repository
107
- > 2. Create feature branch (`git checkout -b feature/amazing-feature`)
108
- > 3. Commit changes (`git commit -m 'Add amazing feature'`)
109
- > 4. Push to branch (`git push origin feature/amazing-feature`)
110
- > 5. Open Pull Request
@@ -1,4 +0,0 @@
1
- [console_scripts]
2
- filex=filex.cli:main
3
- filex-server=filex.server:main
4
-
File without changes
File without changes