You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upload all your plaintext files to Google Drive with **GDocify**. This app integrates with the Google Docs API and Google Drive API, allowing you to convert .txt files into Google Docs and upload them to a specific folder of your choice.
5
6
6
-
GDocify integrates with the **Google Docs API** and **Google Drive API**, allowing you to convert .txt files into Google Docs and upload them to a folder. The project is designed to be forked and configured by users via the Google Cloud Platform.
7
+
## Prerequisites
7
8
8
-
---
9
+
Ensure you have a stable version of Node.js and Git installed on your system (tested with npm version 10.8.2) and a free Google Cloud Platform Account. This is required for API setup and credential configuration but, fortunately, easy to set up.
9
10
10
-
## Prerequisites
11
+
## Setup Instructions
11
12
12
-
Ensure you have a stable version of Node.js and Git installed on your system (tested with npm version 10.8.2). Free Google Cloud Platform Account. Required for API setup and credential configuration.
13
-
<!-- TODO: break this step down so I don't scare people away -->
13
+
### Fork the Repository
14
14
15
-
---
15
+
Fork this repository to your GitHub account, then clone the forked repository to your local machine:
First, sign into or create a free [Google Cloud Platform](https://console.cloud.google.com/) account, then create a new project. Or, click this link to go straight to the New Project page: \
25
+
https://console.cloud.google.com/projectcreate\
26
+
Name the project GDocify or whatever other name you want. You can leave the location as "No organization".
27
+
28
+
Next, enable the Google Drive and Google Docs APIs.
29
+
30
+
1. Select Hamburger Menu<br>
31
+
<imgsrc="doc/images/Hamburger.png"width="400">
32
+
1. Select View All Products, then APIs & Services<br>
1. Search for Google Drive API, select it, then select ENABLE. Do the same for Google Docs API<br>
37
+
<imgsrc="doc/images/EnableButton.png"width="400">
27
38
28
39
---
29
40
30
-
### 2. Set Up Google Cloud Project
41
+
### Configure OAuth Consent Screen
31
42
32
-
#### a) Create a Google Cloud Project
43
+
Before you can use your app, you must configure the OAuth Consent Screen.
33
44
34
-
1. Visit the [Google Cloud Console](https://developers.google.com/workspace/guides/create-project#google-cloud-console).
35
-
2. Create a new project.
45
+
1. From APIs & Services, navigate to OAuth Consent Screen<br>
46
+
<imgsrc="doc/images/OAuth.png"height="250"><br>
47
+
1. Select External for User Type, then select the Create button. In the "OAuth consent screen" page, fill out the following then select SAVE AND CONTINUE.
36
48
37
-
#### b) Enable APIs
49
+
-`App name` as GDocify or whatever other name you want
50
+
-`User support email` with your email
51
+
-`Email addresses` with your email
38
52
39
-
1. Navigate to:
40
-
<!-- TODO: insert screenshot here -->
41
-
**Hamburger Menu** → **All Products** → **Management** → **APIs and Services** → **+Enable APIs and Services**.
42
-
2. Search for and enable:
43
-
-**Google Drive API**
44
-
-**Google Docs API**
53
+
1. In the "Scopes" page, select ADD OR REMOVE SCOPES<br>
1. Rename the downloaded file to `credentials.json` and move it into the repo's `config` directory.
80
79
81
80
## Usage Instructions
82
81
@@ -89,17 +88,13 @@ Ensure you have a stable version of Node.js and Git installed on your system (te
89
88
constFOLDER_NAME="YourFolderName";
90
89
```
91
90
92
-
**Note**: Google Drive doesn't enforce unique folder names. If multiple folders share the same name, the script retrieves the folder ID of the most recently modified folder by the user.
93
-
94
-
---
91
+
**Note**: Google Drive doesn't enforce unique folder names. If multiple folders share the same name, the script retrieves the folder ID of the most recently modified folder by the user. I plan to implement paths to select folders in future updates.
95
92
96
93
### Step 2: Set Up NOTES folder
97
94
98
95
1. Open your `NOTES` folder. Delete `Oh, the Places You'll Go!.txt`.
99
96
2. Move or paste all the .txt files you want to upload into the `NOTES` folder
100
97
101
-
---
102
-
103
98
### Step 3: Run the Project
104
99
105
100
1. Open your terminal and navigate to the project's root directory.
@@ -110,17 +105,14 @@ Ensure you have a stable version of Node.js and Git installed on your system (te
110
105
111
106
This command executes the script, interacting with the Google Docs and Drive APIs as configured.
112
107
113
-
---
114
-
115
108
## Notes
116
109
117
110
- If the folder name specified in `index.js` does not exist in your Google Drive the script will throw an error.
118
111
- Be cautious of quota limits for Google Drive and Docs API usage.
119
112
120
-
---
121
-
122
-
## Resources
113
+
## Helpful Resources
123
114
115
+
-[Creating a Google Cloud Project](https://developers.google.com/workspace/guides/create-project#google-cloud-console)
124
116
-[Google Docs API Documentation](https://developers.google.com/docs)
125
117
-[Google Drive API Documentation](https://developers.google.com/drive)
0 commit comments