Multiple changes to the main file, after this unisync becomes kind of
usable.
Add subcommands : this uses the 2 previous commits to add the
subcommands to unisync it is now possible to sync, add and mount.
pathlib : move from PosixPath to Path
Remove unused imports
Rename base_namespace to cli_args
Add some comments and TODOs
this adds subcommands to the argparser using subparsers, we also set a
default value for func depending on which of the subcommands is
selected.
Also change the formatting of the epilog so it is on two lines.
This adds runners.py, it contains a set of functions that peform all the
various task that unisync can do (sync, add and mount for now).
They are simple function that put together all the rest.
Fix :
- paths : true instead of True
- paths : Path has no len convert to str first to get the number of
characters
Improvements :
- Replace all PosixPath by Path
Adds functions that allows adding new paths to the synchronisation.
When writing the new paths to the file if a parent directory is
synchronised all the childrens are removed.
This creates a new optionnal category in the config called other that is
used to configure various aspects of unison.
Currently it only allows to customise the path to the cache directory
which is ~/.unisync by default
This refactors the paths functions in a class called PathsManager
allowing to share some data like the Paths to the various directories
unisync works with.
This commit also creates the get_paths_to_sync method which simply reads
the paths file and returns its content as a list
Adds the mount_remote_dir method to the synchroniser, this allows to
mount the remote directory in order to access it with the generated
links.
Also adds the background parameter to the documentation of update_links
The paths file will be used for everything related to the paths to
synchronise.
Adds the user_select_files functions that allows the user to select
paths