From 0a627ae9cad235ce4f2e2e68becb88bdb7de7d7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Majdand=C5=BEi=C4=87?= Date: Mon, 1 Jul 2024 20:38:38 +0200 Subject: [PATCH] Add readme --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..61bf9db --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +# synclib + +A small Go tool for creating symbolic links + +Created out of infuriating difficulty of creating symbolic links on windows + +## Custom syntax + +The tool works with "instructions" that describe symbolic links + +They are, in any form, \,\,\ + +For example: +`sync this,that` + +It supports input of these instructions through: + +- Stdin + - `echo "this,that" | sync` +- Run arguments + - `sync this,that foo,bar "foo 2","C:/bar"` +- Files + - `sync -f \` + - Where the file contains instructions, one instruction per line +- Directories + - `sync -r \` + - This mode will look for "sync" files recursively in directories and run their instructions + +## Use case + +I have a lot of folders (documents, projects, configurations) backed up via Seafile and to have the software using those folders find them at their usual location I'm creating soft symbolic links from the seafile drive to their original location + +It would be problematic to have to redo all (or some part) of these symlinks when reinstalling the OS or having something somewhere explode (say software uninstalled) so I have all the instructions in sync files in individual folders in the seafile drive + +Which means I can easily back up my configuration and `sync -r ~/Seafile` to symlink it where it belongs \ No newline at end of file