Skip to content

Commit

Permalink
Update Usage.md and What's-new.md
Browse files Browse the repository at this point in the history
  • Loading branch information
astrada committed Feb 28, 2024
1 parent ca89e5a commit 16a786a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 8 deletions.
42 changes: 34 additions & 8 deletions doc/Usage.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,44 @@
The first time, you can run `google-drive-ocamlfuse` without parameters:
First, you must [set up OAuth
2.0](https://support.google.com/cloud/answer/6158849?hl=en):

google-drive-ocamlfuse
1. [Activate](https://cloud.google.com/service-usage/docs/enable-disable) the
`Google Drive API`.
1. Create an OAuth client ID.
1. Choose `Desktop` as `Application type`.
1. Set the `Name` to anything you like.

This command will create the default application directory (`~/.gdfuse/default`), containing the configuration file `config` (see the [[Configuration]] page for more details about configuration). And it will start a web browser to obtain authorization to access your Google Drive. This will let you modify default configuration before mounting the filesystem.
This way you will get a `Client ID` and `Client secret` that you can use to
access your Drive. To authorize `google-drive-ocamlfuse`, pass the client ID
and the client secret on the command line, e.g.:

Then you can choose a local directory to mount your Google Drive (e.g.: `~/GoogleDrive`).
google-drive-ocamlfuse -id xxxxxxxxxx.apps.googleusercontent.com -secret XXX-YYY-ZZZ

This command will create the default application directory
(`~/.gdfuse/default`), containing the configuration file `config` (see the
[wiki
page](https://github.com/astrada/google-drive-ocamlfuse/wiki/Configuration)
for more details about configuration). And it will start a web browser to
obtain authorization to access your Google Drive. This way, you can modify the
default configuration before mounting the filesystem.

Then, you can choose a local directory to mount your Google Drive (e.g.: `~/GoogleDrive`).

Create the mount point, if it doesn't exists:

mkdir ~/GoogleDrive

Then you can mount the filesystem:
Then, you can mount the filesystem:

google-drive-ocamlfuse ~/GoogleDrive

If you have more than one account, you can run:

google-drive-ocamlfuse -label label [mountpoint]
google-drive-ocamlfuse -label [label] ~/GoogleDrive

Using `label` to distinguish between different accounts. The program will use the directory `~/.gdfuse/label` to host configuration, application state, and file cache. No file is shared among different accounts, so you can have a different configuration for each one.
Using `label` to distinguish different accounts. The program will use the
directory `~/.gdfuse/[label]` to host the configuration, the application
state, and the file cache. No file is shared among different accounts, so you
can have a different configuration for each one.

To unmount the filesystem, issue this command:

Expand Down Expand Up @@ -68,4 +88,10 @@ Run `google-drive-ocamlfuse -help` to get all the command options available. To
* `-redirect_uri`: Specifies a custom `redirect_uri` for the OAuth2 [flow](https://developers.google.com/identity/protocols/OAuth2InstalledApp#step-2-send-a-request-to-googles-oauth-20-server)

#### Since 0.7.13
* `-device`: Use [OAuth2 for Devices](https://github.com/astrada/google-drive-ocamlfuse/wiki/OAuth2-for-Devices) authorization flow
* `-device`: Use [OAuth2 for Devices](https://github.com/astrada/google-drive-ocamlfuse/wiki/OAuth2-for-Devices) authorization flow

#### Since 0.7.32
* `-port`: This option can be used to specify a port for the embedded HTTP
server, that will receive the verification code from Google during
authorization. The default is 8080.

4 changes: 4 additions & 0 deletions doc/What's-new.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
0.7.32
======
This version introduces a new command line option: `-port`, to specify a port for the embedded HTTP server, that will receive the verification code from Google during authorization. The default is 8080.

0.7.21
======
This version introduces a new config option: `background_folder_fetching`. If set to a `true` (the default is `false`), it starts a thread to fetch folder data in background, so accessing folders should be faster.
Expand Down

0 comments on commit 16a786a

Please sign in to comment.