Is there a way to make .doc to .gdoc (Google Doc)

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

Hi there,

I have been trying to find a solution to change file type from Microsoft word file (.doc, .docx etc) to Google doc (.gdoc).

I am not a script expert and not expert in Hazel but I believe that it might have a script or a way to be able to change the file type but couldn't figure the way out as it needs to open the file via the browser via log in through drive or Google account to then choose to open with Google doc.

If there is and easier way or technique to be able to change please advise.

Thank you in advance for every comment.

Sam
sansern.sam
 
Posts: 1
Joined: Sun Mar 05, 2017 11:09 am

I don't know anything about the gdoc format but I don't think just changing the file extension will do it. You'll need something to convert the contents of the file as well. If you can find a commandline program to do that, you can then use a script in Hazel to run it for you.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I'm not sure if there's an easy way to do this without scripting, but Google Docs has an API you can use to upload files. It's not especially complicated but may be difficult if you've never written a script before.

Google has some sparse documentation on simple uploads. I use Python for my Google Sheets API integration stuff and it works well. Alternatively, you could also probably write a curl recipe for it. In either case, you will need to enable API access and set up local token handling.

The PyDrive library may be an easier path. There's a semi-complete tutorial on uploading a file using PyDrive.
GeneralAntilles
 
Posts: 1
Joined: Sat Nov 17, 2018 12:36 pm


Return to Open Discussion