Release v0.6.37: isolate image capture and OCR, fingerprint history duplicates
This commit is contained in:
1 parent
94cab4c112
commit
30e70192dc
15 files changed
+449
-37
No files matched your search
@@ -1,5 +1,6 @@
|
||||
#include "screenshot.h"
|
||||
#include "screenshot_notifications.h"
|
||||
#include "storage.h"
|
||||
#include <commctrl.h>
|
||||
#include <shellapi.h>
|
||||
#include <roapi.h>
|
||||
@@ -49,6 +50,14 @@ int WINAPI wWinMain(HINSTANCE instance,HINSTANCE,PWSTR,int)
|
||||
std::wstring token;
|
||||
bool autoOpenEditor=false, writeLog=false;
|
||||
int argc{}; auto argv=CommandLineToArgvW(GetCommandLineW(),&argc);
|
||||
if(argc==3 && (std::wstring(argv[1])==L"--capture-history" || std::wstring(argv[1])==L"--history-ocr")) {
|
||||
bool ocr=std::wstring(argv[1])==L"--history-ocr";
|
||||
std::filesystem::path request=argv[2]; LocalFree(argv);
|
||||
auto initialized=CoInitializeEx(nullptr,COINIT_MULTITHREADED);
|
||||
if(FAILED(initialized)) return 1;
|
||||
int result=ocr ? ks::runHistoryOcr(request) : ks::runImageHistoryCapture(request);
|
||||
CoUninitialize(); return result;
|
||||
}
|
||||
if(argc>1 && std::wstring(argv[argc-1])==L"--write-log") {
|
||||
writeLog=true; --argc;
|
||||
ks::setLoggingEnabled(true);
|
||||
|
||||
Reference in new issue
Block a user