Skip to content

feat: Google Docs, Files, PDF URLs, Spreadsheets, Presentations to EXPORT URL #320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

vtempest
Copy link

@vtempest vtempest commented Jun 7, 2025

Google Docs, Files, PDF URLs, Spreadsheets, Presentations to EXPORT URL

Copy link

mergify bot commented Jun 7, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@vtempest vtempest changed the title # Google Docs, Files, PDF URLs, Spreadsheets, Presentations to EXPORT URL feat: Google Docs, Files, PDF URLs, Spreadsheets, Presentations to EXPORT URL Jun 7, 2025
)
elif doc_type == "presentation":
http_url = TypeAdapter(AnyHttpUrl).validate_python(
f"https://docs.google.com/presentation/d/{doc_id}/export/pptx"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this different on purpose or just a copy&paste typo?

Copy link
Author

@vtempest vtempest Jun 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed a new PR and closed old one since it has the old code. Let me know if typo needs to be fixed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm actually wondering if it shouldn't be like this

Suggested change
f"https://docs.google.com/presentation/d/{doc_id}/export/pptx"
f"https://docs.google.com/presentation/d/{doc_id}/export?format=pptx"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both ways have been tested to work

Copy link

codecov bot commented Jun 7, 2025

Codecov Report

Attention: Patch coverage is 23.07692% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
docling_core/utils/file.py 23.07% 10 Missing ⚠️

📢 Thoughts on this report? Let us know!

@dolfim-ibm
Copy link
Contributor

@vtempest it seems your commits are not yet signed-off. Can you please follow the steps in https://github.com/docling-project/docling-core/pull/320/checks?check_run_id=43652326093?

@vtempest
Copy link
Author

vtempest commented Jun 8, 2025

Codecov Report

Attention: Patch coverage is 23.07692% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
docling_core/utils/file.py 23.07% 10 Missing ⚠️
📢 Thoughts on this report? Let us know!

Will someone write unit tests for codecov? Or where to add them?

@vtempest
Copy link
Author

vtempest commented Jun 8, 2025

should this be in a separate file like called url-to-doc-adapters.py

which should handle google docs, dropbox, scribr etc

@vtempest vtempest force-pushed the main branch 2 times, most recently from 2b5bf24 to 1321794 Compare June 8, 2025 20:40
@dolfim-ibm
Copy link
Contributor

Will someone write unit tests for codecov? Or where to add them?

This is checking the overall tests in the repo. But in this case I don't really know if we can easily make tests. Maybe with some public readable links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants