astrada/google-drive-ocamlfuse
Fork: 354 Star: 5600 (更新于 2024-12-07 02:05:43)
license: MIT
Language: OCaml .
FUSE filesystem over Google Drive
最后发布版本: v0.7.32 ( 2024-02-29 05:33:05)
FUSE filesystem over Google Drive
google-drive-ocamlfuse is a FUSE filesystem for Google Drive, written in OCaml. It lets you mount your Google Drive on Linux.
Features (see what's new)
- Full read/write access to ordinary files and folders
- Read-only access to Google Docs, Sheets, and Slides (exported to configurable formats)
- Multiple account support
- Duplicate file handling
- Access to trash (
.Trash
directory) - Unix permissions and ownership
- Symbolic links
- Read-ahead buffers when streaming
- Accessing content shared with you (requires configuration)
- Team Drive Support
- Service Account Support
- OAuth2 for Devices Support
Resources
- Homepage
- Wiki: includes installation instructions, and more details about configuration, and authorization
Authorization
Please be sure to have a look at the authorization page, to understand how the authorization process works, and to discover all the available options.
Getting started
Installation
I've uploaded .deb packages for Ubuntu to my PPA. In order to to install it, use the commands below:
sudo add-apt-repository ppa:alessandro-strada/ppa
sudo apt-get update
sudo apt-get install google-drive-ocamlfuse
New beta versions are available on this PPA. If you want to test them, use the commands below:
sudo add-apt-repository ppa:alessandro-strada/google-drive-ocamlfuse-beta
sudo apt-get update
sudo apt-get install google-drive-ocamlfuse
For other installation options, please refer to the wiki.
How to build
Requirements
- OCaml >= 4.02.3
- Findlib >= 1.2.7
- ocamlfuse >= 2.7.1
- gapi-ocaml >= 0.3.6
- sqlite3-ocaml >= 1.6.1
Configuration and installation
To build the executable, run
dune build @install
To install it, run (as root, if your user doesn't have enough privileges)
dune install
To uninstall anything that was previously installed, execute
dune uninstall
Usage
First, you must set up OAuth 2.0:
-
Activate the
Google Drive API
. - Create an OAuth client ID.
- Choose
Desktop
asApplication type
. - Set the
Name
to anything you like.
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.:
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
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:
google-drive-ocamlfuse ~/GoogleDrive
If you have more than one account, you can run:
google-drive-ocamlfuse -label [label] ~/GoogleDrive
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:
fusermount -u ~/GoogleDrive
Troubleshooting
This application is still under testing, so there are probably bugs to
discover and fix. To be extra sure, if you want, you can mount the filesystem
in read-only mode, modifying the configuration (see the
documentation),
to avoid any write attempt to the server. Anyway, the rm
command will simply
trash your file, so you should always be able to rollback any changes. If you
have problems, you can turn on debug logging:
google-drive-ocamlfuse -debug mountpoint
In ~/.gdfuse/default
you can find curl.log
that will track every request
to the Google Drive API, and gdfuse.log
that will log FUSE operations and
cache management. If something goes wrong, you can try clearing the cache,
with this command:
google-drive-ocamlfuse -cc
If something still doesn't work, try starting from scratch removing everything
in ~/.gdfuse/default
. In this case you will need to reauthorize the
application.
Note that in order to reduce latency, the application will query the server and check for changes only every 60 seconds (configurable). So, if you make a change to your documents (server side), you won't see it immediately in the mounted filesystem.
Note also that Google Documents will be exported read-only.
Support
If you have questions, suggestions or want to report a problem, you may want to open an issue on github.
最近版本更新:(数据更新于 2024-10-30 16:19:38)
2024-02-29 05:33:05 v0.7.32
2023-11-08 04:13:04 v0.7.31-opam
2023-11-04 20:31:21 v0.7.31
2022-06-18 02:45:38 v0.7.30
2022-06-01 00:27:06 v0.7.29
2022-02-25 00:16:54 v0.7.28
2021-08-25 03:21:44 v0.7.27
2021-03-01 05:02:22 v0.7.26
2021-01-21 06:37:39 v0.7.25
2021-01-06 03:47:12 v0.7.24
主题(topics):
filesystem, fuse, google-drive, ocaml
astrada/google-drive-ocamlfuse同语言 OCaml最近更新仓库
2024-09-10 20:49:27 c-cube/ocaml-containers
2024-09-04 16:25:47 mirleft/ocaml-tls
2024-06-29 16:58:29 ocaml/ocamlbuild
2024-06-17 17:04:46 ocaml/dune
2024-05-26 22:10:33 ocsigen/js_of_ocaml
2024-05-13 20:27:08 ocaml/ocaml