Skip to content

Commit bbfe3e6

Browse files
committed
Update README
1 parent b340fcd commit bbfe3e6

12 files changed

Lines changed: 55 additions & 63 deletions

README.md

Lines changed: 55 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,81 @@
11
<!-- TODO: review this and rewrite for accessibility if needed -->
2+
23
![Socialify image](https://socialify.git.ci/aleguy02/GDocify/image?description=1&language=1&logo=https%3A%2F%2Fencrypted-tbn0.gstatic.com%2Fimages%3Fq%3Dtbn%3AANd9GcRNt8D27z6TIINfXpS5f7-_1wp_UVyfmCptTA%26s&name=1&owner=1&stargazers=1&theme=Light)
34

4-
# GDocify
5+
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.
56

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
78

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.
910

10-
## Prerequisites
11+
## Setup Instructions
1112

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
1414

15-
---
15+
Fork this repository to your GitHub account, then clone the forked repository to your local machine:
1616

17-
## Setup Instructions
17+
```bash
18+
git clone https://github.com/your-username/GDocify.git
19+
cd GDocify
20+
```
1821

19-
### 1. Fork the Repository
22+
### Set Up Google Cloud Project
2023

21-
1. Fork this repository to your GitHub account.
22-
2. Clone the forked repository to your local machine:
23-
```bash
24-
git clone https://github.com/your-username/GDocify.git
25-
cd GDocify
26-
```
24+
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+
<img src="doc/images/Hamburger.png" width="400">
32+
1. Select View All Products, then APIs & Services<br>
33+
<img src="doc/images/APIsAndServices.png" width="400">
34+
1. Select ENABLE APIS AND SERVICES<br>
35+
<img src="doc/images/EnableAPIS.png" width="400">
36+
1. Search for Google Drive API, select it, then select ENABLE. Do the same for Google Docs API<br>
37+
<img src="doc/images/EnableButton.png" width="400">
2738

2839
---
2940

30-
### 2. Set Up Google Cloud Project
41+
### Configure OAuth Consent Screen
3142

32-
#### a) Create a Google Cloud Project
43+
Before you can use your app, you must configure the OAuth Consent Screen.
3344

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+
<img src="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.
3648

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
3852

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>
54+
<img src="doc/images/AddOrRemoveScopes.png" width="400">
4555

46-
---
56+
1. Manually the following scopes by copying and pasting these links into the input box at the bottom and selecting ADD TO TABLE:
4757

48-
### 3. Configure OAuth Consent Screen
49-
50-
1. Go to:
51-
<!-- TODO: insert screenshot here -->
52-
**Hamburger Menu****All Products****Management****APIs and Services****OAuth Consent Screen**.
53-
2. Select **User Type**: **External**, then **Create**.
54-
3. Fill out the following:
55-
- **App Name**: [GDocify]
56-
- **Support Email**: [Your Email]
57-
- **Developer Contact Info**: [Your Contact Email]
58-
4. Click **Save and Continue**.
59-
5. Add the following **Scopes**:
6058
- `https://www.googleapis.com/auth/documents`
6159
- `https://www.googleapis.com/auth/drive`
62-
6. Click **Save and Continue**.
63-
7. Under **Test Users**, add your email address.
6460

65-
---
61+
<img src="doc/images/AddToTable.png" width="400">
6662

67-
### 4. Configure OAuth Credentials
63+
1. Verify the `.../auth/documents` and `.../auth/drives` boxes are checked, then select UPDATE then SAVE AND CONTINUE
64+
<img src="doc/images/Checkboxes.png" width="400">
6865

69-
1. Navigate to:
70-
<!-- TODO: insert screenshot here -->
71-
**Hamburger Menu****All Products****Management****APIs and Services****Credentials**.
72-
2. Click **+Create Credentials****OAuth Client ID**.
73-
3. Select **Application Type**: **Desktop app**.
74-
4. Name it `[Your App Name] Desktop App` (e.g. `aleguy02 Desktop App`), then **Create**.
75-
5. Download the JSON file:
76-
- Rename it to `credentials.json`.
77-
- Move `credentials.json` into the `config` directory.
66+
1. In the "Test users" page, select ADD USERS and input your email. Select ADD then SAVE AND CONTINUE
67+
1. Review the "Summary" page before selecting BACK TO DASHBOARD
7868

79-
---
69+
### Configure OAuth Credentials
70+
71+
1. From APIs & Services, navigate to Credentials<br>
72+
<img src="doc/images/Credentials.png" height="250">
73+
1. Select CREATE CREDENTIALS then OAuth Client ID<br>
74+
<img src="doc/images/CreateCredentials.png" width="400">
75+
1. Under `Application type`, select Desktop app. Then, select CREATE. OPTIONAL: Change name to whatever you want
76+
1. Once your OAuth client is created, select DOWNLOAD JSON<br>
77+
<img src="doc/images/DownloadJSON.png" height="250">
78+
1. Rename the downloaded file to `credentials.json` and move it into the repo's `config` directory.
8079

8180
## Usage Instructions
8281

@@ -89,17 +88,13 @@ Ensure you have a stable version of Node.js and Git installed on your system (te
8988
const FOLDER_NAME = "YourFolderName";
9089
```
9190

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.
9592

9693
### Step 2: Set Up NOTES folder
9794

9895
1. Open your `NOTES` folder. Delete `Oh, the Places You'll Go!.txt`.
9996
2. Move or paste all the .txt files you want to upload into the `NOTES` folder
10097

101-
---
102-
10398
### Step 3: Run the Project
10499

105100
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
110105

111106
This command executes the script, interacting with the Google Docs and Drive APIs as configured.
112107

113-
---
114-
115108
## Notes
116109

117110
- If the folder name specified in `index.js` does not exist in your Google Drive the script will throw an error.
118111
- Be cautious of quota limits for Google Drive and Docs API usage.
119112

120-
---
121-
122-
## Resources
113+
## Helpful Resources
123114

115+
- [Creating a Google Cloud Project](https://developers.google.com/workspace/guides/create-project#google-cloud-console)
124116
- [Google Docs API Documentation](https://developers.google.com/docs)
125117
- [Google Drive API Documentation](https://developers.google.com/drive)
126118
- [Node.js Documentation](https://nodejs.org/en/docs)

doc/images/APIsAndServices.png

31.9 KB
Loading

doc/images/AddOrRemoveScopes.png

21.5 KB
Loading

doc/images/AddToTable.png

29.9 KB
Loading

doc/images/Checkboxes.png

60.4 KB
Loading

doc/images/CreateCredentials.png

53.2 KB
Loading

doc/images/Credentials.png

21.2 KB
Loading

doc/images/DownloadJSON.png

48.7 KB
Loading

doc/images/EnableAPIS.png

19.7 KB
Loading

doc/images/EnableButton.png

22.1 KB
Loading

0 commit comments

Comments
 (0)