Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
astrada committed Jul 21, 2019
1 parent 422e51c commit 822c004
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 47 deletions.
23 changes: 1 addition & 22 deletions doc/Automounting.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,27 +62,6 @@ Now log out and back in again and your Google Drive should be mounted on `~/Goog

## Mount from login scripts

By inserting the following line into ~/.profile the shell will test wether something has already been mounted on your target mountpoint, and if not, will execute the mount.
By inserting the following line into ~/.profile the shell will test whether something has already been mounted on your target mountpoint, and if not, will execute the mount.

$ mount | grep "${HOME}/GoogleDrive" >/dev/null || /usr/bin/google-drive-ocamlfuse "${HOME}/GoogleDrive"&

Alternatively, a function can be added to the end of a login script to check if google drive is mounted, and if not, wait for the network to become available before mounting. Be sure to replace the `mountpoint` value with the correct path.

```bash
#! /bin/bash
function connect_googledrive {
mountpoint="${HOME}/googledrive"
if [[ ! "$(ls ${mountpoint})" ]]; then
printf "mounting google drive: waiting for network connection"
while ! ping -q -c 1 -W 1 8.8.8.8 > /dev/null 2>&1; do
printf "..."
sleep 1
done
printf "\n"
cd "${HOME}"
google-drive-ocamlfuse "$mountpoint"
fi
printf "google drive connected\n"
}
connect_googledrive
```
20 changes: 14 additions & 6 deletions doc/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,39 +26,39 @@ Specifies whether to download Google Docs (these files are read-only, even if `r

Text document [[export format|Exportable-formats#valid-download-formats-for-text-documents]]:

document_format=odt
document_format=desktop

If `document_format=desktop`, specifies the icon of the desktop link (default is no icon):

document_icon=

Drawings [[export format|Exportable-formats#valid-download-formats-for-drawings]]:

drawing_format=png
drawing_format=desktop

If `drawing_format=desktop`, specifies the icon of the desktop link (default is no icon):

drawing_icon=

Forms [[export format|Exportable-formats#valid-formats-for-spreadsheets]]:

form_format=ods
form_format=desktop

If `form_format=desktop`, specifies the icon of the desktop link (default is no icon):

form_icon=

Presentations [[export format|Exportable-formats#valid-formats-for-presentations]]:

presentation_format=pdf
presentation_format=desktop

If `presentation_format=desktop`, specifies the icon of the desktop link (default is no icon):

presentation_icon=

Spreadsheets [[export format|Exportable-formats#valid-formats-for-spreadsheets]]:

spreadsheet_format=ods
spreadsheet_format=desktop

If `spreadsheet_format=desktop`, specifies the icon of the desktop link (default is no icon):

Expand All @@ -82,7 +82,7 @@ If `fusion_table_format=desktop`, specifies the icon of the desktop link (defaul

Google Apps Script [[export format|Exportable-formats#valid-formats-for-google-apps-scripts]]:

apps_script_format=json
apps_script_format=desktop

If `apps_script_format=desktop`, specifies the icon of the desktop link (default is no icon):

Expand Down Expand Up @@ -229,6 +229,14 @@ Path of the directory containing log files (if blank uses the default):

write_buffers=false

[Since 0.7.4] Disable trash bin access:

disable_trash=false

[Since 0.7.8] Let Google Drive autodetect MIME types:

autodetect_mime=true

### Document export formats

`desktop` format creates a shortcut to the document that will be opened in the web browser for edit.
Expand Down
26 changes: 7 additions & 19 deletions doc/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,22 @@ This [PPA repository](https://launchpad.net/~alessandro-strada/+archive/ubuntu/g

## Debian Stretch

1. Run following commands
1. Run `sudo apt install software-properties-common dirmngr`

`apt install software-properties-common dirmngr`
`add-apt-repository ppa:alessandro-strada/ppa`
`nano /etc/apt/sources.list.d/alessandro-strada-ubuntu-ppa-bionic.list`

2. Edit the file

a. replace **bionic** at the end of both lines with **xenial**, otherwise you will get stuck with version 0.6.21,
where team drive does not work properly
b. uncomment the second line

3. So it looks like this:
2. As root, create the file `/etc/apt/sources.list.d/alessandro-strada-ubuntu-ppa-bionic.list` and write the following lines:

`deb http://ppa.launchpad.net/alessandro-strada/ppa/ubuntu xenial main`
`deb-src http://ppa.launchpad.net/alessandro-strada/ppa/ubuntu xenial main`

4. Then you need to add the key otherwise the command **apt update** will not take the new sourcelist into account
3. Then you need to add the key otherwise the command **apt update** will not take the new sourcelist into account

`apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AD5F235DF639B041`
`sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AD5F235DF639B041`

If you get a message like this: `gpg: keyserver receive failed: Server indicated a failure` Then do:
`apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys AD5F235DF639B041`

`apt update`
`apt install google-drive-ocamlfuse`
`sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys AD5F235DF639B041`

5. You are done
4. Run `sudo apt update`
5. Run `sudo apt install google-drive-ocamlfuse`

## Installing from source

Expand Down
28 changes: 28 additions & 0 deletions doc/Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,31 @@ Options
-------

Run `google-drive-ocamlfuse -help` to get all the command options available. To find more details about `-o` mount options, you can refer to this [page](http://manpages.ubuntu.com/manpages/zesty/man8/mount.fuse.8.html). Non-standard mount option `gdfroot` can be used to specify a custom path to the configuration directory (default is `$HOME/.gdfuse`).

(Since 0.7.5) `-docsmode`: this option can be used to quickly set Google Docs config options. Supported values are:
* `libreoffice`: sets
* `download_docs=true`
* `document_format=odt`
* `drawing_format=png`
* `form_format=zip`
* `presentation_format=odp`
* `spreadsheet_format=ods`
* `apps_script_format=json`
* `msoffice`: sets
* `download_docs=true`
* `document_format=docx`
* `drawing_format=png`
* `form_format=zip`
* `presentation_format=pptx`
* `spreadsheet_format=xlsx`
* `apps_script_format=json`
* `desktop`: sets
* `download_docs=true`
* `document_format=desktop`
* `drawing_format=desktop`
* `form_format=desktop`
* `presentation_format=desktop`
* `spreadsheet_format=desktop`
* `apps_script_format=desktop`
* `off`: sets
* `download_docs=false`
15 changes: 15 additions & 0 deletions doc/What's-new.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
0.7.8
=====

This version introduces a new config option (`autodetect_mime`). If this option is set to `true` (the default value), the MIME type of uploaded resources is left blank, so Google Drive can detect it. If `false` the old behavior is used.

0.7.5
=====

This version introduces a new command line option (`-docsmode`), that can be can be used to quickly set Google Docs config options. See [[Usage]].

0.7.4
=====

This version introduces a new config option (`disable_trash`), that can be set to `true`, if you don't want to fetch the trash bin content in `.Trash`.

0.7.1
=====

Expand Down

0 comments on commit 822c004

Please sign in to comment.