aboutsummaryrefslogtreecommitdiffstats

Table of Contents

Installing

On Debian: DR

The guidelines available in the Debian Repository describe how to:

  • install my public PGP key to check the signature of the packages
  • install the stable component of the Debian Repository
  • install the unstable component of the Debian Repository

Once you're done, the last steps are:

sudo apt-get update
sudo apt-get install drive-google

On Ubuntu: PPA

The guidelines available in the PPA describe how to:

  • install my public PGP key to check the signature of the packages
  • install the stable component of the PPA
  • install the unstable component of the PPA

Once you're done, the last steps are:

sudo apt-get update
sudo apt-get install drive-google

Initializing

mkdir GD
cd GD
drive init
Visit this URL to get an authorization code
https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=*****************
Paste the authorization code: *****************
cp -v /etc/drive-google/.* .
cp: omitting directory '/etc/drive-google/.'
cp: omitting directory '/etc/drive-google/..'
'/etc/drive-google/.driveignore' -> './.driveignore'
'/etc/drive-google/.driverc' -> './.driverc'
'/etc/drive-google/.driveselect' -> './.driveselect'

Usage

Setting Up

The general settings described in <google_drive_folder>/.driverc control how the drive-<command> scripts behave for all commands using [global] section, or for a specific command under its [<command>] section which overrides the global settings only for that command. It's possible to group multiple settings for a bundle of commands under a [<command1>/<command2>/...] section.

More details are available with more /etc/drive-google/.driverc.

Selecting Objects

By default, each drive command operates over all objects (folders/files) which are located below the current working directory, as far as recursively possible (depth=-1).

It is possible to alter this behavior through the following settings:

Settings File Location
Controlling the traversal depth under the right [<command>] section <google_drive_folder>/.driverc
Excluding/including objects with regular expressions <google_drive_folder>/.driveignore
Including/excluding objects with standard wildcards under the right [<command>] section ./.driveselect

Regarding new .driveselect:

  • It is intended for users who are not familiar with regular expressions.
  • It is possible to place .driveselect in any directory below your <google_drive_folder>. The drive-<command> script selects the one located in the directory where the call has been made, allowing you to limit the length of the filenames: their path is relative to the CLI location. This is useful when the tree is very deep and there is a need to include/exclude files which are located very far in the depth of the tree. Thus, the filenames are preceded with a minimal or non existent path.
  • It is also possible to list objects per type of operation or for all operations.
  • The selection logic is inverted as compared to .driveignore:
    • folders/files which are listed are included
    • folders/files which are preceded with a ! are excluded

More details are available for the 3 configuration/selection files:

  • Configuring General Settings with more /etc/drive-google/.driverc
  • Excluding And Including Objects with more /etc/drive-google/.driveignore
  • Including And Excluding Objects with more /etc/drive-google/.driveselect

Launching A Script

Once the general settings are configured and affected objects are selected, major drive commands can be automatically launched in the folder of your choice with:

cd <google_drive_folder>
drive-menu
or
drive-<command>
  • No option is necessary on the CLI.
  • If you launch a script outside a Google Drive folder, it will locate the first one it finds and change the working directory to the latter.
  • drive-<tabulation> lists all available scripts.
  • drive-menu launches a basic GUI where all commands are accessible, including the abilities to change the current working directory and to configure the general settings & selected objects without exiting drive-menu.
  • drive-sync offers syncing services not available with current drive. All details are available with:
    • drive-sync --help
    • drive-menu --> Help --> Sync...

The following commands are available within drive-menu:

GUI Features CLI Equivalents
About Drive drive-about
Check selected remote duplicated objects drive-check-duplicates (clashes)
Change working directory cd <folder>
Delete selected remote objects drive-delete
Disable local Google Drive drive-disable
Empty remote trash drive-empty-trash
Help drive-<command> --help
List selected remote objects drive-list
List selected shared remote objects drive-list-shared
List selected starred remote objects drive-list-starred
Log selected scripts Select scripts to be logged
Publish selected remote objects drive-publish
Pull selected remote objects drive-pull
Push selected local objects drive-push
Query statistics about selected remote objects drive-stats (stat)
Select objects & configure general settings Edit configuration files
Share with link selected remote objects drive-share-link
Sync selected local/remote objects drive-sync
Touch selected remote objects drive-touch
Trash selected remote objects drive-trash
Unpublish selected remote objects drive-unpublish
Unshare selected remote objects drive-unshare
Untrash selected remote objects drive-untrash
Versions drive-version

Logging

  • It is possible to log all commands related to a script or a set of scripts into ~/tmp/drive.log when drive-menu is launched from the CLI instead of the GUI desktop file.
  • The scripts which are logged are multi-selected in Log selected scripts menu entry.

Help

Detailed Help is available for all commands with:

  • drive-menu --> Help --> <Command>
  • drive-<command> --help

drive-menu Screenshots


!Main_Menu


Settings

!alt drive-setup

  • driverc sets main drive options.
  • .driveignore function is to exclude/include objects using regular expressions.
  • .driveselect function is to include/exclude objects using standard wildcards..

Sync Types

!alt drive-sync


Master Types

!alt drive-sync


Sync Help (1)

!alt drive-sync --help 1.jpg)


Sync Help (2)

!alt drive-sync --help 2.jpg)


Sync Help (3)

!alt drive-sync --help 3.jpg)


Sync Help (4)

!alt drive-sync --help 4.jpg)


Sync Help (5)

!alt drive-sync --help 5.jpg)


User Confirmation

!alt drive-share-link


Progress Bar

!alt progress-bar


Pulled

!alt pulled

Tracking And Filing Issues

This can be done at support@sdxlive.com.

Reaching Out

Doing anything interesting with drive-<command> scripts or ready to share your favorite tips and tricks? Feel free to reach out with ideas for features or requests support@sdxlive.com.

Disclaimer

This project is not supported nor maintained by Google.