dynobo / normcap

OCR powered screen-capture tool to capture information instead of images
https://dynobo.github.io/normcap/
Other
1.9k stars 89 forks source link

please pre-package Japanese [horizontal + vertical] #127

Closed quopquai closed 3 years ago

quopquai commented 3 years ago

would it be possible to add Japanese as one of the pre-packaged languages?

You can select jpn or jpn_vert from the cog wheel's options if the program is opened via the terminal [ON A MAC] as well as a whole host of other languages, which is awesome, [I assume these are all the tesseract languages available?] You can select and deselect as many of these other languages as you want, but doesn't seem to make any difference. Even when I manually type the command:

normcap --languages jpn

it seems to have accepted the command but then again it doesn't seem to have worked.

Also, for some reason, whenever the program is opened from the terminal, I'm unable to drag out the box at all!?!

-- any help would be much appreciated!

dynobo commented 3 years ago

Thanks for your report, quopquai!

The first two points are clear:

The third issue (unable to drag out the box when starting from cli) is something new for me! Could you please provide more information? I'd be interested in:

Those infos would help me a lot. Thanks!

quopquai commented 3 years ago

Hey,

Last login: Wed Jul 28 03:08:48 on ttys000 Macintosh:~ julisco$ normcap normcap --languages jpn+jpn_vert --very-verbose

SORRY, NOTHING IS PRINTING OUT

Last login: Wed Jul 28 03:17:45 on ttys000 Macintosh:~ julisco$ normcap --very-verbose 03:18:51 - INFO - normcap.app - L:40 - Starting Normcap v0.2.3 03:18:51 - DEBUG - normcap.app - L:44 - QT LibraryPaths: ['/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PySide2/Qt/plugins'] 03:18:51 - INFO - normcap.utils - L:169 - Searching tesseract languages 03:18:51 - DEBUG - normcap.app - L:56 - Detected system info: ----------------------- ----------------------- { 'briefcase_package': False, 'desktop_environment': <DesktopEnvironment.OTHER: 0>, 'display_manager': <DisplayManager.OTHER: 0>, 'normcap_version': '0.2.3', 'platform': <Platform.MACOS: 2>, 'screens': { 0: ScreenInfo(is_primary=True, device_pixel_ratio=2.0, geometry=Rect(left=0, top=0, right=1440, bottom=900), index=0)}, 'tessdata_path': '', 'tesseract_languages': [ 'afr', 'amh', 'ara', 'asm', 'aze', 'aze_cyrl', 'bel', 'ben', 'bod', 'bos', 'bre', 'bul', 'cat', 'ceb', 'ces', 'chi_sim', 'chi_sim_vert', 'chi_tra', 'chi_tra_vert', 'chr', 'cos', 'cym', 'dan', 'deu', 'div', 'dzo', 'ell', 'eng', 'enm', 'epo', 'equ', 'est', 'eus', 'fao', 'fas', 'fil', 'fin', 'fra', 'frk', 'frm', 'fry', 'gla', 'gle', 'glg', 'grc', 'guj', 'hat', 'heb', 'hin', 'hrv', 'hun', 'hye', 'iku', 'ind', 'isl', 'ita', 'ita_old', 'jav', 'jpn', 'jpn_vert', 'kan', 'kat', 'kat_old', 'kaz', 'khm', 'kir', 'kmr', 'kor', 'kor_vert', 'lao', 'lat', 'lav', 'lit', 'ltz', 'mal', 'mar', 'mkd', 'mlt', 'mon', 'mri', 'msa', 'mya', 'nep', 'nld', 'nor', 'oci', 'ori', 'osd', 'pan', 'pol', 'por', 'pus', 'que', 'ron', 'rus', 'san', 'script/Arabic', 'script/Armenian', 'script/Bengali', 'script/Canadian_Aboriginal', 'script/Cherokee', 'script/Cyrillic', 'script/Devanagari', 'script/Ethiopic', 'script/Fraktur', 'script/Georgian', 'script/Greek', 'script/Gujarati', 'script/Gurmukhi', 'script/HanS', 'script/HanS_vert', 'script/HanT', 'script/HanT_vert', 'script/Hangul', 'script/Hangul_vert', 'script/Hebrew', 'script/Japanese', 'script/Japanese_vert', 'script/Kannada', 'script/Khmer', 'script/Lao', 'script/Latin', 'script/Malayalam', 'script/Myanmar', 'script/Oriya', 'script/Sinhala', 'script/Syriac', 'script/Tamil', 'script/Telugu', 'script/Thaana', 'script/Thai', 'script/Tibetan', 'script/Vietnamese', 'sin', 'slk', 'slv', 'snd', 'snum', 'spa', 'spa_old', 'sqi', 'srp', 'srp_latn', 'sun', 'swa', 'swe', 'syr', 'tam', 'tat', 'tel', 'tgk', 'tha', 'tir', 'ton', 'tur', 'uig', 'ukr', 'urd', 'uzb', 'uzb_cyrl', 'vie', 'yid', 'yor'], 'tesseract_version': '4.1.1'} ---------------------- ----------------------- 03:18:51 - DEBUG - normcap.app - L:65 - Using persisted config (from config file) 03:18:51 - DEBUG - normcap.app - L:67 - Applied user config: ------------------------- ------------------------- { 'color': '#FF2E88', 'languages': ('jpn', 'jpn_vert'), 'mode': 'parse', 'notifications': True, 'tray': True, 'updates': True} ------------------------ ------------------------- 03:18:51 - DEBUG - normcap.window_base - L:40 - Creating window for screen 0 03:18:51 - DEBUG - normcap.window_base - L:205 - Setting window for screen 0 to fullscreen 03:18:51 - DEBUG - normcap.system_tray - L:35 - Setting up tray icon 03:18:51 - DEBUG - normcap.window_main - L:78 - Show tray icon 03:18:51 - DEBUG - normcap.window_main - L:218 - Checking for updates 03:18:51 - DEBUG - normcap.update - L:45 - No new version found.

dynobo commented 3 years ago

@quopquai, I just released v0.2.4 which (hopefully) address all your mentioned issues.

Could you please try both pre-build package and python package with the new version and report back your experience?

  1. Pre-build package: Do the new languages jpn and jpn_vert work for you?
  2. Python package: If you start normcap through command line, can you select the region to detect?
  3. Both pre-build and python packages: Do the settings through cog-wheel and command line options now work as expected?

Thanks for you help!

quopquai commented 3 years ago

dynobo,

sorry for the late response. I just updated both packages and everything works perfectly now!!!

I can confirm,

  1. jpn and jpn_vert are now available in the pre-build
  2. selecting the region to detect now works when activated from the terminal
  3. the cog-wheels in both packages appear to work as expected

I think you've just increased my productivity thank you for your amazing work! this is very cool!

NEW REQUEST I just realised, would it be possible to create a "set keybinding" option to activate it? Having the icon available in the menu bar 'system tray' is very cool though a shortcut would be a smoother workflow.

dynobo commented 3 years ago

Hi @quopquai, I'm glad everything is working now :-)

Regards offering a keybinding: The idea is good, similar requests have already been brought up (#103). Sadly it is quite hard to implement, as there is no standard to do this across operating systems or display managers. Also it is quite "invasive" to listen to keyboard input globally, that's why hotkeys are usually registered deeply in the system.

I recommend to use the native functionality of your operating system to configure an HotKey by your own. I'm not very familiar with MacOS, but it seems like there are ways to do this with build in tools as well as third party tools. I'm gonna at this to the FAQs :-)