Personal-files request for olman

I’d like to request access to the XDG folders for the olman application, if possible with auto-connect. If the auto-connect is not possible, we can show the instructions on how to connect to the user.

The folders are needed so olman can follow the XDG Base Directory Specification using the default values which are all in dot-directories so not accessible by default via the home plug.

plugs:
  home-xdg-dot-folders-olman:
    interface: personal-files
    write:
      - $HOME/.cache/olman
      - $HOME/.config/olman
      - $HOME/.local/share/olman

Olman is the start of a new library manager application to support OpenSCAD. The initial version was created within this years Google Summer of Code project but will be maintained from now on by the OpenSCAD team together with the original author.

At some later point, the OpenSCAD snaps will need read access to the .local/share folder too but this is not in scope of this request.

This is an official OpenSCAD project and I’m also maintainer of the official OpenSCAD snaps.

About OpenSCAD

OpenSCAD is software for creating solid 3D CAD models. It is free software and available for Linux/UNIX, Windows and Mac OS X. Unlike most free software for creating 3D models (such as Blender) it does not focus on the artistic aspects of 3D modelling but instead on the CAD aspects. Thus it might be the application you are looking for when you are planning to create 3D models of machine parts but pretty sure is not what you are looking for when you are more interested in creating computer-animated movies.

OpenSCAD is not an interactive modeller. Instead it is something like a 3D-compiler that reads in a script file that describes the object and renders the 3D model from this script file. This gives you (the designer) full control over the modelling process and enables you to easily change any step in the modelling process or make designs that are defined by configurable parameters.

OpenSCAD provides two main modelling techniques: First there is constructive solid geometry (aka CSG) and second there is extrusion of 2D outlines. Autocad DXF files can be used as the data exchange format for such 2D outlines. In addition to 2D paths for extrusion it is also possible to read design parameters from DXF files. Besides DXF files OpenSCAD can read and create 3D models in the STL and OFF file formats.

A snap named olman would appear to be the clear owner of paths like $HOME/.cache/olman etc so this seems quite reasonable. However, unless this snap is expected to read/write to files that may already reside in the users real home directory, could it not just write to them via the $HOME environment variable, which would then use the per-snap private home directory to remove the need for personal-files use?

The functionality of olman will be to manage/download libraries used in OpenSCAD, so at least the main data folder $HOME/.local/share/olman needs to be shared with OpenSCAD, independent of OpenSCAD being installed as Snap or from other sources. Making this folder private to the olman Snap home would require OpenSCAD to detect that case and find libraries there. I don’t think that will be acceptable for OpenSCAD.

A different option I can see would be keeping cache and config folders in the Snap private home, but use $HOME/.local/share/OpenSCAD (or some other, not olman specific name) for the shared storage. This would still require the olman Snap to have a personal-files slot.

Ok that sounds reasonable - however, given that we usually try and name a personal-files instance using the path name itself, how about we split this into 3 different plugs:

plugs:
  dot-cache-olman:
    interface: personal-files
    write:
      - $HOME/.cache/olman
  dot-config-olman:
    interface: personal-files
    write:
      - $HOME/.config/olman
  dot-local-shame-olman:
    interface: personal-files
    write:
      - $HOME/.local/share/olman

Sure. I just did not see that recommendation before. If that’s preferred, I’m happy to change.

Github is updated to use those 3 separate slots:

+1 from my end for the above plugs Just a nit-picking feedback on fixing the typo dot-local-shame-olman to dot-local-share-olman

thanks

Oh, oops, thanks for spotting that. Typo is fixed.

+1 from me too.

+2 votes for, 0 votes against, granting auto-connect of the following personal-files instances for olman - this is now live.

plugs:
  dot-cache-olman:
    interface: personal-files
    write:
      - $HOME/.cache/olman
  dot-config-olman:
    interface: personal-files
    write:
      - $HOME/.config/olman
  dot-local-share-olman:
    interface: personal-files
    write:
      - $HOME/.local/share/olman