blob: 577283e1929eccc6d3dc4fc9884fd6e5f8e0c4b5 (
plain) (
blame)
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
|
# video branch, expect force pushes because of the binary blob and not bloating the repo
A simple script to create a menu driven database for storing little bits of
information. The database is a double colon delimited plain text file
queried with standard unix tools.
This is *NOT* for passwords. Do *NOT* use it for them. See my own
[`dpw`](https://git.riedstra.dev/mitch/dpw/about/) or
[pass](https://www.passwordstore.org/) for a solution there.
Date formatting is a bit of a pain, so there's a `strftime` command line utility
that's bundled, yes `gawk` provides `strftime` but that's not on every system.
Works best with `dmenu` fuzzy finder patch. Utilizes list mode by default.
Menu format can easily be customized by editing the script near the
top of the `pm` shell script.
Database format is fairly simple:
```
ID::Created::Updated::Name::Content
```
It's a menu driven application with no CLI options, users are encouraged to
write programs that directly talk to the database, or extend it to suit their
needs.
## Installation
```
# make install
```
You'll need `dmenu` installed. You may also wish to bind a hotkey to run the new
`pm` command
## Configuration
Environment variables:
`PASTE_MANAGER_FILE` can override the file location
`PASTE_MANAGER_LINES` overrides the number of lines displayed by `dmenu`
`PASTE_MANAGER_X_SELECTION` sets the clipboard selection, you probably want to
leave it set to clipboard, the default.
Edit the source code for further tweaks. The one people may have the most
interest in is the format sent to `dmenu`, that's controlled via the `awk` script
in the `awkPrettyPrint` variable near the top.
## Bugs
Probably. This was written in just a few hours. Email me if you find any, I'll
fix them.
## Not-bugs
Multi line snippets are entirely unsupported.
|