content-core 1.0.4__tar.gz → 1.1.2__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.

Potentially problematic release.


This version of content-core might be problematic. Click here for more details.

Files changed (67) hide show
  1. {content_core-1.0.4 → content_core-1.1.2}/Makefile +4 -1
  2. {content_core-1.0.4 → content_core-1.1.2}/PKG-INFO +97 -3
  3. {content_core-1.0.4 → content_core-1.1.2}/README.md +93 -1
  4. content_core-1.1.2/docs/macos.md +287 -0
  5. content_core-1.1.2/docs/mcp.md +394 -0
  6. {content_core-1.0.4 → content_core-1.1.2}/pyproject.toml +8 -2
  7. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/config.py +0 -1
  8. content_core-1.1.2/src/content_core/mcp/__init__.py +5 -0
  9. content_core-1.1.2/src/content_core/mcp/server.py +214 -0
  10. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/models.py +0 -1
  11. content_core-1.1.2/tests/unit/test_mcp_server.py +124 -0
  12. {content_core-1.0.4 → content_core-1.1.2}/uv.lock +174 -2
  13. {content_core-1.0.4 → content_core-1.1.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  14. {content_core-1.0.4 → content_core-1.1.2}/.github/workflows/publish.yml +0 -0
  15. {content_core-1.0.4 → content_core-1.1.2}/.gitignore +0 -0
  16. {content_core-1.0.4 → content_core-1.1.2}/.python-version +0 -0
  17. {content_core-1.0.4 → content_core-1.1.2}/CONTRIBUTING.md +0 -0
  18. {content_core-1.0.4 → content_core-1.1.2}/LICENSE +0 -0
  19. {content_core-1.0.4 → content_core-1.1.2}/docs/processors.md +0 -0
  20. {content_core-1.0.4 → content_core-1.1.2}/docs/usage.md +0 -0
  21. {content_core-1.0.4 → content_core-1.1.2}/prompts/content/cleanup.jinja +0 -0
  22. {content_core-1.0.4 → content_core-1.1.2}/prompts/content/summarize.jinja +0 -0
  23. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/__init__.py +0 -0
  24. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/cc_config.yaml +0 -0
  25. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/common/__init__.py +0 -0
  26. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/common/exceptions.py +0 -0
  27. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/common/state.py +0 -0
  28. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/common/types.py +0 -0
  29. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/common/utils.py +0 -0
  30. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/content/__init__.py +0 -0
  31. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/content/cleanup/__init__.py +0 -0
  32. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/content/cleanup/core.py +0 -0
  33. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/content/extraction/__init__.py +0 -0
  34. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/content/extraction/graph.py +0 -0
  35. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/content/identification/__init__.py +0 -0
  36. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/content/summary/__init__.py +0 -0
  37. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/content/summary/core.py +0 -0
  38. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/logging.py +0 -0
  39. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/models_config.yaml +0 -0
  40. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/notebooks/run.ipynb +0 -0
  41. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/processors/audio.py +0 -0
  42. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/processors/docling.py +0 -0
  43. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/processors/office.py +0 -0
  44. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/processors/pdf.py +0 -0
  45. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/processors/text.py +0 -0
  46. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/processors/url.py +0 -0
  47. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/processors/video.py +0 -0
  48. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/processors/youtube.py +0 -0
  49. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/py.typed +0 -0
  50. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/templated_message.py +0 -0
  51. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/tools/__init__.py +0 -0
  52. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/tools/cleanup.py +0 -0
  53. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/tools/extract.py +0 -0
  54. {content_core-1.0.4 → content_core-1.1.2}/src/content_core/tools/summarize.py +0 -0
  55. {content_core-1.0.4 → content_core-1.1.2}/tests/input_content/file.docx +0 -0
  56. {content_core-1.0.4 → content_core-1.1.2}/tests/input_content/file.epub +0 -0
  57. {content_core-1.0.4 → content_core-1.1.2}/tests/input_content/file.md +0 -0
  58. {content_core-1.0.4 → content_core-1.1.2}/tests/input_content/file.mp3 +0 -0
  59. {content_core-1.0.4 → content_core-1.1.2}/tests/input_content/file.mp4 +0 -0
  60. {content_core-1.0.4 → content_core-1.1.2}/tests/input_content/file.pdf +0 -0
  61. {content_core-1.0.4 → content_core-1.1.2}/tests/input_content/file.pptx +0 -0
  62. {content_core-1.0.4 → content_core-1.1.2}/tests/input_content/file.txt +0 -0
  63. {content_core-1.0.4 → content_core-1.1.2}/tests/input_content/file.xlsx +0 -0
  64. {content_core-1.0.4 → content_core-1.1.2}/tests/input_content/file_audio.mp3 +0 -0
  65. {content_core-1.0.4 → content_core-1.1.2}/tests/integration/test_cli.py +0 -0
  66. {content_core-1.0.4 → content_core-1.1.2}/tests/integration/test_extraction.py +0 -0
  67. {content_core-1.0.4 → content_core-1.1.2}/tests/unit/test_docling.py +0 -0
@@ -1,4 +1,4 @@
1
- .PHONY: tag test build-docs ruff
1
+ .PHONY: tag test build-docs ruff mcp-server
2
2
 
3
3
  tag:
4
4
  @version=$$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/'); \
@@ -14,3 +14,6 @@ build-docs:
14
14
 
15
15
  ruff:
16
16
  ruff check . --fix
17
+
18
+ mcp-server:
19
+ uv run content-core-mcp
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: content-core
3
- Version: 1.0.4
4
- Summary: Extract what matters from any media source
3
+ Version: 1.1.2
4
+ Summary: Extract what matters from any media source. Available as Python Library, macOS Service, CLI and MCP Server
5
5
  Author-email: LUIS NOVO <lfnovo@gmail.com>
6
6
  License-File: LICENSE
7
7
  Requires-Python: >=3.10
@@ -31,6 +31,8 @@ Requires-Dist: pytubefix>=9.1.1
31
31
  Requires-Dist: readability-lxml>=0.8.4.1
32
32
  Requires-Dist: validators>=0.34.0
33
33
  Requires-Dist: youtube-transcript-api>=1.0.3
34
+ Provides-Extra: mcp
35
+ Requires-Dist: fastmcp>=0.5.0; extra == 'mcp'
34
36
  Description-Content-Type: text/markdown
35
37
 
36
38
  # Content Core
@@ -57,6 +59,8 @@ The primary goal of Content Core is to simplify the process of ingesting content
57
59
  * For files: Tries Docling extraction first (for robust document parsing), then falls back to simple extraction if needed.
58
60
  * You can override this by specifying an engine, but `'auto'` is recommended for most users.
59
61
  * **Content Cleaning (Optional):** Likely integrates with LLMs (via `prompter.py` and Jinja templates) to refine and clean the extracted content.
62
+ * **MCP Server:** Includes a Model Context Protocol (MCP) server for seamless integration with Claude Desktop and other MCP-compatible applications.
63
+ * **macOS Services:** Right-click context menu integration for Finder (extract and summarize files directly).
60
64
  * **Asynchronous:** Built with `asyncio` for efficient I/O operations.
61
65
 
62
66
  ## Getting Started
@@ -66,8 +70,11 @@ The primary goal of Content Core is to simplify the process of ingesting content
66
70
  Install Content Core using `pip`:
67
71
 
68
72
  ```bash
69
- # Install the package (without Docling)
73
+ # Install the package
70
74
  pip install content-core
75
+
76
+ # Install with MCP server support
77
+ pip install content-core[mcp]
71
78
  ```
72
79
 
73
80
  Alternatively, if you’re developing locally:
@@ -86,6 +93,18 @@ uv sync
86
93
  Content Core provides three CLI commands for extracting, cleaning, and summarizing content:
87
94
  ccore, cclean, and csum. These commands support input from text, URLs, files, or piped data (e.g., via cat file | command).
88
95
 
96
+ **Zero-install usage with uvx:**
97
+ ```bash
98
+ # Extract content
99
+ uvx --from "content-core" ccore https://example.com
100
+
101
+ # Clean content
102
+ uvx --from "content-core" cclean "messy content"
103
+
104
+ # Summarize content
105
+ uvx --from "content-core" csum "long text" --context "bullet points"
106
+ ```
107
+
89
108
  #### ccore - Extract Content
90
109
 
91
110
  Extracts content from text, URLs, or files, with optional formatting.
@@ -194,6 +213,81 @@ summary = await cc.summarize_content("long article text", context="explain to a
194
213
 
195
214
  For more information on how to use the Content Core library, including details on AI model configuration and customization, refer to our [Usage Documentation](docs/usage.md).
196
215
 
216
+ ## MCP Server Integration
217
+
218
+ Content Core includes a Model Context Protocol (MCP) server that enables seamless integration with Claude Desktop and other MCP-compatible applications. The MCP server exposes Content Core's powerful extraction capabilities through a standardized protocol.
219
+
220
+ ### Quick Setup with Claude Desktop
221
+
222
+ ```bash
223
+ # Install with MCP support
224
+ pip install content-core[mcp]
225
+
226
+ # Or use directly with uvx (no installation required)
227
+ uvx --from "content-core[mcp]" content-core-mcp
228
+ ```
229
+
230
+ Add to your `claude_desktop_config.json`:
231
+ ```json
232
+ {
233
+ "mcpServers": {
234
+ "content-core": {
235
+ "command": "uvx",
236
+ "args": [
237
+ "--from",
238
+ "content-core[mcp]",
239
+ "content-core-mcp"
240
+ ]
241
+ }
242
+ }
243
+ }
244
+ ```
245
+
246
+ For detailed setup instructions, configuration options, and usage examples, see our [MCP Documentation](docs/mcp.md).
247
+
248
+ ## macOS Services Integration
249
+
250
+ Content Core provides powerful right-click integration with macOS Finder, allowing you to extract and summarize content from any file without installation. Choose between clipboard or TextEdit output for maximum flexibility.
251
+
252
+ ### Available Services
253
+
254
+ Create **4 convenient services** for different workflows:
255
+
256
+ - **Extract Content → Clipboard** - Quick copy for immediate pasting
257
+ - **Extract Content → TextEdit** - Review before using
258
+ - **Summarize Content → Clipboard** - Quick summary copying
259
+ - **Summarize Content → TextEdit** - Formatted summary with headers
260
+
261
+ ### Quick Setup
262
+
263
+ 1. **Install uv** (if not already installed):
264
+ ```bash
265
+ curl -LsSf https://astral.sh/uv/install.sh | sh
266
+ ```
267
+
268
+ 2. **Create services manually** using Automator (5 minutes setup)
269
+
270
+ ### Usage
271
+
272
+ **Right-click any supported file** in Finder → **Services** → Choose your option:
273
+
274
+ - **PDFs, Word docs** - Instant text extraction
275
+ - **Videos, audio files** - Automatic transcription
276
+ - **Images** - OCR text recognition
277
+ - **Web content** - Clean text extraction
278
+ - **Multiple files** - Batch processing support
279
+
280
+ ### Features
281
+
282
+ - **Zero-install processing**: Uses `uvx` for isolated execution
283
+ - **Multiple output options**: Clipboard or TextEdit display
284
+ - **System notifications**: Visual feedback on completion
285
+ - **Wide format support**: 20+ file types supported
286
+ - **Batch processing**: Handle multiple files at once
287
+ - **Keyboard shortcuts**: Assignable hotkeys for power users
288
+
289
+ For complete setup instructions with copy-paste scripts, see [macOS Services Documentation](docs/macos.md).
290
+
197
291
  ## Using with Langchain
198
292
 
199
293
  For users integrating with the [Langchain](https://python.langchain.com/) framework, `content-core` exposes a set of compatible tools. These tools, located in the `src/content_core/tools` directory, allow you to leverage `content-core` extraction, cleaning, and summarization capabilities directly within your Langchain agents and chains.
@@ -22,6 +22,8 @@ The primary goal of Content Core is to simplify the process of ingesting content
22
22
  * For files: Tries Docling extraction first (for robust document parsing), then falls back to simple extraction if needed.
23
23
  * You can override this by specifying an engine, but `'auto'` is recommended for most users.
24
24
  * **Content Cleaning (Optional):** Likely integrates with LLMs (via `prompter.py` and Jinja templates) to refine and clean the extracted content.
25
+ * **MCP Server:** Includes a Model Context Protocol (MCP) server for seamless integration with Claude Desktop and other MCP-compatible applications.
26
+ * **macOS Services:** Right-click context menu integration for Finder (extract and summarize files directly).
25
27
  * **Asynchronous:** Built with `asyncio` for efficient I/O operations.
26
28
 
27
29
  ## Getting Started
@@ -31,8 +33,11 @@ The primary goal of Content Core is to simplify the process of ingesting content
31
33
  Install Content Core using `pip`:
32
34
 
33
35
  ```bash
34
- # Install the package (without Docling)
36
+ # Install the package
35
37
  pip install content-core
38
+
39
+ # Install with MCP server support
40
+ pip install content-core[mcp]
36
41
  ```
37
42
 
38
43
  Alternatively, if you’re developing locally:
@@ -51,6 +56,18 @@ uv sync
51
56
  Content Core provides three CLI commands for extracting, cleaning, and summarizing content:
52
57
  ccore, cclean, and csum. These commands support input from text, URLs, files, or piped data (e.g., via cat file | command).
53
58
 
59
+ **Zero-install usage with uvx:**
60
+ ```bash
61
+ # Extract content
62
+ uvx --from "content-core" ccore https://example.com
63
+
64
+ # Clean content
65
+ uvx --from "content-core" cclean "messy content"
66
+
67
+ # Summarize content
68
+ uvx --from "content-core" csum "long text" --context "bullet points"
69
+ ```
70
+
54
71
  #### ccore - Extract Content
55
72
 
56
73
  Extracts content from text, URLs, or files, with optional formatting.
@@ -159,6 +176,81 @@ summary = await cc.summarize_content("long article text", context="explain to a
159
176
 
160
177
  For more information on how to use the Content Core library, including details on AI model configuration and customization, refer to our [Usage Documentation](docs/usage.md).
161
178
 
179
+ ## MCP Server Integration
180
+
181
+ Content Core includes a Model Context Protocol (MCP) server that enables seamless integration with Claude Desktop and other MCP-compatible applications. The MCP server exposes Content Core's powerful extraction capabilities through a standardized protocol.
182
+
183
+ ### Quick Setup with Claude Desktop
184
+
185
+ ```bash
186
+ # Install with MCP support
187
+ pip install content-core[mcp]
188
+
189
+ # Or use directly with uvx (no installation required)
190
+ uvx --from "content-core[mcp]" content-core-mcp
191
+ ```
192
+
193
+ Add to your `claude_desktop_config.json`:
194
+ ```json
195
+ {
196
+ "mcpServers": {
197
+ "content-core": {
198
+ "command": "uvx",
199
+ "args": [
200
+ "--from",
201
+ "content-core[mcp]",
202
+ "content-core-mcp"
203
+ ]
204
+ }
205
+ }
206
+ }
207
+ ```
208
+
209
+ For detailed setup instructions, configuration options, and usage examples, see our [MCP Documentation](docs/mcp.md).
210
+
211
+ ## macOS Services Integration
212
+
213
+ Content Core provides powerful right-click integration with macOS Finder, allowing you to extract and summarize content from any file without installation. Choose between clipboard or TextEdit output for maximum flexibility.
214
+
215
+ ### Available Services
216
+
217
+ Create **4 convenient services** for different workflows:
218
+
219
+ - **Extract Content → Clipboard** - Quick copy for immediate pasting
220
+ - **Extract Content → TextEdit** - Review before using
221
+ - **Summarize Content → Clipboard** - Quick summary copying
222
+ - **Summarize Content → TextEdit** - Formatted summary with headers
223
+
224
+ ### Quick Setup
225
+
226
+ 1. **Install uv** (if not already installed):
227
+ ```bash
228
+ curl -LsSf https://astral.sh/uv/install.sh | sh
229
+ ```
230
+
231
+ 2. **Create services manually** using Automator (5 minutes setup)
232
+
233
+ ### Usage
234
+
235
+ **Right-click any supported file** in Finder → **Services** → Choose your option:
236
+
237
+ - **PDFs, Word docs** - Instant text extraction
238
+ - **Videos, audio files** - Automatic transcription
239
+ - **Images** - OCR text recognition
240
+ - **Web content** - Clean text extraction
241
+ - **Multiple files** - Batch processing support
242
+
243
+ ### Features
244
+
245
+ - **Zero-install processing**: Uses `uvx` for isolated execution
246
+ - **Multiple output options**: Clipboard or TextEdit display
247
+ - **System notifications**: Visual feedback on completion
248
+ - **Wide format support**: 20+ file types supported
249
+ - **Batch processing**: Handle multiple files at once
250
+ - **Keyboard shortcuts**: Assignable hotkeys for power users
251
+
252
+ For complete setup instructions with copy-paste scripts, see [macOS Services Documentation](docs/macos.md).
253
+
162
254
  ## Using with Langchain
163
255
 
164
256
  For users integrating with the [Langchain](https://python.langchain.com/) framework, `content-core` exposes a set of compatible tools. These tools, located in the `src/content_core/tools` directory, allow you to leverage `content-core` extraction, cleaning, and summarization capabilities directly within your Langchain agents and chains.
@@ -0,0 +1,287 @@
1
+ # macOS Services Integration
2
+
3
+ Content Core can be integrated into macOS Finder as right-click context menu services, allowing you to extract and summarize content directly from files without any installation.
4
+
5
+ ## Features
6
+
7
+ - **Right-click integration**: Extract or summarize any file directly from Finder
8
+ - **Zero-install processing**: Uses `uvx` for isolated execution
9
+ - **Multiple output options**: Clipboard or TextEdit display
10
+ - **System notifications**: Get notified when processing completes
11
+ - **Wide format support**: PDFs, Word docs, videos, audio files, images, and more
12
+
13
+ ## Quick Setup
14
+
15
+ ### Prerequisites
16
+
17
+ 1. **Install uv** (if not already installed):
18
+ ```bash
19
+ curl -LsSf https://astral.sh/uv/install.sh | sh
20
+ ```
21
+
22
+ 2. **Restart your terminal** after installation
23
+
24
+ ### Create the Services
25
+
26
+ We'll create **4 different services** for different use cases:
27
+
28
+ 1. **Extract Content → Clipboard**
29
+ 2. **Extract Content → TextEdit**
30
+ 3. **Summarize Content → Clipboard**
31
+ 4. **Summarize Content → TextEdit**
32
+
33
+ ## Service Scripts
34
+
35
+ ### 1. Extract Content → Clipboard
36
+
37
+ **Service Name:** `Extract Content (Clipboard)`
38
+
39
+ ```bash
40
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
41
+
42
+ for file in "$@"; do
43
+ echo "Extracting content from: $(basename "$file")"
44
+ uvx --from "content-core" ccore "$file" | pbcopy
45
+ osascript -e 'display notification "Content extracted and copied to clipboard" with title "Content Core"'
46
+ done
47
+ ```
48
+
49
+ ### 2. Extract Content → TextEdit
50
+
51
+ **Service Name:** `Extract Content (TextEdit)`
52
+
53
+ ```bash
54
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
55
+
56
+ for file in "$@"; do
57
+ filename=$(basename "$file")
58
+ echo "Extracting content from: $filename"
59
+
60
+ # Create temporary file for the extracted content
61
+ temp_file="/tmp/extracted_$(date +%s)_$filename.txt"
62
+
63
+ # Extract content and save to temp file
64
+ uvx --from "content-core" ccore "$file" > "$temp_file"
65
+
66
+ # Open in TextEdit
67
+ open -a "TextEdit" "$temp_file"
68
+
69
+ osascript -e 'display notification "Content extracted and opened in TextEdit" with title "Content Core"'
70
+ done
71
+ ```
72
+
73
+ ### 3. Summarize Content → Clipboard
74
+
75
+ **Service Name:** `Summarize Content (Clipboard)`
76
+
77
+ ```bash
78
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
79
+
80
+ for file in "$@"; do
81
+ echo "Summarizing content from: $(basename "$file")"
82
+ uvx --from "content-core" csum "$file" 2>/dev/null | pbcopy
83
+ osascript -e 'display notification "Summary copied to clipboard" with title "Content Core"'
84
+ done
85
+ ```
86
+
87
+ ### 4. Summarize Content → TextEdit
88
+
89
+ **Service Name:** `Summarize Content (TextEdit)`
90
+
91
+ ```bash
92
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
93
+
94
+ for file in "$@"; do
95
+ filename=$(basename "$file")
96
+ echo "Summarizing content from: $filename"
97
+
98
+ # Create temporary file for the summary
99
+ temp_file="/tmp/summary_$(date +%s)_$filename.txt"
100
+
101
+ # Add header to the summary
102
+ echo "=== SUMMARY OF: $filename ===" > "$temp_file"
103
+ echo "Generated on: $(date)" >> "$temp_file"
104
+ echo "" >> "$temp_file"
105
+
106
+ # Generate summary and append to temp file
107
+ uvx --from "content-core" csum "$file" 2>/dev/null >> "$temp_file"
108
+
109
+ # Open in TextEdit
110
+ open -a "TextEdit" "$temp_file"
111
+
112
+ osascript -e 'display notification "Summary opened in TextEdit" with title "Content Core"'
113
+ done
114
+ ```
115
+
116
+ ## Step-by-Step Installation
117
+
118
+ ### For Each Service:
119
+
120
+ 1. **Open Automator** (Cmd+Space → type "Automator")
121
+ 2. Choose **"Quick Action"**
122
+ 3. Configure the service:
123
+ - Set **"Workflow receives current"** → **"files or folders"**
124
+ - Set **"in"** → **"Finder"**
125
+ 4. **Drag "Run Shell Script"** from Actions to the workflow area
126
+ 5. **Configure the shell script**:
127
+ - Make sure **"Pass input: as arguments"** is selected
128
+ - **Paste the appropriate script** from above
129
+ 6. **Save** with the service name (e.g., "Extract Content (Clipboard)")
130
+ 7. **Repeat** for all 4 services
131
+
132
+ ## Usage
133
+
134
+ After installation, **right-click any supported file** in Finder:
135
+
136
+ ### In the Services submenu, you'll see:
137
+ - **Extract Content (Clipboard)** - Content copied to clipboard
138
+ - **Extract Content (TextEdit)** - Content opens in TextEdit
139
+ - **Summarize Content (Clipboard)** - Summary copied to clipboard
140
+ - **Summarize Content (TextEdit)** - Summary opens in TextEdit
141
+
142
+ ### Supported File Types
143
+
144
+ Content Core services work with:
145
+
146
+ #### Documents
147
+ - **PDFs** - Text extraction with layout preservation
148
+ - **Word Documents** (.docx) - Full text and formatting
149
+ - **PowerPoint** (.pptx) - Slide content and speaker notes
150
+ - **Excel** (.xlsx) - Cell data and formulas
151
+ - **Text files** (.txt, .md, .csv)
152
+
153
+ #### Web & Markup
154
+ - **HTML files** - Clean text extraction
155
+ - **Markdown files** - Formatted content
156
+ - **EPUB books** - Chapter text
157
+
158
+ #### Media Files
159
+ - **Videos** (.mp4, .avi, .mov, .mkv) - Automatic transcription
160
+ - **Audio** (.mp3, .wav, .m4a, .flac) - Speech-to-text conversion
161
+ - **Images** (.jpg, .png, .tiff) - OCR text extraction
162
+
163
+ #### Archives
164
+ - **ZIP files** - Extract text from contained files
165
+ - **Compressed formats** - Automatic extraction and processing
166
+
167
+ ## Customization
168
+
169
+ ### Custom Output Locations
170
+
171
+ Want to save to a specific folder instead of temp files? Modify the TextEdit scripts:
172
+
173
+ ```bash
174
+ # Save to Desktop
175
+ output_file="~/Desktop/extracted_$filename.txt"
176
+
177
+ # Save to Documents folder
178
+ output_file="~/Documents/ContentCore/extracted_$filename.txt"
179
+ ```
180
+
181
+ ### Custom Summary Context
182
+
183
+ Add context to your summaries by modifying the csum command:
184
+
185
+ ```bash
186
+ # Summarize as bullet points
187
+ uvx --from "content-core" csum "$file" --context "bullet points"
188
+
189
+ # Summarize for a specific audience
190
+ uvx --from "content-core" csum "$file" --context "explain to a child"
191
+
192
+ # Executive summary
193
+ uvx --from "content-core" csum "$file" --context "executive summary"
194
+ ```
195
+
196
+ ### JSON Output
197
+
198
+ For structured data, use JSON format:
199
+
200
+ ```bash
201
+ uvx --from "content-core" ccore "$file" --format json
202
+ ```
203
+
204
+ ## Troubleshooting
205
+
206
+ ### Services Not Appearing?
207
+
208
+ 1. **Restart Finder**: `killall Finder`
209
+ 2. **Check Services settings**:
210
+ - Go to **System Preferences** → **Keyboard** → **Shortcuts** → **Services**
211
+ - Look in **"Files and Folders"** section
212
+ - **Enable** the Content Core services
213
+
214
+ ### Permission Issues?
215
+
216
+ - macOS might ask for permission to run scripts
217
+ - **Grant access** when prompted
218
+ - Check **Security & Privacy** settings if needed
219
+
220
+ ### uvx Not Found Error?
221
+
222
+ - Make sure the **PATH export line** is at the top of each script
223
+ - Verify uvx location: `which uvx`
224
+ - Update the PATH if uvx is in a different location
225
+
226
+ ### Services Work But No Content?
227
+
228
+ - Check if you have the required API keys for certain content types:
229
+ - **OPENAI_API_KEY** - Required for audio/video transcription
230
+ - **FIRECRAWL_API_KEY** - Optional, for better web content extraction
231
+
232
+ Add API keys to your shell profile:
233
+ ```bash
234
+ echo 'export OPENAI_API_KEY="your-key-here"' >> ~/.zshrc
235
+ source ~/.zshrc
236
+ ```
237
+
238
+ ## Advanced Usage
239
+
240
+ ### Keyboard Shortcuts
241
+
242
+ Assign keyboard shortcuts to your services:
243
+
244
+ 1. **System Preferences** → **Keyboard** → **Shortcuts** → **Services**
245
+ 2. Find your Content Core services
246
+ 3. **Click** next to the service name
247
+ 4. **Press** your desired key combination
248
+
249
+ ### Batch Processing
250
+
251
+ Services work with **multiple selected files**:
252
+
253
+ 1. **Select multiple files** in Finder (Cmd+click)
254
+ 2. **Right-click** → **Services** → Choose your service
255
+ 3. **All files** will be processed sequentially
256
+
257
+ ### Integration with Other Apps
258
+
259
+ The extracted content works great with:
260
+
261
+ - **Note-taking apps** (Obsidian, Notion, Bear)
262
+ - **Research tools** (DEVONthink, Zotero)
263
+ - **Writing apps** (Ulysses, Scrivener)
264
+ - **Code editors** (VS Code, Sublime Text)
265
+
266
+ Simply use the clipboard versions and paste into your preferred app!
267
+
268
+ ## Tips & Best Practices
269
+
270
+ 1. **Use descriptive file names** - They appear in notifications
271
+ 2. **Process one large file at a time** - Videos/audio take time to transcribe
272
+ 3. **Check clipboard** after extraction - Some content might be very long
273
+ 4. **Use TextEdit version** for long documents to review before copying
274
+ 5. **Set up API keys** for full functionality with media files
275
+
276
+ ## Uninstalling
277
+
278
+ To remove the services:
279
+
280
+ ```bash
281
+ rm -rf ~/Library/Services/"Extract Content (Clipboard).workflow"
282
+ rm -rf ~/Library/Services/"Extract Content (TextEdit).workflow"
283
+ rm -rf ~/Library/Services/"Summarize Content (Clipboard).workflow"
284
+ rm -rf ~/Library/Services/"Summarize Content (TextEdit).workflow"
285
+ ```
286
+
287
+ Then restart Finder: `killall Finder`