Welcome to SafeMyWork’s documentation!

Current version is 0.5

https://github.com/Thykof/SafeMyWork

SafeMyWork is intend for people who handle lot of files which can be texts, images, songs… The aim is to avoid losing documents.

How it work

SafeMyWork look for your modified files and copy them to another directory. The second feature is synchronisation of two folders.

Automitic saving

Run SafeMyWork and select your working folders. Then while you are working, every a certain amount of time, all files in this folder will be copying into a separated folder. It keeps your files safe if you forget to save your work or delete accidentally files.

Synchronization

The application can synchronize two folders. After scanning the two folders selected by the user, a dialog message shows potential conflicts. A conflict occurs when a file has the same path and same name in both folders. The user selects the file that she/he wants to keep. The size of the files and the last modification time are shown to help the choose. Then, a dialog shows what files would be lost (conflict resolution) and what files would be create (missing files in a folder).

Safer: save files

Sync: synchronise folders

class safer.sync.Sync(local_path, ext_path)
add_in_ext(filename)
add_in_local(filename)
change_dst(path_type, num)
compare(locals_files=None, ext_files=None)
exec_sync(local_path=None, ext_path=None)
remove_in_ext(filename)
remove_in_local(filename)
scan_compare(local_path=None, ext_path=None)
scan_dir(dirname)
set_config(config)
set_safe_doc(safe_doc)
solve_conflicts()
sync(comparison=None)

A module for simple functions

Define some fonctions.

safer.helpers.combine_list(list1, list2)

Create a list with only elements in common of the two lists.

Parameters:
  • list1 (list) – the first list
  • list2 (list) – the second list
Returns:

the created list

Return type:

list

safer.helpers.missing_item(list1, list2)

Return the list of directory in list1 but not in list2.

safer.helpers.path_without_root(path)

Return the path without the first directory.

e.g. “root/foo/bar” -> “foo/bar”

safer.helpers.split_path(path)

Return a list with all direcotry name in the given path.