-
Notifications
You must be signed in to change notification settings - Fork 12
/
ames.1
155 lines (132 loc) · 4.11 KB
/
ames.1
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
.TH AMES 1 2022-08 "" "ames User Manual"
.SH NAME
ames \- Anki media extractor script
.SH SYNOPSIS
.B ames
[\fIOPTIONS\fP]
.SH DESCRIPTION
.PP
Update Anki cards with desktop audio,
screenshots, and clipboard text on GNU/Linux.
\fBames\fP automates the process of adding information
and media to your last (latest created) Anki card,
making immersion mining smoother and more efficient.
.SH OPTIONS
.TP
.B -r
Begin recording desktop audio.
If called while already recording audio,
then stop and export the recorded audio.
.TP
.B -s
Prompt for an interactive screenshot selection.
.TP
.B -a
Export the previous screenshot selection.
If there is no previous selection, fallback to \fB-s\fP.
.TP
.B -w
Screenshot the currently active window.
.TP
.B -c
Export copied text (contents of the CLIPBOARD selection).
.SH CONFIGURATION
.PP
There are two ways to configure \fBames\fP.
The first is by editing the executable itself, available at
\fI/usr/bin/ames\fP, which is a script written in \fBbash\fP(1).
However, your changes will be lost when \fBames\fP is updated.
.PP
The second is by making a configuration file at \fI~/.config/ames/config\fP.
This file must also be a valid Bash script (so, no spaces around the equal
sign in variable declarations!) and is ran when \fBames\fP is called.
You can find an example configuration file at \fI/usr/share/ames/config\fP.
The following options influence the behavior of \fBames\fP at runtime.
.TP
.B AUDIO_FIELD
Name of the Anki field in which to insert audio recordings.
.I Default: \[dq]audio\[dq]
.TP
.B SCREENSHOT_FIELD
Name of the Anki field in which to insert screenshots.
.I Default: \[dq]image\[dq]
.TP
.B SENTENCE_FIELD
Name of the Anki field in which to insert clipboard text.
.I Default: \[dq]Sentence\[dq]
.TP
.B OUTPUT_MONITOR
Name of the audio monitor to record from.
If this is blank, then automatically attempt to select the correct monitor.
You can find valid sources using \fBpactl\fP(1) with
pactl list | grep -A2 '^Source #'
.I Default: \[dq]\[dq]
.TP
.B AUDIO_BITRATE
Bitrate to encode recorded audio with.
Lower bitrates correspond to smaller file sizes but worse audio quality.
This should be a string that is valid to
supply to \fBffmpeg\fP(1)'s \fB-ab\fP option.
A bitrate of around 20k (bits/s) should be sufficient for speech.
.I Default: \[dq]64k\[dq]
.TP
.B AUDIO_FORMAT
Extension of the audio format to encode recorded audio.
For instance, \[dq]mp3\[dq] or \[dq]ogg\[dq] are also valid.
.I Default: \[dq]opus\[dq]
.TP
.B AUDIO_VOLUME
Modify the volume of recorded audio.
Set to 1 for no modification.
A value of 0.5 will reduce the volume of recorded audio by 50%.
.I Default: \[dq]1\[dq]
.TP
.B MINIMUM_DURATION
The minimum duration to record for, as an integer number of milliseconds.
If the signal to stop occurs before this time is reached,
continue recording until the minimum duration is met.
If the signal to stop occurs after, this option has no effect.
This option does not affect the actual length of the recorded
audio as the recording is trimmed in post-processing;
instead, it is intended to work around ffmpeg's limitations.
.I Default: \[dq]0\[dq]
.TP
.B IMAGE_FORMAT
Extension of the image format to encode screenshots.
.I Default: \[dq]webp\[dq]
.TP
.B IMAGE_WIDTH
Width in pixels to resize images to.
If this is set to -2, then the dimension
is calculated to preserve aspect ratio.
.I Default: \[dq]-2\[dq]
.TP
.B IMAGE_HEIGHT
Height in pixels to resize images to.
If this is set to -2, then the dimension
is calculated to preserve aspect ratio.
.I Default: \[dq]300\[dq]
.SH ENVIRONMENT
.TP
.B LANG
If this is set to any string beginning with
\[dq]en\[dq] then notifications are sent in English.
Currently, the only other language supported is \[dq]ja\[dq] for Japanese.
If your LANG does not match one of the above
languages, then notifications are disabled.
.SH FILES
.TP
.I /usr/bin/ames
Source executable file of this Bash script.
.TP
.I /usr/share/ames/config
Example configuration file.
.TP
.I ~/.config/ames/config
Bash script used to set configuration options at runtime.
.SH REPORTING BUGS
.PP
Development takes place on
.UR \fIhttps://github.com/eshrh/ames\fP
.UE
Contributions are welcome!