Skip to content

Commit

Permalink
new version 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
prrvchr committed Jan 14, 2024
1 parent 1a2dc19 commit 35b1cf6
Show file tree
Hide file tree
Showing 25 changed files with 90 additions and 52 deletions.
File renamed without changes.
3 changes: 3 additions & 0 deletions Fluid-Attacks-Scan.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
docker run -v ~/github/vCardOOo:/working-dir ghcr.io/fluidattacks/makes/amd64 m gitlab:fluidattacks/universe@trunk /skims scan ./_fascan.yml
docker system prune -f
42 changes: 25 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

**The use of this software subjects you to our [Terms Of Use][4] and [Data Protection Policy][5].**

# version [1.0.4][6]
# version [1.1.0][6]

## Introduction:

Expand All @@ -48,19 +48,19 @@ ___

## Requirement:

In order to take advantage of the latest versions of the Python libraries used in vCardOOo, version 2 of Python has been abandoned in favor of **Python 3.8 minimum**.
This means that **vCardOOo no longer supports OpenOffice and LibreOffice 6.x on Windows since version 1.0.0**.
I can only advise you **to migrate to LibreOffice 7.x**.
The vCardOOo extension uses the OAuth2OOo extension to work.
It must therefore meet the [requirement of the OAuth2OOo extension][12].

vCardOOo uses a local [HsqlDB][12] database version 2.7.2.
HsqlDB being a database written in Java, its use requires the [installation and configuration][13] in LibreOffice / OpenOffice of a **JRE version 11 or later**.
I recommend [Adoptium][14] as your Java installation source.
The vCardOOo extension uses the jdbcDriverOOo extension to work.
It must therefore meet the [requirement of the jdbcDriverOOo extension][13].

If you are using **LibreOffice Community on Linux**, you are subject to [bug 139538][15]. To work around the problem, please **uninstall the packages** with commands:
- `sudo apt remove libreoffice-sdbc-hsqldb` (to uninstall the libreoffice-sdbc-hsqldb package)
- `sudo apt remove libhsqldb1.8.0-java` (to uninstall the libhsqldb1.8.0-java package)
**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 -> vCardOOo -> View log -> System Info**
If outdated packages appear, you can update them with the command:
`pip install --upgrade <package-name>`

If you still want to use the Embedded HsqlDB functionality provided by LibreOffice, then install the [HyperSQLOOo][16] extension.
For more information see: [What has been done for version 1.1.0][14].

___

Expand Down Expand Up @@ -218,7 +218,14 @@ It will give you access to an information system that only larges companies are

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

### What remains to be done for version 1.0.3:
### What has been done for version 1.1.0:

- All Python packages necessary for the extension are now recorded in a [requirements.txt][47] file following [PEP 508][48].
- 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][49] section.

### What remains to be done for version 1.1.0:

- Make the address book locally editable with replication of changes.

Expand All @@ -237,11 +244,9 @@ It will give you access to an information system that only larges companies are
[9]: <https://www.openoffice.org/download/index.html>
[10]: <https://github.com/prrvchr/vCardOOo>
[11]: <https://github.com/prrvchr/vCardOOo/issues/new>
[12]: <http://hsqldb.org/>
[13]: <https://wiki.documentfoundation.org/Documentation/HowTo/Install_the_correct_JRE_-_LibreOffice_on_Windows_10>
[14]: <https://adoptium.net/releases.html?variant=openjdk11>
[15]: <https://bugs.documentfoundation.org/show_bug.cgi?id=139538>
[16]: <https://prrvchr.github.io/HyperSQLOOo/>
[12]: <https://prrvchr.github.io/OAuth2OOo/#requirement>
[13]: <https://prrvchr.github.io/jdbcDriverOOo/#requirement>
[14]: <https://prrvchr.github.io/vCardOOo/#what-has-been-done-for-version-110>
[17]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2OOo.svg#middle>
[18]: <https://prrvchr.github.io/OAuth2OOo/>
[19]: <https://github.com/prrvchr/OAuth2OOo/releases/latest/download/OAuth2OOo.oxt>
Expand Down Expand Up @@ -272,3 +277,6 @@ It will give you access to an information system that only larges companies are
[44]: <https://github.com/prrvchr/vCardOOo/blob/main/uno/lib/uno/card/card/user.py>
[45]: <https://github.com/prrvchr/vCardOOo/blob/main/source/vCardOOo/source/io/github/prrvchr/carddav/CardSync.java>
[46]: <https://github.com/mangstadt/ez-vcard>
[47]: <https://github.com/prrvchr/vCardOOo/tree/main/source/vCardOOo/requirements.txt>
[48]: <https://peps.python.org/pep-0508/>
[49]: <https://prrvchr.github.io/vCardOOo/#requirement>
42 changes: 25 additions & 17 deletions README_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

**L'utilisation de ce logiciel vous soumet à nos [Conditions d'utilisation][4] et à notre [Politique de protection des données][5]**.

# version [1.0.4][6]
# version [1.1.0][6]

## Introduction:

Expand All @@ -48,19 +48,19 @@ ___

## Prérequis:

Afin de profiter des dernières versions des bibliothèques Python utilisées dans vCardOOo, la version 2 de Python a été abandonnée au profit de **Python 3.8 minimum**.
Cela signifie que **vCardOOo ne supporte plus OpenOffice et LibreOffice 6.x sous Windows depuis sa version 1.0.0**.
Je ne peux que vous conseiller **de migrer vers LibreOffice 7.x**.
L'extension vCardOOo utilise l'extension OAuth2OOo pour fonctionner.
Elle doit donc répondre aux [prérequis de l'extension OAuth2OOo][12].

vCardOOo utilise une base de données locale [HsqlDB][12] version 2.7.2.
HsqlDB étant une base de données écrite en Java, son utilisation nécessite [l'installation et la configuration][13] dans LibreOffice / OpenOffice d'un **JRE version 11 ou ultérieure**.
Je vous recommande [Adoptium][14] comme source d'installation de Java.
L'extension vCardOOo utilise l'extension jdbcDriverOOo pour fonctionner.
Elle doit donc répondre aux [prérequis de l'extension jdbcDriverOOo][13].

Si vous utilisez **LibreOffice Community sous Linux**, vous êtes sujet au [dysfonctionnement 139538][15]. Pour contourner le problème, veuillez **désinstaller les paquets** avec les commandes:
- `sudo apt remove libreoffice-sdbc-hsqldb` (pour désinstaller le paquet libreoffice-sdbc-hsqldb)
- `sudo apt remove libhsqldb1.8.0-java` (pour désinstaller le paquet libhsqldb1.8.0-java)
**Sous Linux et macOS les paquets Python** utilisés par l'extension, peuvent s'il sont déja installé provenir du système et donc, **peuvent ne pas être à jour**.
Afin de s'assurer que vos paquets Python sont à jour il est recommandé d'utiliser l'option **Info système** dans les Options de l'extension accessible par:
**Outils -> Options -> Internet -> vCardOOo -> Voir journal -> Info système**
Si des paquets obsolètes apparaissent, vous pouvez les mettre à jour avec la commande:
`pip install --upgrade <package-name>`

Si vous souhaitez quand même utiliser la fonctionnalité HsqlDB intégré fournie par LibreOffice, alors installez l'extension [HyperSQLOOo][16].
Pour plus d'information voir: [Ce qui a été fait pour la version 1.1.0][14].

___

Expand Down Expand Up @@ -218,7 +218,14 @@ Elle vous donnera accès à un système d'information que seules les grandes ent

- Prise en charge de la version 1.2.1 de l'extension **OAuth2OOo**. Les versions précédentes ne fonctionneront pas avec l'extension **OAuth2OOo** 1.2.1 ou ultérieure.

### Que reste-t-il à faire pour la version 1.0.3:
### Ce qui a été fait pour la version 1.1.0:

- Tous les paquets Python nécessaires à l'extension sont désormais enregistrés dans un fichier [requirements.txt][47] suivant la [PEP 508][48].
- Désormais si vous n'êtes pas sous Windows alors les paquets Python nécessaires à l'extension peuvent être facilement installés avec la commande:
`pip install requirements.txt`
- Modification de la section [Prérequis][49].

### Que reste-t-il à faire pour la version 1.1.0:

- Rendre le carnet d'adresses modifiable localement avec la réplication des modifications.

Expand All @@ -237,11 +244,9 @@ Elle vous donnera accès à un système d'information que seules les grandes ent
[9]: <https://www.openoffice.org/fr/Telecharger/>
[10]: <https://github.com/prrvchr/vCardOOo>
[11]: <https://github.com/prrvchr/vCardOOo/issues/new>
[12]: <http://hsqldb.org/>
[13]: <https://wiki.documentfoundation.org/Documentation/HowTo/Install_the_correct_JRE_-_LibreOffice_on_Windows_10/fr>
[14]: <https://adoptium.net/releases.html?variant=openjdk11>
[15]: <https://bugs.documentfoundation.org/show_bug.cgi?id=139538>
[16]: <https://prrvchr.github.io/HyperSQLOOo/README_fr>
[12]: <https://prrvchr.github.io/OAuth2OOo/README_fr#pr%C3%A9requis>
[13]: <https://prrvchr.github.io/jdbcDriverOOo/README_fr#pr%C3%A9requis>
[14]: <https://prrvchr.github.io/vCardOOo/README_fr#ce-qui-a-%C3%A9t%C3%A9-fait-pour-la-version-110>
[17]: <https://prrvchr.github.io/OAuth2OOo/img/OAuth2OOo.svg#middle>
[18]: <https://prrvchr.github.io/OAuth2OOo/README_fr>
[19]: <https://github.com/prrvchr/OAuth2OOo/releases/latest/download/OAuth2OOo.oxt>
Expand Down Expand Up @@ -272,3 +277,6 @@ Elle vous donnera accès à un système d'information que seules les grandes ent
[44]: <https://github.com/prrvchr/vCardOOo/blob/main/uno/lib/uno/card/card/user.py>
[45]: <https://github.com/prrvchr/vCardOOo/blob/main/source/vCardOOo/source/io/github/prrvchr/carddav/CardSync.java>
[46]: <https://github.com/mangstadt/ez-vcard>
[47]: <https://github.com/prrvchr/vCardOOo/tree/main/source/vCardOOo/requirements.txt>
[48]: <https://peps.python.org/pep-0508/>
[49]: <https://prrvchr.github.io/vCardOOo/README_fr#pr%C3%A9requis>
4 changes: 2 additions & 2 deletions _fascan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ output:
working_dir: .
sast:
include:
- source/vCardOOo/source/io/github/prrvchr/
- source/vCardOOo/service/pythonpath/vcard/
- glob(source/vCardOOo/service/*.py)
- glob(source/vCardOOo/service/pythonpath/vcard/*)
- glob(source/vCardOOo/source/*)
sca:
include:
- .
Expand Down
2 changes: 1 addition & 1 deletion source/vCardOOo/description.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
xmlns="http://openoffice.org/extensions/description/2006"
xmlns:d="http://openoffice.org/extensions/description/2006"
xmlns:xlink="http://www.w3.org/1999/xlink">
<version value="1.0.4"/>
<version value="1.1.0"/>
<identifier value="io.github.prrvchr.vCardOOo"/>
<platform value="all"/>
<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion source/vCardOOo/description/desc_en.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Your phone contacts finally available in LibreOffice.
Your CardDAV contacts (Nextcloud) finally available in LibreOffice.
2 changes: 1 addition & 1 deletion source/vCardOOo/description/desc_fr.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Vos contacts téléphoniques enfin accessibles dans LibreOffice.
Vos contacts CardDAV (Nextcloud) enfin accessibles dans LibreOffice.
4 changes: 2 additions & 2 deletions source/vCardOOo/package.properties

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions source/vCardOOo/registration/PrivacyPolicy_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ Use of the `Supplier` services through `OAuth2OOo` and/or `vCardOOo` may subject
[1]: <https://prrvchr.github.io/vCardOOo/source/vCardOOo/registration/PrivacyPolicy_fr>
[2]: <https://prrvchr.github.io/vCardOOo/source/vCardOOo/registration/TermsOfUse_en>
[3]: <https://prrvchr.github.io/vCardOOo/>
[4]: <https://github.com/prrvchr/OAuth2OOo/raw/master/OAuth2OOo.oxt>
[5]: <https://github.com/prrvchr/vCardOOo/raw/master/vCardOOo.oxt>
[4]: <https://github.com/prrvchr/OAuth2OOo/releases/latest/download/OAuth2OOo.oxt>
[5]: <https://github.com/prrvchr/vCardOOo/releases/latest/download/vCardOOo.oxt>
[6]: <https://prrvchr.github.io/OAuth2OOo/source/OAuth2OOo/registration/PrivacyPolicy_en>
4 changes: 2 additions & 2 deletions source/vCardOOo/registration/PrivacyPolicy_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ Le `Fournisseur` est seul responsable de l'expiration des données qu'il collect
[1]: <https://prrvchr.github.io/vCardOOo/source/vCardOOo/registration/PrivacyPolicy_en>
[2]: <https://prrvchr.github.io/vCardOOo/source/vCardOOo/registration/TermsOfUse_fr>
[3]: <https://prrvchr.github.io/vCardOOo/README_fr>
[4]: <https://github.com/prrvchr/OAuth2OOo/raw/master/OAuth2OOo.oxt>
[5]: <https://github.com/prrvchr/vCardOOo/raw/master/vCardOOo.oxt>
[4]: <https://github.com/prrvchr/OAuth2OOo/releases/latest/download/OAuth2OOo.oxt>
[5]: <https://github.com/prrvchr/vCardOOo/releases/latest/download/vCardOOo.oxt>
[6]: <https://prrvchr.github.io/OAuth2OOo/source/OAuth2OOo/registration/PrivacyPolicy_fr>
5 changes: 5 additions & 0 deletions source/vCardOOo/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
decorator>=5.1.1
packaging>=23.2
setuptools>=69.0.3
six>=1.16.0
validators>=0.22.0
2 changes: 1 addition & 1 deletion source/vCardOOo/service/Driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

# pythonloader looks for a static g_ImplementationHelper variable
g_ImplementationHelper = unohelper.ImplementationHelper()
g_ImplementationName = '%s.Driver' % g_identifier
g_ImplementationName = f'{g_identifier}.Driver'


class Driver(unohelper.Base,
Expand Down
13 changes: 9 additions & 4 deletions source/vCardOOo/service/OptionsHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,23 @@

import unohelper

from com.sun.star.logging.LogLevel import SEVERE

from com.sun.star.lang import XServiceInfo
from com.sun.star.awt import XContainerWindowEventHandler

from vcard import OptionsManager

from vcard import getLogger

from vcard import g_identifier
from vcard import g_defaultlog

import traceback

# pythonloader looks for a static g_ImplementationHelper variable
g_ImplementationHelper = unohelper.ImplementationHelper()
g_ImplementationName = '%s.OptionsHandler' % g_identifier
g_ImplementationName = f'{g_identifier}.OptionsHandler'


class OptionsHandler(unohelper.Base,
Expand All @@ -49,14 +54,15 @@ class OptionsHandler(unohelper.Base,
def __init__(self, ctx):
self._ctx = ctx
self._manager = None
self._logger = getLogger(ctx, g_defaultlog)

# XContainerWindowEventHandler
def callHandlerMethod(self, window, event, method):
try:
handled = False
if method == 'external_event':
if event == 'initialize':
self._manager = OptionsManager(self._ctx, window, False)
self._manager = OptionsManager(self._ctx, window, self._logger)
handled = True
elif event == 'ok':
self._manager.saveSetting()
Expand All @@ -69,8 +75,7 @@ def callHandlerMethod(self, window, event, method):
handled = True
return handled
except Exception as e:
msg = "OptionsHandler.callHandlerMethod() Error: %s" % traceback.format_exc()
print(msg)
self._logger.logprb(SEVERE, 'OptionsHandler', 'callHandlerMethod()', 141, e, traceback.format_exc())

def getSupportedMethodNames(self):
return ('external_event',
Expand Down
1 change: 1 addition & 0 deletions source/vCardOOo/service/pythonpath/_distutils_hack
1 change: 1 addition & 0 deletions source/vCardOOo/service/pythonpath/pkg_resources
1 change: 1 addition & 0 deletions source/vCardOOo/service/pythonpath/setuptools
1 change: 1 addition & 0 deletions source/vCardOOo/service/pythonpath/six-1.16.0.dist-info
2 changes: 1 addition & 1 deletion source/vCardOOo/service/pythonpath/vcard/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@


class Provider(ProviderBase):
def __init__(self, ctx):
def __init__(self, ctx, database):
ProviderBase.__init__(self, ctx)
self._chunk = 256
self._cardsync = '%s.CardSync' % g_identifier
Expand Down
2 changes: 1 addition & 1 deletion vCardOOo.update.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
xmlns="http://openoffice.org/extensions/update/2006"
xmlns:xlink="http://www.w3.org/1999/xlink">
<identifier value="io.github.prrvchr.vCardOOo" />
<version value="1.0.3" />
<version value="1.1.0" />
<update-download>
<src xlink:href="https://github.com/prrvchr/vCardOOo/releases/latest/download/vCardOOo.oxt" />
</update-download>
Expand Down

0 comments on commit 35b1cf6

Please sign in to comment.