Compare commits
2 Commits
0cdc6bec24
...
multiuser
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46da56d9f8 | ||
|
|
16722eb9bf |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,6 +1,4 @@
|
||||
.env
|
||||
test.txt
|
||||
ledger-quicknote
|
||||
*.txt
|
||||
.htpasswd
|
||||
data
|
||||
|
||||
1
archetypes/.ledgerrc
Normal file
1
archetypes/.ledgerrc
Normal file
@@ -0,0 +1 @@
|
||||
--file ledger.txt
|
||||
13
archetypes/ledger.txt
Normal file
13
archetypes/ledger.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
account assets
|
||||
account liabilities
|
||||
account income
|
||||
account expenses
|
||||
account equity
|
||||
account assets:savings
|
||||
alias savings
|
||||
account assets:checking
|
||||
alias checking
|
||||
account expenses:cash
|
||||
alias cash
|
||||
account expenses:food
|
||||
alias food
|
||||
5
archetypes/queries.txt
Normal file
5
archetypes/queries.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
資產餘額:b assets
|
||||
本月開支:b -b "this month"
|
||||
上月開支:b -b "last month" -e "this month"
|
||||
記錄列表:r
|
||||
過去七天:r -b "last 7 days"
|
||||
@@ -100,7 +100,7 @@ func (u *User) overwriteFile(filename string, tx string) (err error) {
|
||||
func (u *User) query(query string) (result string, err error) {
|
||||
var buf bytes.Buffer
|
||||
|
||||
cmd := exec.Command("ledger", "--file", DEFAULT_JOURNAL)
|
||||
cmd := exec.Command("ledger")
|
||||
cmd.Dir = u.Dir()
|
||||
cmd.Stdin = strings.NewReader(query)
|
||||
cmd.Stdout = &buf
|
||||
|
||||
Reference in New Issue
Block a user