Adds usage of the paths manager

This commit is contained in:
2025-12-31 00:03:17 +01:00
parent 86a6c8acce
commit f9001ecb9d

View File

@@ -5,6 +5,8 @@ import os
from argparser import create_argparser from argparser import create_argparser
from config import RootsConfig, ServerConfig, Config, load_config from config import RootsConfig, ServerConfig, Config, load_config
from synchroniser import Synchroniser from synchroniser import Synchroniser
from pathlib import Path, PosixPath
from paths import *
def main(): def main():
parser = create_argparser() parser = create_argparser()
@@ -29,14 +31,19 @@ def main():
config.unison.values config.unison.values
) )
paths_manager = PathsManager(Path(config.roots.local), config.other.cache_dir_path)
if synchroniser.create_ssh_master_connection() != 0: if synchroniser.create_ssh_master_connection() != 0:
print("Connection failed quitting") print("Connection failed quitting")
return 1 return 1
print("Connected to the remote.") print("Connected to the remote.")
synchroniser.sync_files(["salut"]) #synchroniser.sync_files()
#synchroniser.update_links(background=False)
#synchroniser.mount_remote_dir()
synchroniser.close_ssh_master_connection() synchroniser.close_ssh_master_connection()
print(paths_manager.get_paths_to_sync())