summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElisa Sohier <elisa.sohier@art-software.fr>2019-08-01 16:41:50 +0200
committerElisa Sohier <elisa.sohier@art-software.fr>2019-08-01 16:48:08 +0200
commitf7f049127505a88e53678147e160ed0483ef308e (patch)
tree457b2d3bf31acac09b358c37786f2faf4a2a9a98
parent6d356743dc12283a4abb551fed8dcf5de9c66f1f (diff)
Created readme
-rw-r--r--README.mkd62
1 files changed, 62 insertions, 0 deletions
diff --git a/README.mkd b/README.mkd
index 8b13789..a9c4d1d 100644
--- a/README.mkd
+++ b/README.mkd
@@ -1 +1,63 @@
+# AutoSync #
+AutoSync is a tiny utility to synchronize data between computers.
+
+## Dependencies ##
+ - python >= 3.6
+ - rsync
+
+## How-to ##
+### Get help ###
+You can invoke AutoSync (we'll write asc from here, it's shorter :) ) with *no* option to let it list for you all that you can do with it
+(or you can see below)
+
+### File format ###
+asc uses a file in which you indicate a folder to synchronize, where to synchronize it and a name.
+The format is quite simple:
+
+ targetname source_path target_path
+
+Caution: **only use tab character between columns, not spaces!**
+
+Both source and target path can be local or start with [user@]host: prefix, in which case rsync will use SSH.
+You can use ~ notation as well as shell variables in the given paths.
+
+You should put one item per line, as many lines as you wish.
+
+The file must be located either at ~/.autoSync.tab (in which case its name will be "@default" for asc) or at ~/.autoSync.whateveryouwant.tab, in which case asc will see it as @whateveryouwant.
+
+### Address targets ###
+#### To synchronize ####
+To tell asc to synchronize a given item in a given tabfile, you should use:
+```bash
+asc @tabname target1 target2
+```
+and it will automatically sync all given targets.
+
+@tabname is what we saw earlier: it corresponds to the file in which you listed your targets (@tabname corresponds to ~/.autoSync.tabname.tab)
+target1 and target2 are names in the first column in this file.
+
+If you wish to synchronize *every* target, you simply invoke:
+```bash
+asc @target
+```
+
+#### To list available targets #####
+You can ask asc to list all available tabfiles without even having to use ls or these sort of things by invoking asc with only a single at (@) sign:
+```bash
+asc @
+```
+
+It will list all @tabname you can use, even the "default" one if the file ~/.autoSync.tab exists.
+
+To list all targets available for a given tabfile, just calls asc with its name **while doubling the at sign**, like this:
+```bash
+asc @@tabname
+```
+
+## Server mode ##
+Sometimes, you can want to setup a secondary sync server, but tell asc not to take the local data as if you were on a working computer (ie data is not likely to be modified in place directly).
+In this case, you can prepend the @tabname with a -s switch.
+
+Before every sending sync and after every receiving sync, asc updates the source timestamp to keep track of which version is more recent.
+The "server mode" prevents it from doing it, which will parasite a secondary server repository (because if you sync from a server to another, the server1 will update timestamps as if you had worked on the local copy, which you did not)