ldgr 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/ldgr/parser.rb +2 -2
- data/lib/ldgr/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b23b462886e541f96879732e48e5e7dadf33747e
|
|
4
|
+
data.tar.gz: 95e359c7dab832ee97cf9603bdb486526ffa280c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0b4d4549ca799a65ca820a39623f19fb4ab830a5836ca885db265a18b3555ebee45c97904c69b671607f6f4587e0f648b377ed96de651e04f5d36169af18df78
|
|
7
|
+
data.tar.gz: 57cb8ccc05ffb83498e9e3527d6a352a5632600002c03787bac3c8eb7ea0ed4fcfab3df021dfb03c7949e3326e781a4b3ce3b561a01b3ebe96bd8bf456dffa9e
|
data/README.md
CHANGED
|
@@ -37,6 +37,8 @@ Or install it yourself as:
|
|
|
37
37
|
|
|
38
38
|
Type `ldgr -h` at the command-line to see available commands and options.
|
|
39
39
|
|
|
40
|
+
The CLI defaults the currency to **$**. You can set this yourself by adding a single currency character to `~/.config/ledger/default_currency`.
|
|
41
|
+
|
|
40
42
|
## CLI
|
|
41
43
|
```sh
|
|
42
44
|
ldgr add --payee Brandon \
|
data/lib/ldgr/parser.rb
CHANGED
|
@@ -9,13 +9,13 @@ require 'fileutils'
|
|
|
9
9
|
|
|
10
10
|
module Ldgr
|
|
11
11
|
class Parser
|
|
12
|
-
DEFAULT_CURRENCY = '¥'
|
|
13
12
|
FILEBASE = Dir.home + '/.config/ledger/'
|
|
14
13
|
FILE = FILEBASE + 'transactions.dat'
|
|
15
|
-
VERSION = Ldgr::VERSION
|
|
14
|
+
VERSION = Ldgr::VERSION # ~> NameError: uninitialized constant Ldgr::VERSION
|
|
16
15
|
PROGRAM_NAME = 'ldgr'
|
|
17
16
|
MATCH = /(?=(\n\d\d\d\d-\d\d-\d\d)(=\d\d\d\d-\d\d-\d\d)*)|\z/
|
|
18
17
|
OTHER_MATCH = /(?=(\d\d\d\d-\d\d-\d\d)(=\d\d\d\d-\d\d-\d\d)*)/
|
|
18
|
+
DEFAULT_CURRENCY = Pathname(FILEBASE + '/default_currency').exist? ? Pathname(FILEBASE + '/default_currency').read.chomp : '$'
|
|
19
19
|
|
|
20
20
|
def self.parse
|
|
21
21
|
cli = OptionParser.new do |o|
|
data/lib/ldgr/version.rb
CHANGED