Skip to content

prrvchr/gDriveOOo

Repository files navigation

gDriveOOo logo Documentation

Ce document en français.

The use of this software subjects you to our Terms Of Use and Data Protection Policy.

version 1.1.2

Introduction:

gDriveOOo is part of a Suite of LibreOffice and/or OpenOffice extensions allowing to offer you innovative services in these office suites.

This extension allows you to work in LibreOffice on your files on your phone (files that you have downloaded to your Android phone), even while offline.
It uses Google Drive API to synchronize your remote Google Drive files with the help of a local HsqlDB 2.7.2 database.
This extension is seen by LibreOffice as a Content Provider responding to the URL: vnd-google://*.

Being free software I encourage you:

  • To duplicate its source code.
  • To make changes, corrections, improvements.
  • To open issue if needed.

In short, to participate in the development of this extension. Because it is together that we can make Free Software smarter.


Requirement:

The gDriveOOo extension uses the OAuth2OOo extension to work.
It must therefore meet the requirement of the OAuth2OOo extension.

The gDriveOOo extension uses the jdbcDriverOOo extension to work.
It must therefore meet the requirement of the jdbcDriverOOo extension.

On Linux and macOS the Python packages used by the extension, if already installed, may come from the system and therefore may not be up to date.
To ensure that your Python packages are up to date it is recommended to use the System Info option in the extension Options accessible by:
Tools -> Options -> Internet -> gDriveOOo -> View log -> System Info
If outdated packages appear, you can update them with the command:
pip install --upgrade <package-name>

For more information see: What has been done for version 1.1.0.


Installation:

It seems important that the file was not renamed when it was downloaded.
If necessary, rename it before installing it.

  • OAuth2OOo logo Install OAuth2OOo.oxt extension Version

    You must first install this extension, if it is not already installed.

  • jdbcDriverOOo logo Install jdbcDriverOOo.oxt extension Version

    You must install this extension, if it is not already installed.

  • gDriveOOo logo Install gDriveOOo.oxt extension Version

Restart LibreOffice after installation.
Be careful, restarting LibreOffice may not be enough.

  • On Windows to ensure that LibreOffice restarts correctly, use Windows Task Manager to verify that no LibreOffice services are visible after LibreOffice shuts down (and kill it if so).
  • Under Linux or macOS you can also ensure that LibreOffice restarts correctly, by launching it from a terminal with the command soffice and using the key combination Ctrl + C if after stopping LibreOffice, the terminal is not active (no command prompt).

Use:

Open your Google Drive:

In File -> Open enter in the first drop-down list:

or

  • For an unnamed Url (anonymous): vnd-google:///

And validate not by the Open button but by the Enter key.

If you don't give your_account@gmail.com, you will be asked for...

Anonymous Urls allow you to remain anonymous (your account does not appear in the Url) while named Urls allow you to access several accounts simultaneously.

After authorizing the OAuth2OOo application to access your Drive files, your Google Drive should open!!! normally πŸ˜‰


Has been tested with:

  • LibreOffice 7.3.7.2 - Lubuntu 22.04 - Python version 3.10.12

  • LibreOffice 7.5.4.2(x86) - Windows 10 - Python version 3.8.16 (under Lubuntu 22.04 / VirtualBox 6.1.38)

  • LibreOffice 7.4.3.2(x64) - Windows 10(x64) - Python version 3.8.15 (under Lubuntu 22.04 / VirtualBox 6.1.38)

  • Does not work with OpenOffice see bug 128569. Having no solution, I encourage you to install LibreOffice.

I encourage you in case of problem πŸ˜•
to create an issue
I will try to solve it πŸ˜„


Historical:

What has been done for version 0.0.5:

  • Integration and use of the new HsqlDB v2.5.1 system versioning.

  • Writing of a new Replicator interface, launched in the background (python Thread) responsible for:

    • Perform the necessary procedures when creating a new user (initial Pull).

    • Carry out pulls regularly (every ten minutes) in order to synchronize any external changes (Pull all changes).

    • Replicate on demand all changes to the hsqldb 2.5.1 database using system versioning (Push all changes).

  • Writing of a new DataBase interface, responsible for making all calls to the database.

  • Setting up a cache on the Identifiers, see method: _getUser(), allowing access to a Content (file or folder) without access to the database for subsequent calls.

  • Management of duplicate file/folder names by SQL Views: Child, Twin, Uri, and Title generating unique names if duplicates names exist.
    Although this functionality is only needed for gDriveOOo, it is implemented globally...

  • Many other fix...

What has been done for version 0.0.6:

  • Using new scheme: vnd-google:// as claimed by draft-king-vnd-urlscheme-03.txt

  • Achievement of handling duplicate file/folder names by SQL views in HsqlDB:

    • A Twin view grouping all the duplicates by parent folder and ordering them by creation date, modification date.
    • A Uri view generating unique indexes for each duplicate.
    • A Title view generating unique names for each duplicate.
    • A recursive view Path to generate a unique path for each file / folder.
  • Creation of a Provider able to respond to the two types of Urls supported (named and anonymous).
    Regular expressions (regex), declared in the UCB configuration file, are now used by OpenOffice/LibreOffice to send URLs to the appropriate ContentProvider.

  • Use of the new UNO struct DateTimeWithTimezone provided by the extension jdbcDriverOOo since its version 0.0.4.
    Although this struct already exists in LibreOffice, its creation was necessary in order to remain compatible with OpenOffice (see Enhancement Request 128560).

  • Modification of the Replicator interface, in order to allow:

    • To choose the data synchronization order (local first then remote or vice versa).
    • Synchronization of local changes by atomic operations performed in chronological order to fully support offline work.
      To do this, three SQL procedures GetPushItems, GetPushProperties and UpdatePushItems are used for each user who has accessed his files / folders.
  • Rewrite of the options window accessible by: Tools -> Options -> Internet -> gDriveOOo in order to allow:

    • Access to the two log files concerning the activities of the UCP and the data replicator.
    • Choice of synchronization order.
    • The modification of the interval between two synchronizations.
    • Access to the underlying HsqlDB 2.7.2 database managing your Google Drive metadata.
  • The presence or absence of a trailing slash in the Url is now supported.

  • Many other fix...

What has been done for version 1.0.1:

  • Implementation of the management of shared files.

  • The name of the shared folder can be defined before any connection in: Tools -> Options -> Internet -> gDriveOOo -> Handle shared documents in folder:

  • Many other fix...

What has been done for version 1.0.2:

  • The absence or obsolescence of the OAuth2OOo and/or jdbcDriverOOo extensions necessary for the proper functioning of gDriveOOo now displays an error message.

  • Many other things...

What has been done for version 1.0.3:

  • Support for version 1.2.0 of the OAuth2OOo extension. Previous versions will not work with OAuth2OOo extension 1.2.0 or higher.

What has been done for version 1.0.4:

  • Support for version 1.2.1 of the OAuth2OOo extension. Previous versions will not work with OAuth2OOo extension 1.2.1 or higher.

What has been done for version 1.0.5:

  • Support for version 1.2.3 of the OAuth2OOo extension. Fixed issue #12.

What has been done for version 1.0.6:

  • Support for version 1.2.4 of the OAuth2OOo extension. Many issues resolved.

What has been done for version 1.0.7:

  • Now use Python dateutil package to convert to UNO DateTime.

What has been done for version 1.1.0:

  • All Python packages necessary for the extension are now recorded in a requirements.txt file following PEP 508.
  • Now if you are not on Windows then the Python packages necessary for the extension can be easily installed with the command:
    pip install requirements.txt
  • Modification of the Requirement section.

What has been done for version 1.1.1:

  • Fixed a regression preventing the creation of new files.
  • Integration of a fix to workaround the issue #159988.

What has been done for version 1.1.2:

  • The creation of the database, during the first connection, uses the UNO API offered by the jdbcDriverOOo extension since version 1.3.2. This makes it possible to record all the information necessary for creating the database in 6 text tables which are in fact 6 csv files.
  • Rewriting the SQL views necessary for managing duplicates. Now a folder or file's path is calculated by a recursive view that supports duplicates.
  • Although the extension supports handling duplicate files and folder, it is no longer possible to create or rename them.
  • Installing the extension will disable the option to create a backup copy (ie: .bak file) in LibreOffice. If this option is validated then the extension is no longer capable of saving files.
  • The extension will ask you to install the OAuth2OOo and jdbcDriverOOo extensions in versions 1.3.4 and 1.3.2 respectively minimum.
  • Many fixes.

What remains to be done for version 1.1.2:

  • Add new language for internationalization...

  • Anything welcome...