Two working directories - Two instances

Hi,
I’m an happy user of paperwork for my personal stuff.

I’m recently working as a beekeeper and I want to use another working dir or instance to manage my professional documents. I know that the paperwork goal is to have everything in only one place but I would like keep perso and pro documents separated.
A solution could be the ability to pass the working directory as a startup parameter.
Is there any workaround ? perhaps using paperwork-shell.

Regards,

Maël

Hello,

At the moment, there is nothing implemented yet for that, but it’s on the TODO list.

The only workaround that I know of at the moment is by setting the environment variables XDG_CONFIG_HOME and XDG_DATA_HOME to use 2 different configurations. For example, in a Linux terminal:

export XDG_CONFIG_HOME=~/some_config_dir  # default is ~/.config
export XDG_DATA_HOME=~/some_data_dir  # default is ~/.local/share
paperwork

Or if you use Flatpak:

# both paths must be in your home directory
flatpak run \
  --env=XDG_CONFIG_HOME=${HOME}/some_config_dir  \
  --env=XDG_DATA_HOME=${HOME}/some_data_dir \
   work.openpaper.Paperwork

XDG_CONFIG_HOME specifies where the configuration file must be stored (${XDG_CONFIG_HOME}/paperwork.conf), and the configuration files contains the work directory location (so switching the first one allows to switch the second one).

XDG_DATA_HOME specifies where the data files (index, training, etc) must be stored (${XDG_DATA_HOME}/paperwork/*). Since those data files depends on the content of the work directory, you should switch them too. If you don’t, Paperwork will have to do full index updates everything you switch the work directory. It would be safe but it would be very slow.

Best regards,

Thanks for your quick answer :slight_smile:
I can made a shell script for my perso docs and I use the 2.99 version with flatpack for my pro docs.

Best regards,

Maël

Hello,
first of all, many thanks for this program. I just started a few days ago and it looks very promising.
I just wanted to ask about the topic here and if there will be the possibility having more than one
profiles /instance / working directory.
I really would appreciate that, because my father and my aunt are both over 80 and I started to scan their old data.
It would be such a big advantage to have not only the documents but also the config and the index separated to be able to switch the working directory without having the index created newly, which is very slow.
Anther advantage of this would be doing after work a backup and transfer this to the NAS completely including the appropriate index. Is there a chance to have this in the nearer future?
Nevertheless, whatever the answer will be, until now it is ALREADY a huge advantage having this stuff.
Thanks again.
regards
greizt

Good news, everyone !

TimKer has submitted a merge request to handle multiple work directories and it has been accepted.

It’s currently in the branch ‘develop’ (future Paperwork 2.1). If you want, you can try it here:

You must uninstall the stable version first (it won’t delete your documents). I use daily the Flatpak build from the branch develop so it’s kind-of-stable, but I haven’t used the Windows version for quite some times.

Regarding the GUI, nothing has changed. The only change is that when switching from a work directory to another in the settings, Paperwork won’t have to recreate the index from scratch every time (unless you haven’t used this work directory for more than 31 days).