Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.

Commit 7dc742c

Browse files
committed
Document environment variables and command line flags
1 parent f4602e0 commit 7dc742c

File tree

1 file changed

+86
-1
lines changed

1 file changed

+86
-1
lines changed

revbank

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,92 @@ revbank - Prepaid bar tab payment system for hackerspaces
6767
6868
=head1 DESCRIPTION
6969
70-
The main documentation is in C<README.md>.
70+
This document only describes how to run revbank. The main documentation is in
71+
C<README.md>.
72+
73+
=head1 FLAGS
74+
75+
=over 20
76+
77+
=item --command -c
78+
79+
Takes a single command line and executes it without entering the RevBank shell.
80+
The command line is parsed as input on the top-level RevBank prompt. Example:
81+
C<--command 'give quux 0.42 "description here"; xyzzy'>.
82+
83+
=item --with-lock
84+
85+
Takes the remaining command line arguments (use C<--> to stop processing) and
86+
executes them as a system command, which may involve executing a shell; see
87+
"system" in L<perlfunc> for details.
88+
89+
Useful for running external programs (e.g. backup scripts) which need a
90+
consistent/atomic view of the data directory, but will block all RevBank usage
91+
until the program is over.
92+
93+
Example: C<--with-lock -- tar -czf revbank-data.tgz ~/.datadir>
94+
95+
=item --datadir
96+
97+
Overrides C<REVBANK_DATADIR>
98+
99+
=item --plugindir
100+
101+
Overrides C<REVBANK_PLUGINDIR>
102+
103+
=back
104+
105+
=head1 ENVIRONMENT
106+
107+
Some environment variables are boolean. Non-existent variables, empty
108+
variables, and variables equal to C<0> are considered false. All other values
109+
are considered true, but it is customary to just use C<1> (something like
110+
C<yes> could lead someone to believe that C<no> would be false).
111+
112+
=over 20
113+
114+
=item REVBANK_DATADIR
115+
116+
Specifies the data directory, defaults to C<~/.revbank>. Will be created and
117+
populated if it does not already exist.
118+
119+
=item REVBANK_PLUGINDIR
120+
121+
Specifies the directory for plugins that are listed without paths in
122+
C<$REVBANK_DATADIR/plugins>. Defaults to C<plugins> in the directory of the
123+
C<revbank> executable.
124+
125+
=item REVBANK_DEBUG
126+
127+
When true, makes RevBank print more details, like what happens with hidden
128+
accounts. Don't use in production, because those accouns are hidden for a
129+
reason.
130+
131+
=item REVBANK_SKIP_LOCK
132+
133+
When true, disables file locking. Necessary when calling RevBank from a program
134+
that already holds the lock, but otherwise just a bad idea. Use with caution.
135+
136+
=item REVBANK_JSON
137+
138+
Requires the C<json> plugin. Set to C<lines> or C<array> for JSONL or
139+
single-array JSON output, for integrating RevBank in external software. Note
140+
that although the normal output is suppressed, not everything is available as
141+
JSON information, so it's only usable for specific use cases that are deemed
142+
possible.
143+
144+
=item REVBANK_STATIEGELD
145+
146+
Requires the C<statiegeld> plugin. When true, starts RevBank in deposit return
147+
mode, which means that scanned products will be container returns instead of
148+
purchases. See L<< plugins/statiegeld.pod >> for details.
149+
150+
=back
151+
152+
=head1 SEE ALSO
153+
154+
Further documentation is available in L<README.md>, L<INSTALLING.md>,
155+
L<UPGRADING.md>, and all the C<.pod> files in the RevBank repository.
71156
72157
=head1 AUTHOR
73158

0 commit comments

Comments
 (0)