content-core 1.2.2__tar.gz → 1.2.3__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 (90) hide show
  1. {content_core-1.2.2 → content_core-1.2.3}/.gitignore +3 -1
  2. {content_core-1.2.2 → content_core-1.2.3}/PKG-INFO +1 -1
  3. {content_core-1.2.2 → content_core-1.2.3}/pyproject.toml +1 -1
  4. {content_core-1.2.2 → content_core-1.2.3}/uv.lock +1 -1
  5. content_core-1.2.2/.claude/commands/pr-review.md +0 -6
  6. content_core-1.2.2/mcp.md +0 -248
  7. content_core-1.2.2/test.py +0 -16
  8. {content_core-1.2.2 → content_core-1.2.3}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  9. {content_core-1.2.2 → content_core-1.2.3}/.github/workflows/claude-code-review.yml +0 -0
  10. {content_core-1.2.2 → content_core-1.2.3}/.github/workflows/claude.yml +0 -0
  11. {content_core-1.2.2 → content_core-1.2.3}/.github/workflows/publish.yml +0 -0
  12. {content_core-1.2.2 → content_core-1.2.3}/.python-version +0 -0
  13. {content_core-1.2.2 → content_core-1.2.3}/CONTRIBUTING.md +0 -0
  14. {content_core-1.2.2 → content_core-1.2.3}/LICENSE +0 -0
  15. {content_core-1.2.2 → content_core-1.2.3}/Makefile +0 -0
  16. {content_core-1.2.2 → content_core-1.2.3}/README.md +0 -0
  17. {content_core-1.2.2 → content_core-1.2.3}/docs/macos.md +0 -0
  18. {content_core-1.2.2 → content_core-1.2.3}/docs/mcp.md +0 -0
  19. {content_core-1.2.2 → content_core-1.2.3}/docs/processors.md +0 -0
  20. {content_core-1.2.2 → content_core-1.2.3}/docs/raycast.md +0 -0
  21. {content_core-1.2.2 → content_core-1.2.3}/docs/usage.md +0 -0
  22. {content_core-1.2.2 → content_core-1.2.3}/prompts/content/cleanup.jinja +0 -0
  23. {content_core-1.2.2 → content_core-1.2.3}/prompts/content/summarize.jinja +0 -0
  24. {content_core-1.2.2 → content_core-1.2.3}/raycast-content-core/.eslintrc.json +0 -0
  25. {content_core-1.2.2 → content_core-1.2.3}/raycast-content-core/CHANGELOG.md +0 -0
  26. {content_core-1.2.2 → content_core-1.2.3}/raycast-content-core/README.md +0 -0
  27. {content_core-1.2.2 → content_core-1.2.3}/raycast-content-core/assets/command-icon.png +0 -0
  28. {content_core-1.2.2 → content_core-1.2.3}/raycast-content-core/package-lock.json +0 -0
  29. {content_core-1.2.2 → content_core-1.2.3}/raycast-content-core/package.json +0 -0
  30. {content_core-1.2.2 → content_core-1.2.3}/raycast-content-core/raycast-env.d.ts +0 -0
  31. {content_core-1.2.2 → content_core-1.2.3}/raycast-content-core/src/extract-content.tsx +0 -0
  32. {content_core-1.2.2 → content_core-1.2.3}/raycast-content-core/src/quick-extract.tsx +0 -0
  33. {content_core-1.2.2 → content_core-1.2.3}/raycast-content-core/src/summarize-content.tsx +0 -0
  34. {content_core-1.2.2 → content_core-1.2.3}/raycast-content-core/src/utils/content-core.ts +0 -0
  35. {content_core-1.2.2 → content_core-1.2.3}/raycast-content-core/src/utils/types.ts +0 -0
  36. {content_core-1.2.2 → content_core-1.2.3}/raycast-content-core/tsconfig.json +0 -0
  37. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/__init__.py +0 -0
  38. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/cc_config.yaml +0 -0
  39. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/common/__init__.py +0 -0
  40. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/common/exceptions.py +0 -0
  41. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/common/state.py +0 -0
  42. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/common/types.py +0 -0
  43. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/common/utils.py +0 -0
  44. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/config.py +0 -0
  45. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/content/__init__.py +0 -0
  46. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/content/cleanup/__init__.py +0 -0
  47. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/content/cleanup/core.py +0 -0
  48. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/content/extraction/__init__.py +0 -0
  49. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/content/extraction/graph.py +0 -0
  50. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/content/identification/__init__.py +0 -0
  51. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/content/summary/__init__.py +0 -0
  52. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/content/summary/core.py +0 -0
  53. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/logging.py +0 -0
  54. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/mcp/__init__.py +0 -0
  55. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/mcp/server.py +0 -0
  56. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/models.py +0 -0
  57. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/models_config.yaml +0 -0
  58. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/notebooks/run.ipynb +0 -0
  59. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/notebooks/urls.ipynb +0 -0
  60. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/processors/audio.py +0 -0
  61. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/processors/docling.py +0 -0
  62. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/processors/office.py +0 -0
  63. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/processors/pdf.py +0 -0
  64. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/processors/text.py +0 -0
  65. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/processors/url.py +0 -0
  66. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/processors/video.py +0 -0
  67. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/processors/youtube.py +0 -0
  68. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/py.typed +0 -0
  69. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/templated_message.py +0 -0
  70. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/tools/__init__.py +0 -0
  71. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/tools/cleanup.py +0 -0
  72. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/tools/extract.py +0 -0
  73. {content_core-1.2.2 → content_core-1.2.3}/src/content_core/tools/summarize.py +0 -0
  74. {content_core-1.2.2 → content_core-1.2.3}/tests/input_content/file.docx +0 -0
  75. {content_core-1.2.2 → content_core-1.2.3}/tests/input_content/file.epub +0 -0
  76. {content_core-1.2.2 → content_core-1.2.3}/tests/input_content/file.md +0 -0
  77. {content_core-1.2.2 → content_core-1.2.3}/tests/input_content/file.mp3 +0 -0
  78. {content_core-1.2.2 → content_core-1.2.3}/tests/input_content/file.mp4 +0 -0
  79. {content_core-1.2.2 → content_core-1.2.3}/tests/input_content/file.pdf +0 -0
  80. {content_core-1.2.2 → content_core-1.2.3}/tests/input_content/file.pptx +0 -0
  81. {content_core-1.2.2 → content_core-1.2.3}/tests/input_content/file.txt +0 -0
  82. {content_core-1.2.2 → content_core-1.2.3}/tests/input_content/file.xlsx +0 -0
  83. {content_core-1.2.2 → content_core-1.2.3}/tests/input_content/file_audio.mp3 +0 -0
  84. {content_core-1.2.2 → content_core-1.2.3/tests/input_content}/new_pdf.pdf +0 -0
  85. {content_core-1.2.2 → content_core-1.2.3}/tests/integration/test_cli.py +0 -0
  86. {content_core-1.2.2 → content_core-1.2.3}/tests/integration/test_extraction.py +0 -0
  87. {content_core-1.2.2 → content_core-1.2.3}/tests/unit/test_config.py +0 -0
  88. {content_core-1.2.2 → content_core-1.2.3}/tests/unit/test_docling.py +0 -0
  89. {content_core-1.2.2 → content_core-1.2.3}/tests/unit/test_mcp_server.py +0 -0
  90. {content_core-1.2.2 → content_core-1.2.3}/tests/unit/test_pymupdf_ocr.py +0 -0
@@ -25,4 +25,6 @@ WIP/
25
25
  CLAUDE.md
26
26
 
27
27
  node_modules/
28
- **/notebooks/private
28
+ **/notebooks/private
29
+
30
+ .claude/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: content-core
3
- Version: 1.2.2
3
+ Version: 1.2.3
4
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "content-core"
3
- version = "1.2.2"
3
+ version = "1.2.3"
4
4
  description = "Extract what matters from any media source. Available as Python Library, macOS Service, CLI and MCP Server"
5
5
  readme = "README.md"
6
6
  homepage = "https://github.com/lfnovo/content-core"
@@ -419,7 +419,7 @@ wheels = [
419
419
 
420
420
  [[package]]
421
421
  name = "content-core"
422
- version = "1.2.2"
422
+ version = "1.2.3"
423
423
  source = { editable = "." }
424
424
  dependencies = [
425
425
  { name = "ai-prompter" },
@@ -1,6 +0,0 @@
1
-
2
- When I ask you to do a PR, you will commit the necessary files and open up a pull request. As soon as you open the pull request, an automatic review process will start. The review process will provide feedback on the code quality and best practices, potential bugs or issues, performance considerations, security concerns, and test coverage.
3
-
4
- You should query the PR after opening it to get the commends from the review tool. Then, you will assess the comments and propose me which of them we need to address.
5
-
6
- Then, we'll do the changes, commit them and add a comment back to the PR so that the review tool undertands what we changed and what we ignored.
content_core-1.2.2/mcp.md DELETED
@@ -1,248 +0,0 @@
1
- # MCP Server Implementation Plan for Content Core
2
-
3
- ## Overview
4
- Implement a FastMCP server that exposes Content Core's extraction functionality through the Model Context Protocol (MCP). The server will provide a single tool `extract_content` that accepts either a URL or file path and returns extracted content in JSON format using the 'auto' engine.
5
-
6
- ## Architecture
7
-
8
- ### 1. Dependencies
9
- ```toml
10
- # Add to pyproject.toml as optional dependency
11
- [project.optional-dependencies]
12
- mcp = ["fastmcp>=0.5.0"]
13
-
14
- # Add script entry point for uvx
15
- [project.scripts]
16
- content-core-mcp = "content_core.mcp.server:main"
17
- ```
18
-
19
- This allows users to install with MCP support using:
20
- ```bash
21
- pip install content-core[mcp]
22
- # or with uv
23
- uv pip install content-core[mcp]
24
- ```
25
-
26
- ### 2. Server Structure
27
- ```
28
- src/content_core/
29
- ├── mcp/
30
- │ ├── __init__.py
31
- │ └── server.py # Main MCP server implementation
32
- ```
33
-
34
- ### 3. Implementation Details
35
-
36
- #### Server Setup (`server.py`)
37
- ```python
38
- from fastmcp import FastMCP
39
- from typing import Optional, Dict, Any
40
- import content_core as cc
41
-
42
- # Initialize MCP server
43
- mcp = FastMCP("Content Core MCP Server")
44
- ```
45
-
46
- #### Tool Definition
47
- The `extract_content` tool will:
48
- - Accept either `url` or `file_path` as optional parameters
49
- - Validate that exactly one is provided
50
- - Return extracted content in JSON format
51
- - Use the 'auto' engine by default
52
-
53
- ```python
54
- @mcp.tool
55
- async def extract_content(
56
- url: Optional[str] = None,
57
- file_path: Optional[str] = None
58
- ) -> Dict[str, Any]:
59
- """
60
- Extract content from a URL or file using Content Core's auto engine.
61
-
62
- Args:
63
- url: Optional URL to extract content from
64
- file_path: Optional file path to extract content from
65
-
66
- Returns:
67
- JSON object containing extracted content and metadata
68
-
69
- Raises:
70
- ValueError: If neither or both url and file_path are provided
71
- """
72
- # Implementation details below
73
- ```
74
-
75
- #### Input Validation
76
- - Ensure exactly one input source is provided
77
- - Validate URL format if URL is provided
78
- - Validate file existence if file_path is provided
79
-
80
- #### Integration with Content Core
81
- ```python
82
- # Build extraction request
83
- extraction_request = {}
84
- if url:
85
- extraction_request["url"] = url
86
- elif file_path:
87
- extraction_request["file_path"] = file_path
88
-
89
- # Use Content Core's extract_content with auto engine
90
- result = await cc.extract_content(extraction_request)
91
- ```
92
-
93
- #### Return Format
94
- The tool will return a JSON structure containing:
95
- ```json
96
- {
97
- "source_type": "url" | "file",
98
- "source": "<url or file_path>",
99
- "content": "<extracted content>",
100
- "metadata": {
101
- "engine_used": "<actual engine used by auto>",
102
- "content_type": "<detected content type>",
103
- "extraction_time": "<ISO timestamp>",
104
- // Additional metadata from Content Core
105
- },
106
- "success": true,
107
- "error": null // or error message if extraction failed
108
- }
109
- ```
110
-
111
- #### Error Handling
112
- - Wrap extraction in try/except block
113
- - Return structured error response on failure
114
- - Log errors using Context if needed
115
- - Handle specific Content Core exceptions
116
-
117
- ### 4. Running the Server
118
-
119
- #### Entry Point (`main` function)
120
- ```python
121
- def main():
122
- """Entry point for the MCP server."""
123
- import sys
124
- # Run with STDIO transport for MCP compatibility
125
- mcp.run()
126
-
127
- if __name__ == "__main__":
128
- main()
129
- ```
130
-
131
- #### Usage with uvx
132
- Users can run the server directly with uvx (no installation required):
133
- ```bash
134
- # Run the MCP server
135
- uvx --from "content-core[mcp]" content-core-mcp
136
- ```
137
-
138
- #### Claude Desktop Configuration
139
- Add to `claude_desktop_config.json`:
140
- ```json
141
- {
142
- "mcpServers": {
143
- "content-core": {
144
- "command": "uvx",
145
- "args": [
146
- "--from",
147
- "content-core[mcp]",
148
- "content-core-mcp"
149
- ]
150
- }
151
- }
152
- }
153
- ```
154
-
155
- #### Alternative: Local Development
156
- ```bash
157
- # Install with MCP support
158
- uv pip install -e ".[mcp]"
159
-
160
- # Run directly
161
- content-core-mcp
162
- ```
163
-
164
- ### 5. Testing Strategy
165
-
166
- #### Unit Tests
167
- - Test input validation logic
168
- - Mock Content Core extraction calls
169
- - Verify JSON response structure
170
-
171
- #### Integration Tests
172
- - Test with real URLs
173
- - Test with various file types
174
- - Verify auto engine selection works correctly
175
-
176
- ### 6. Documentation
177
-
178
- #### Usage Example
179
- ```python
180
- # Client code example
181
- from fastmcp import Client
182
-
183
- client = Client()
184
- result = await client.call_tool(
185
- "extract_content",
186
- {"url": "https://example.com/article"}
187
- )
188
- ```
189
-
190
- ### 7. Configuration
191
-
192
- #### Environment Variables
193
- - Support existing Content Core environment variables
194
- - Allow MCP-specific configuration if needed
195
-
196
- #### Config File Support
197
- - Use existing `cc_config.yaml` if present
198
- - Allow override via MCP server initialization
199
-
200
- ### 8. Future Enhancements (Not in initial implementation)
201
- - Add streaming support for large files
202
- - Support for multiple URLs/files in one request
203
- - Add content cleaning and summarization tools
204
- - Support custom extraction engines per request
205
- - Add resource endpoints for browsing extracted content
206
-
207
- ### 9. Implementation Steps
208
-
209
- 1. Create `mcp/` directory structure
210
- 2. Implement basic server with extract_content tool
211
- 3. Add input validation and error handling
212
- 4. Integrate with Content Core extraction
213
- 5. Format JSON response properly
214
- 6. Add comprehensive logging
215
- 7. Write unit tests
216
- 8. Write integration tests
217
- 9. Add documentation and examples
218
- 10. Test with various MCP clients
219
-
220
- ### 10. Key Considerations
221
-
222
- - **Async First**: Use async/await throughout since Content Core is async
223
- - **Error Messages**: Provide clear, actionable error messages
224
- - **Performance**: Consider caching for repeated requests
225
- - **Security**: Validate file paths to prevent directory traversal
226
- - **Compatibility**: Ensure works with all Content Core extraction engines
227
-
228
- ### 11. Publishing and Distribution
229
-
230
- #### PyPI Package
231
- The MCP server will be included as an optional extra in the main content-core package:
232
- - Users install with `pip install content-core[mcp]`
233
- - The `content-core-mcp` command becomes available after installation
234
- - Works seamlessly with `uvx` for zero-install usage
235
-
236
- #### Benefits of uvx approach:
237
- 1. **No installation required**: Users can run directly with `uvx`
238
- 2. **Automatic updates**: Always uses the latest published version
239
- 3. **Isolation**: Runs in isolated environment, avoiding dependency conflicts
240
- 4. **Simple configuration**: Just add to `claude_desktop_config.json`
241
-
242
- #### Example MCP server listing entry:
243
- ```yaml
244
- name: content-core
245
- description: Extract content from URLs and files using Content Core
246
- commands:
247
- - uvx --from "content-core[mcp]" content-core-mcp
248
- ```
@@ -1,16 +0,0 @@
1
- import asyncio
2
-
3
- from crawl4ai import *
4
-
5
-
6
- async def main():
7
- async with AsyncWebCrawler() as crawler:
8
- result = await crawler.arun(
9
- url="https://www.nbcnews.com/business",
10
- )
11
- print(result.markdown)
12
- print(result.title)
13
-
14
-
15
- if __name__ == "__main__":
16
- asyncio.run(main())
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes