contextzip 0.2.0__tar.gz → 0.2.1__tar.gz

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.
Files changed (24) hide show
  1. {contextzip-0.2.0 → contextzip-0.2.1}/PKG-INFO +3 -3
  2. {contextzip-0.2.0 → contextzip-0.2.1}/README.md +2 -2
  3. {contextzip-0.2.0 → contextzip-0.2.1}/contextzip/__init__.py +1 -1
  4. {contextzip-0.2.0 → contextzip-0.2.1}/contextzip/cli.py +16 -3
  5. {contextzip-0.2.0 → contextzip-0.2.1}/contextzip.egg-info/PKG-INFO +3 -3
  6. {contextzip-0.2.0 → contextzip-0.2.1}/pyproject.toml +1 -1
  7. {contextzip-0.2.0 → contextzip-0.2.1}/LICENSE +0 -0
  8. {contextzip-0.2.0 → contextzip-0.2.1}/contextzip/clipboard.py +0 -0
  9. {contextzip-0.2.0 → contextzip-0.2.1}/contextzip/detector.py +0 -0
  10. {contextzip-0.2.0 → contextzip-0.2.1}/contextzip/filters.py +0 -0
  11. {contextzip-0.2.0 → contextzip-0.2.1}/contextzip/git.py +0 -0
  12. {contextzip-0.2.0 → contextzip-0.2.1}/contextzip/packager.py +0 -0
  13. {contextzip-0.2.0 → contextzip-0.2.1}/contextzip/rules/__init__.py +0 -0
  14. {contextzip-0.2.0 → contextzip-0.2.1}/contextzip/rules/base.py +0 -0
  15. {contextzip-0.2.0 → contextzip-0.2.1}/contextzip/rules/go.py +0 -0
  16. {contextzip-0.2.0 → contextzip-0.2.1}/contextzip/rules/node.py +0 -0
  17. {contextzip-0.2.0 → contextzip-0.2.1}/contextzip/rules/python.py +0 -0
  18. {contextzip-0.2.0 → contextzip-0.2.1}/contextzip/rules/rust.py +0 -0
  19. {contextzip-0.2.0 → contextzip-0.2.1}/contextzip.egg-info/SOURCES.txt +0 -0
  20. {contextzip-0.2.0 → contextzip-0.2.1}/contextzip.egg-info/dependency_links.txt +0 -0
  21. {contextzip-0.2.0 → contextzip-0.2.1}/contextzip.egg-info/entry_points.txt +0 -0
  22. {contextzip-0.2.0 → contextzip-0.2.1}/contextzip.egg-info/requires.txt +0 -0
  23. {contextzip-0.2.0 → contextzip-0.2.1}/contextzip.egg-info/top_level.txt +0 -0
  24. {contextzip-0.2.0 → contextzip-0.2.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: contextzip
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Intelligently package your codebase for AI tools
5
5
  Author-email: Deepesh <akadeepesh@gmail.com>
6
6
  License-Expression: MIT
@@ -111,7 +111,7 @@ contextzip [OPTIONS]
111
111
  | Option | Description |
112
112
  |---|---|
113
113
  | `-i`, `--include PATH` | Only include files under this path. Repeatable. |
114
- | `-e`, `--exclude PATTERN` | Extra exclusion patterns (gitignore syntax). Repeatable. |
114
+ | `-e`, `--exclude PATTERN` | Extra exclusion patterns (gitignore syntax). Space-separated or repeatable: `-e '*.log' file1 file2` or `-e '*.log' -e file1` |
115
115
  | `--git-changes` | Only include files reported by git as modified, staged, or untracked. |
116
116
  | `-n`, `--dry-run` | Preview what would be included, no ZIP created. |
117
117
  | `-o`, `--output FILE` | Custom output path for the ZIP file. |
@@ -137,7 +137,7 @@ contextzip --include src --include app
137
137
 
138
138
  **Exclude additional patterns beyond the auto-rules:**
139
139
  ```bash
140
- contextzip --exclude "*.log" --exclude "*.sqlite" --exclude "tests/"
140
+ contextzip -e "*.log" "*.sqlite" "tests/"
141
141
  ```
142
142
 
143
143
  **Only package files changed in git:**
@@ -83,7 +83,7 @@ contextzip [OPTIONS]
83
83
  | Option | Description |
84
84
  |---|---|
85
85
  | `-i`, `--include PATH` | Only include files under this path. Repeatable. |
86
- | `-e`, `--exclude PATTERN` | Extra exclusion patterns (gitignore syntax). Repeatable. |
86
+ | `-e`, `--exclude PATTERN` | Extra exclusion patterns (gitignore syntax). Space-separated or repeatable: `-e '*.log' file1 file2` or `-e '*.log' -e file1` |
87
87
  | `--git-changes` | Only include files reported by git as modified, staged, or untracked. |
88
88
  | `-n`, `--dry-run` | Preview what would be included, no ZIP created. |
89
89
  | `-o`, `--output FILE` | Custom output path for the ZIP file. |
@@ -109,7 +109,7 @@ contextzip --include src --include app
109
109
 
110
110
  **Exclude additional patterns beyond the auto-rules:**
111
111
  ```bash
112
- contextzip --exclude "*.log" --exclude "*.sqlite" --exclude "tests/"
112
+ contextzip -e "*.log" "*.sqlite" "tests/"
113
113
  ```
114
114
 
115
115
  **Only package files changed in git:**
@@ -1,3 +1,3 @@
1
1
  """contextzip — intelligent codebase packager for AI tools."""
2
2
 
3
- __version__ = "0.2.0"
3
+ __version__ = "0.2.1"
@@ -42,9 +42,9 @@ console = Console()
42
42
  )
43
43
  @click.option(
44
44
  "--exclude", "-e",
45
- multiple=True, metavar="PATTERN",
45
+ multiple=True, metavar="PATTERN...",
46
46
  help="Extra exclusion patterns on top of auto-rules (gitignore syntax). "
47
- "Repeatable: --exclude '*.log' --exclude temp.js",
47
+ "Space-separated or repeatable: -e '*.log' file1 file2 OR -e '*.log' -e file1",
48
48
  )
49
49
  @click.option(
50
50
  "--dry-run", "-n",
@@ -154,9 +154,22 @@ def main(
154
154
  )
155
155
 
156
156
  with console.status("[cyan]Building exclusion rules…[/]", spinner="dots"):
157
+ # Flatten: each -e invocation may itself contain space-separated tokens
158
+ raw_exclude = exclude
159
+ flat_exclude: list[str] = []
160
+ for token in raw_exclude:
161
+ flat_exclude.extend(token.split())
162
+
163
+ # Normalize Windows-style paths (.\foo\bar → foo/bar)
164
+ def _normalize_pattern(p: str) -> str:
165
+ p = p.lstrip(".\\/") # strip leading .\ or ./
166
+ p = p.replace("\\", "/") # backslash → forward slash
167
+ return p
168
+
169
+ normalized_exclude = [_normalize_pattern(p) for p in flat_exclude]
157
170
  spec = build_spec(
158
171
  rule_modules=detection.rule_modules,
159
- extra_exclude=list(exclude) if exclude else None,
172
+ extra_exclude=normalized_exclude if normalized_exclude else None,
160
173
  gitignore_path=gitignore_path,
161
174
  )
162
175
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: contextzip
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Intelligently package your codebase for AI tools
5
5
  Author-email: Deepesh <akadeepesh@gmail.com>
6
6
  License-Expression: MIT
@@ -111,7 +111,7 @@ contextzip [OPTIONS]
111
111
  | Option | Description |
112
112
  |---|---|
113
113
  | `-i`, `--include PATH` | Only include files under this path. Repeatable. |
114
- | `-e`, `--exclude PATTERN` | Extra exclusion patterns (gitignore syntax). Repeatable. |
114
+ | `-e`, `--exclude PATTERN` | Extra exclusion patterns (gitignore syntax). Space-separated or repeatable: `-e '*.log' file1 file2` or `-e '*.log' -e file1` |
115
115
  | `--git-changes` | Only include files reported by git as modified, staged, or untracked. |
116
116
  | `-n`, `--dry-run` | Preview what would be included, no ZIP created. |
117
117
  | `-o`, `--output FILE` | Custom output path for the ZIP file. |
@@ -137,7 +137,7 @@ contextzip --include src --include app
137
137
 
138
138
  **Exclude additional patterns beyond the auto-rules:**
139
139
  ```bash
140
- contextzip --exclude "*.log" --exclude "*.sqlite" --exclude "tests/"
140
+ contextzip -e "*.log" "*.sqlite" "tests/"
141
141
  ```
142
142
 
143
143
  **Only package files changed in git:**
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "contextzip"
7
- version = "0.2.0"
7
+ version = "0.2.1"
8
8
  description = "Intelligently package your codebase for AI tools"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
File without changes
File without changes
File without changes