mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-04-29 12:00:00 +00:00
separate source and content graph
This commit is contained in:
parent
b42a95b35f
commit
2e2a4947b3
12 changed files with 167 additions and 56 deletions
|
|
@ -3,7 +3,7 @@ from loguru import logger
|
|||
from openpyxl import load_workbook
|
||||
from pptx import Presentation
|
||||
|
||||
from open_notebook.graphs.content_processing.state import SourceState
|
||||
from open_notebook.graphs.content_processing.state import ContentState
|
||||
|
||||
SUPPORTED_OFFICE_TYPES = [
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
|
|
@ -251,7 +251,7 @@ def get_xlsx_info(file_path):
|
|||
return None
|
||||
|
||||
|
||||
def extract_office_content(state: SourceState):
|
||||
def extract_office_content(state: ContentState):
|
||||
"""Universal function to extract content from Office files"""
|
||||
assert state.get("file_path"), "No file path provided"
|
||||
assert (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue