]> Sergey Matveev's repositories - schwabrak.git/blob - README
c536bf82e172d7ef1800f863426d4c4b78ee205297f58e2ea9d78189b3497643
[schwabrak.git] / README
1 schwabrak -- simple flat file based issue tracker
2
3 I want a relatively simple issue/ticket tracker. Something like Trac,
4 Redmine or Fossil. But they require heavy dependencies (Python, Ruby),
5 database and they are centralised. You can not work with them offline
6 and it is relatively complicated to replicate data to a locally running
7 copy of any of those trackers (well, except for Fossil I believe). And
8 is a web-interface necessary at all?
9
10 What is a ticket/issue? Just some plain text descriptions, with
11 attached enumerations (statuses, assignments, priorities, projects,
12 subsystems, severities, resolutions, etc) and a pile of append-only
13 comments, possibly with another file attachments. Can all of that
14 live in a directory with several plain text files? Can it be linked
15 with other issues just by making a symbolic links in deps/ subdirectory?
16 Do Git commits provide supplementary metainformation about when and
17 by whom any of the change is made in that directory? Definitely yes!
18 And because of DVCS you get ability to keep the whole distributed copy
19 of the tracker on each developer's machine. You can send changes to it
20 asynchronously as a patch or bundle.
21
22 Basically schwabrak is mainly about a convention how to keep issues in
23 files, loosely similar to https://github.com/driusan/PoormanIssueTracker,
24 from which I borrowed idea of replacing spaces with dashes in issue names.
25
26 Issues are kept in the issues/ directory. Each issue can be a part of
27 projects hierarchy: main-project/sub-proj/issue-name. Directory's name
28 is the issue's brief name. Dashes should be interpreted as spaces and
29 n > 1 dashes should be interpreted as n-1 dashes when converting the
30 directory name to a human readable issue title, as PoormanIssueTracker
31 suggests. The "about" file contains the description of the issue. The
32 "result" (initially empty) contains the closed issue resolution
33 information.
34
35 The "created" issue's file contains the datetime it was created. It is
36 used to help sort issues by date. Unfortunately Git does not keep and
37 restore mtimes, which would probably eliminate the need of separate
38 files with the timestamps.
39
40 Each issue can have attached tags. For keeping their set in consistent
41 well-defined state, the tags/ directory above the issues/ contains
42 available tags for your projects.
43
44     $ for tag in status:open status:done assignee:alice assignee:bob
45         doc db test:integration severity:high severity:low ... ; do
46             touch tags/$tag
47     done
48
49 It is your choice how to name and deal with them. Want to find all
50 issues in done state? for i (issues/**/tags/status:done) print $i:h:h.
51 This kind of information are all just enumerations.
52
53 The deps/ subdirectory in each issue can contain symbolic links to
54 another issues, referencing it. Create another kind of links between
55 them as you wish.
56
57 Want to search among the issues? Just use git grep, or ordinary grep!
58 Want to search through attached PDFs or other kind of documents? You are
59 free to index issues/ directory with something like recoll. Want to see
60 the whole history of changes related to specific issues? Just run
61 git log issues/issue-name! You can add a tag by simply touching
62 issues/issues-name/tags/tag, but "tag-add" included in schwabrak creates
63 symbolic links to tags/tag and checks if the tag is known beforehand,
64 to keep the tags set consistent. Want to remove a tag? (git) rm
65 issues/issues-name/tags/tag!
66
67 The "comment" issue's file is intended to keep the last comment related to
68 the issue. By committing it you automatically accompany it with your
69 (commit's author) name and the time it was added.
70
71     $ cat > issues/issues-name/comment <<EOF
72     Here are my thoughts:
73     * bla bla bla
74     EOF
75     $ git commit issues/issues-name/comment
76
77 And you can view all comments/authors history later just with:
78
79     $ git log -p issues/issues-name/comment
80
81 Or by using "comment-list" command included in that distribution.
82 And of course you can add additional files with each commit.
83
84 schwabrak includes a bunch of utilities to slightly ease dealing with
85 all of that data. Personally I "hash -d" schwabrak's directory to be
86 able to quickly call commands from it:
87
88     $ hash -d s=~/work/schwabrak
89     $ cd my/issues
90     $ ~s/add proj/issue name to create
91
92 To ease the creation of the new issue's directory structure, you can
93 use "add" command as seen above. And yes, it is intended that
94 "proj/issue" and "name", "to", "create" can be passed as separate
95 arguments, but proj/issue-name-to-create will be created as expected.
96
97 All utilities strip off possible "issues/" prefix from the issues
98 name, so you can easily complete issue names with something like fzf.
99 "cd" utility exactly runs fzf to show you available issues, outputting
100 path to selected one.
101
102 "list" lists all issues in tab separated format, sorting by descending
103 creation date and showing their tags. Optional arguments acts like a
104 filter for the issue's tags.
105
106     $ ~s/list open stargrave !hidden
107
108 That will list all issues with the tags including "status:open" AND
109 "assignee:stargrave", AND excluding issues with the tags containing
110 "hidden". Each argument is an expression each issue's tag is compared to
111 (zsh'es "=~" test). Tag with "!"-prefix means that no tag should be in
112 issue's set.
113
114 "tag-list issue" prints issue's tags if any.
115 "tag-add issue [tags/]tag" adds a tag, as was noticed before.
116 "dep-add issue-dst issue-src" will link issue-src in issues-dst's deps/.
117 "show issue" shows most of issue's information in human friendly way.
118 "comment" allows you to conveniently add comment.
119
120 comment-list, recfile-export and recfile-export-all produces
121 recutils'es compatible recfile output, which is machine friendlier.