aboutsummaryrefslogtreecommitdiff
path: root/README.org
blob: c0fc06213cf6a7a55e23d420a527aaaacb68d1e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#+title: Ftag: organize files by giving them tags

* What is Ftag

I have struggled for a long time to properly manage my administrative
documents. What I mean by /managing/ is:
- being able to quickly find any file based on what is about (appartment,
  job...);
- same based on date;
- not having to duplicate files (e.g. my car insurance being in the directory
  =car= as well as =insurance=);
- have a convenient way of packaging a few of them into an archive to send to
  someone.

I createed Ftag in order to make the above easier. On top of that, I tried to
build Ftag in a way that:
- is command-line based;
- is composable with standard tools (=grep=, =find=, ...);
- allows encryption of documents;
- allows synchronizing the data on multiple machine;
- allows renaming the files for sending (e.g. add my name at the end of every
  file name).

* Examples

** Migrating to Ftag

First, initialize Ftag:

#+begin_src console
$ ftag init
#+end_src

Second, write all my documents' file names to a temporary file:

#+begin_src console
$ find ~/paperwork -type f -fprint0 /tmp/files
#+end_src

Third, give them to =ftag file add= using =xargs= to add them all to the Ftag database:

#+begin_src console
$ xargs -0 -a /tmp/files ftag file add -i
#+end_src

Fourth, create a bunch of tags and give files the proper tags (very tedious, but
this is the only time we will have to do it manually for numerous files):

#+begin_src console
$ ftag tag add
[...]
$ ftag file tag
[...]
#+end_src

** Take a look at all my car insurance files

#+begin_src console
$ ftag query -t car -t insurance
#+end_src


* Installation

#+begin_src console
$ git clone https://tristanriehs.fr/git/ftag
$ cd ftag
$ make
# make install
#+end_src

* Getting started

#+begin_src console
$ ftag init
$ ftag file add ~/paperwork/my_first_document.pdf
$ ftag file list
My First Document
$ ftag tad add my_first_tag "This is my first tag"
$ ftag file tag my_first_document my_first_tag
$ ftag query -t my_first_tag
My First Document
#+end_src