Skip to content
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

Cn OCR support in MacOS #418

Merged
merged 5 commits into from
Oct 4, 2024
Merged

Cn OCR support in MacOS #418

merged 5 commits into from
Oct 4, 2024

Conversation

QuincySan
Copy link
Contributor


name: pull request
about: submit changes to the project
title: "[PR] Add and optimize Chinese OCR support"
labels: enhancement
assignees: ''


description

This PR adds and optimizes Chinese OCR support in MacOS. These changes aim to expand Screen Pipe’s user base, particularly among Chinese-speaking users.

I used Cursor with o1 and Sonnet 3.5 to assist in generating parts of the code. As I am new to coding, if there are any areas that don’t align with the project’s style, please feel free to provide feedback. I’ve read the CONTRIBUTING.md. :)

Note: Since making these modifications, the original repository has had updates that I am currently unable to resolve or merge on my own. I would appreciate any assistance with handling these differences.

type of change

  • bug fix (non-breaking change which fixes an issue)
  • new feature (non-breaking change which adds functionality)
  • breaking change (fix or feature that would cause existing functionality to not work as expected)
  • this change requires a documentation update

how to test

To test these changes:

  1. Checkout this branch: CN_support
  2. Run cargo build --release --features metal to build the project for macOS.
  3. If the web page cannot be opened, build the desktop app using the appropriate build instructions for your platform.
  4. Open the page or window that contains Chinese content.
  5. Select the specific app used to display Chinese content and press "search."
  6. The recognized Chinese text will appear in the result and should work seamlessly with the LLM.

screenshots (if applicable)

  • Here is a screenshot of the Screen Pipe desktop page, showing Chinese characters successfully recognized by OCR in the search results.
iShot_2024-10-03_4 17 37

checklist

  • I read the Rust & programming best practices
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • Other operating systems are not broken by my changes

additional notes

  • There may be some differences between the main branch and my CN_support branch due to recent updates to the original repository. I currently lack the ability to resolve these differences and would appreciate any assistance or guidance.

Copy link

vercel bot commented Oct 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
screenpipe ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 4, 2024 9:11am

@louis030195
Copy link
Collaborator

/tip $100 @QuincySan

Copy link

algora-pbc bot commented Oct 3, 2024

@QuincySan: You just got a $100 tip! 👉 Complete your Algora onboarding to collect your payment.

@louis030195
Copy link
Collaborator

@QuincySan can you fix conflict then i merge?

Cargo.toml Outdated
@@ -43,5 +43,8 @@ git = "https://github.com/microsoft/vcpkg"
rev = "2023.04.15"
dynamic = true

# [dependencies]
axum = "0.7" # 使用与您项目兼容的版本
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove this plz

@@ -1,6 +1,6 @@
[package]
name = "screenpipe-vision"
version = { workspace = true }
version = "0.1.93"
Copy link
Collaborator

Choose a reason for hiding this comment

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

revert this plz

@@ -38,6 +38,8 @@ screenpipe-integrations = { path = "../screenpipe-integrations" }
tracing-subscriber = { workspace = true }
tracing = { workspace = true }

axum = "0.7"
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove

@QuincySan
Copy link
Contributor Author

@louis030195 Appreciate your assistance! I have made the modifications as per your suggestions:

  1. Removed the axum dependency from Cargo.toml
  2. Restored the version number in screenpipe-vision/Cargo.toml
  3. Removed the axum dependency from screenpipe-vision/Cargo.toml
  4. Deleted the screenpipe-app-tauri/src-tauri/gen/schemas/acl-manifests.json file

Please review again. If there are any further issues or changes needed, please let me know. Thank you!

@QuincySan
Copy link
Contributor Author

@louis030195 Thank you so much for your generous tip and recognition of my work! I truly appreciate it.

I want to be transparent - due to regional restrictions, I may face difficulties receiving the payment through Stripe. However, please know that your appreciation itself means a lot to me.

@louis030195 louis030195 merged commit 549aa5f into mediar-ai:main Oct 4, 2024
2 checks passed
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