Open lbayle opened 1 year ago
Hi Louis,
I'm about a million miles from being an experienced LibreOffice plugin developer, but thanks for the nice words. I haven't used any LibreOffice newer than 6.1 so can't comment with confidence on anything LO7 related.
But since you're capable of compiling the extension I suggest trying the v0.3.0 branch. There's a comment in https://github.com/walkjivefly/LOC-Extension/commit/3af0d23c06f826b21f481d3cc6c81340e7fcbffc which mentions LO6 compatibility. I can't remember what the symptoms were which prompted that change, and if it was a compile-time error due to a bad path you've probably adjusted that anyway. If you go with the v0.3.0 branch you
The plugin system always seemed janky and fragile when I was playing with the extension. It was easy to get a partially registered plugin which made it unusable or hard to uninstall/reinstall, the only reliable workaround being wipe the extensions directory and start again (see https://github.com/walkjivefly/LOC-Extension/issues/2) but if that doesn't work for you, and compiling yourself doesn't fix it then I have no other suggestions.
If you make it work do please let me know (and how). Good luck!
Hi again, First of all thank you for your very quick answer ! So far, I still have problems, but I got a big step forward as I managed to get your Examples.ods to work.
In the 'cctx' tab, changing the ticker (F3) to 'BTC/USDT' updated the result cell (F5) correctly !
BUT, copy-paste the F5 formula to another cell ended up to a #NAME?
The only difference between theese too cells are the 'uppercase/lowercase' of the function name
Existing : =AutoAddIn.LOC.ccxt(F2,F3,F4)
New cell: =autoaddin.loc.ccxt(F2,F3,F4)
The odd thing is, that it is LibreOffice that automaticaly changes to lowercase. I tried many times, also by retyping the formula, or double-click from the function list (which is full uppercase by the way) but it inevitably ends up with lowercase.
My next step is to change all occurrences of "AutoAddIn" and "LOC" in your code to lowercase and try again. I'll let you know
In case any other person is interested, here is how I installed the plugin:
Install Manjaro libreoffice packages
libreoffice-fresh
& libreoffice-fresh-sdk
Compile LOC.oxt
git clone https://github.com/walkjivefly/LOC-Extension.git
cd LOC-Extension
git checkout v0.3.0
./compile.sh
mv LOC.oxt LOC_0.3.0.oxt
Install ccxt on my Manjaro Linux by following this tutorial
sudo pacman -S --needed git && git clone https://aur.archlinux.org/python-ccxt.git && cd python-ccxt && makepkg -si
activate the plugin In LibreOffice v7.4.5.1 With the extension manager, everything goes well The function list has the 6 new functions you mentioned.
[SOLVED] I finally came up with a FIX for the plugin !
The CompatibilityName
parameter in the function definition is there to add Excel compatibility, but it somehow breaks the compatibility with LibreOffice 7.4.
So all you need to do is to comment the 3 lines defining this parameter in generate_metainfo.py
and the plugin works again !
https://github.com/walkjivefly/LOC-Extension/blob/v0.3.0/src/generate_metainfo.py#L84-L86
You can then access the function in your calc sheet by using it's full path:
=COM.LOC.CRYPTO.GETINFO.PYTHON.LOCIMPL.CCXT(F2,F3,F4)
or
=COM.LOC.CRYPTO.GETINFO.PYTHON.LOCIMPL.CCXT("binance","BTC/USDT","last")
best regards
Hey Louis, thanks for the detailed research, identifying the problem and finding a solution. When I get round to releasing v0.3.0 (not before I have to upgrade LO to >=7.x on my home machine) I'll include your fix.
Hi, This may not a problem with your plugin, but as an experienced LibreOffice plugin developer, you may have an idea on how to help me:
I compiled your master branch with LibreOffice 7.4.5.1 On Manjaro Linux. Once the plugin add to LibreOffice, I can see them in the "functions List" :
AUTOADDIN.LOC.CCTX
AUTOADDIN.LOC.GERTPOLONIEX
but when I try to use them, I get the
#NAME?
error message.This is how I call it:
=autoaddin.loc.ccxt("binance", "BTC/BUSD","last")
or=ccxt("binance", "BTC/BUSD","last")
When opening your Examples.ods, I get some red "Exceptions encountered" or "something bad happened" messages.
Thank you very much for your plugin and your help Louis