Auto-create google docs file when uploading photo to Google Drive - google-drive-api

I have a bunch of screenshots (probably in thousands) that I want to run OCR on. I tried different services but Google Drive results are far better. But the process is a little tedious. First I have to upload a photo to Google Drive and then right click the uploaded file and select "Open with -> Google Docs". The resultant doc file contains all the text that was in the screenshot. However, it works for only one file at a time.
So is there a way to tell Google Drive to automatically create the doc file for every photo at the time I upload them.
I know there is Google Drive API that could help in this regard but I have very limited experience with coding and API. I could use a program if available.

Related

How to Copy Link to Files in Shared Google Drive (Batch copy)

We use shared google drives and will often link files to one another. E.g., a pdf saved in drive may be discussed in a spreadsheet/doc with a link to drive included. We usually grab these links in a browser or using the "Copy link to clipboard" option on Google Drive for Mac (right click in Finder).
I'm looking to automate some processes and would like to include the Copy Link step as part of the automation.
Digging through the documentation for the google drive api, I've found some options to update permissions, but can't find anything to just copy an existing share link like we do in our workflows.
https://developers.google.com/drive/api/guides/manage-sharing
Does anyone have suggestions on this? We have automation set up in r and python, so options within that would be preferable.

Search file in other google drives

I have a google drive where am storing few google sheets. My java web application is able to search a file that is present in my own google drive using Javascript API. Is there a way to search for a specific files in other's google drive via code? i will be getting the shareable link to the google drive am supposed to search. can this be done? As far as i checked this is not possible. Also there is no where in google document that says i can search files in other's drive. Kindly someone confirm.
This is an OAuth question, not a GDrive question.
The account that the GDrive API will apply to is determined by the Access Token that it is called with. So, if you can get an Access Token for somebody else's Drive, then you can use that to search their drive. How you would get such a token will depend very much on the details of your use case and the trust relationship.

Google Apps Script - Add file from Google Drive

First of all I want you to know that I'm not talking about uploading a file from users computer drive.
What Im aiming to do is to be able to allow users to add a file from their Google Drive to a specific folder in my Google Drive. I've searched around (a lot) and I can't find anything similar.
Have you ever seen this window? I could use something like it (it's in spanish but im sure you've seen it before). It allows you to upload a file from your pc or from your Google Drive:
Is it possible to access this pop up windows through Google Apps Script? If not, what are the alternatives?
What you have listed there is google picker. It can be used in apps script.
https://developers.google.com/apps-script/guides/dialogs#file-open_dialogs
The docs for Drive picker can be found at:
https://developers.google.com/picker/docs/
What you can do, is use the Drive Picker API to allow users to chose files from their google drive.
Then once you have the File, you can add it to your folder.
https://developers.google.com/apps-script/reference/drive/folder#addFile(File)
https://developers.google.com/picker/docs/

Google Docs document format?

What I'd like to accomplish: Download a Google Docs doc (with Google Drive API), modify it (for example highlight some text), then store it back to Google Drive (not messing up the format, so that it can be edited in the Google Docs app).
(Preemptive research: I know that you can do some integration with Google's hosted AppScript, but I want to do this offline. I also know that a Google Docs doc can be exported to other formats, but I see no sign of reimporting in the Google Drive API.)
I'm not hopeful this can be done:
* The meta-data file (that you can get via the Google Drive API) lacks a "downloadUrl" attribute
* In offline mode, the data (stored in .../File System/) is binary and the Unix "file " command doesn't know what format it is.
Is this off-limits with the current Google Drive API?
Your best (only) approach is to export the doc to a format that you can edit locally (html, docs, etc) and then reimport it. HTML is of course the easiest, but also the most lossy.

Google Realtime API with Google Docs

I would like to build an application on a webpage, that does as google docs:
I want to build an app that allow people to work on a document in collaboration
I start with this: https://developers.google.com/drive/realtime/realtime-quickstart
But the problem is that it creates a file with the mimetype is "application/vnd.google-apps.drive-sdk".
I would like to work with google docs format, so people can open them with their google drive and edit their later.
The file created is not the proper format, and find it me impossible to open it.
( I try to edit the mimetype with "application/vnd.google-apps.document", however it creates the file in the google drive but it can't find the file when it try to load it).
How to create a google doc in realtime ? (If you can post the code here, it would help me a lot)
Then, it want to add the toolbar for editing(bold, italic,...).
After that, it would like to add the google picker to select the file to load.