about summary refs log tree commit diff stats
path: root/README
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-08-27 18:02:02 +0530
committerAndinus <andinus@nand.sh>2020-08-27 18:02:02 +0530
commit1e63070b73b6950eb4f798f20176a94bff73349d (patch)
tree12d788e18f5cbac51a7ef52bbebcd8ea23fd13b5 /README
parentcb14d4e8506fe1b34c88a02c3008694e242423ea (diff)
downloadleo-1e63070b73b6950eb4f798f20176a94bff73349d.tar.gz
Add help option, update documentation to explain new profiles
Diffstat (limited to 'README')
-rw-r--r--README54
1 files changed, 11 insertions, 43 deletions
diff --git a/README b/README
index 2f52d71..cb1f1fd 100644
--- a/README
+++ b/README
@@ -9,7 +9,7 @@ Table of Contents
 ─────────────────
 
 1 Documentation
-.. 1.1 Dispatch table
+.. 1.1 Profile
 .. 1.2 Options
 ..... 1.2.1 encrypt/sign
 ..... 1.2.2 delete
@@ -33,51 +33,19 @@ list. It can encrypt/sign files with gpg2(1).
   computer as a backup.
 
 
-1.1 Dispatch table
-──────────────────
-
-  `%dispatch' has the pre-defined list. Learn the list directly from
-  `leo.pl', it's self-explanatory. Or check the sub `HelpMessage', it
-  explains what each command does.
-
-  For example, `documents' will archive `$ENV{HOME}/documents' to
-  `/tmp/archive/documents_$ymd.tar' where `$ymd' is current date in
-  `YYYY-MM-DD' format.
-  ┌────
-  │ my %dispatch = (
-  │     journal => sub {
-  │         archive("$archive_dir/journal_$ymd.tar",
-  │                 "-C", "$ENV{HOME}/documents",
-  │                 "andinus.org.gpg", "archive.org.gpg");
-  │     },
-  │     ...
-  │ );
-  └────
-
-  Currently I generate the dispatch table with a function & only special
-  profiles are added manually like above. `journal' is a special profile
-  because I don't want encryption on it.
+1.1 Profile
+───────────
 
-  Other profiles are added by this function:
-  ┌────
-  │ # This adds the directories that have same path relative to $ENV{HOME}
-  │ # as profile name.
-  │ foreach my $profile (qw( emails music projects documents .ssh
-  │                          .password-store)) {
-  │     $dispatch{$profile} = sub {
-  │         archive("$archive_dir/${profile}_$ymd.tar",
-  │                 "-C", "$ENV{HOME}/$profile", ".");
-  │     };
-  │ }
-  └────
+  Profile is a simple hash table which contains the list of profiles.
+  The profiles are mapped to a list of file paths relative to `$HOME'
+  which are to be archived.
 
-  I alias paths like `.ssh' to make it convenient to type:
+  Complex profiles are hard coded & simple ones are generated. Complex
+  profiles include profiles that have multiple files or are a mix or
+  files & directories. Simple profiles are profiles with just single
+  directory.
 
-  ┌────
-  │ # Aliases for inconvenient paths.
-  │ $dispatch{ssh} = $dispatch{".ssh"};
-  │ $dispatch{pass} = $dispatch{".password-store"};
-  └────
+  You can run `help' to see all the profiles along with the paths.
 
 
 1.2 Options