how get the siril-spcc-database directory with python

Hello,

I am programming a utility in Python and would like to access the siril-spcc-database directory to then load the available sensors and filters.

Is there a command that makes this easier? I haven’t been able to find one.

Thanks.

When loading (with an internet connection), Siril fetches the remote spcc-database repository. It ends up on the computer (the location depends on the OS used). But in this folder you can find all the necessary files.
The repository is here: FA / siril-spcc-database · GitLab

I think that ideally your program should check whether the folder is present on the computer. If so, then you can use it.

Thanks,

My difficulty lies in finding the location on the computer depending on the operating system.

I can’t find how to obtain it without traversing the entire directory tree.

I see that the location of the repository appears in Preferences->Photometry. That’s what I need,but it doesn’t appear in config.ini

On Linux, files are located in
~/.local/share/siril-spcc-database
On macOS:
~/Library/Application Support/org.siril.Siril/siril-spcc-database
on Windows:
~\AppData\Local\siril-spcc-database

I use Linux. The AppImage version puts it where you say, but the flatpak version puts it in:

~/.var/app/org.siril.Siril/config/siril

That’s why I was looking for a command or way to get that directory regardless of the operating system and version.

I think siril.get_siril_userdatadir() should get you there (without the siril-spcc-database that you can add yourself).
Cheers,

C.

get_siril_userdatadir() in the sirilpy api should do the trick

On AppImage get_siril_userdatadir() return “/home/vant/.local/share/siril” but dir siril-spcc-database is in “/home/vant/.local/share”

Likewise on Flatpak return “/home/vant/.var/app/org.siril.Siril/data/siril” but it is in “/home/vant/.var/app/org.siril.Siril/data”.

I’ll try it going up a level but I am concerned that there may be inconsistencies between versions using that command.

with os.path.dirname(siril.get_siril_userdatadir()) work fine

Thanks