rename data/ to examples/

This commit is contained in:
Simon Michael 2017-01-08 05:20:04 -08:00
parent 20651ec426
commit 3ae8712bbc
31 changed files with 124 additions and 124 deletions

View File

@ -49,7 +49,7 @@ help2: \
export LANG?=en_US.UTF-8 export LANG?=en_US.UTF-8
# command to run during profiling (time and heap) # command to run during profiling (time and heap)
PROFCMD=stack exec -- hledgerprof balance -f data/10000x1000x10.journal >/dev/null PROFCMD=stack exec -- hledgerprof balance -f examples/10000x1000x10.journal >/dev/null
#PROFRTSFLAGS=-p #PROFRTSFLAGS=-p
PROFRTSFLAGS=-P PROFRTSFLAGS=-P
@ -722,7 +722,7 @@ quickbench: samplejournals bench.sh \
quickprof-%: hledgerprof samplejournals \ quickprof-%: hledgerprof samplejournals \
$(call def-help,quickprof-"CMD", run some command against a sample journal and display the execution profile ) $(call def-help,quickprof-"CMD", run some command against a sample journal and display the execution profile )
$(STACK) exec -- hledgerprof +RTS $(PROFRTSFLAGS) -RTS $* -f data/10000x1000x10.journal >/dev/null $(STACK) exec -- hledgerprof +RTS $(PROFRTSFLAGS) -RTS $* -f examples/10000x1000x10.journal >/dev/null
profiteur hledgerprof.prof profiteur hledgerprof.prof
@echo @echo
@head -20 hledgerprof.prof @head -20 hledgerprof.prof
@ -748,7 +748,7 @@ quickprof-%: hledgerprof samplejournals \
quickheap-%: hledgerprof samplejournals \ quickheap-%: hledgerprof samplejournals \
$(call def-help,quickheap-"CMD", run some command against a sample journal and display the heap profile ) $(call def-help,quickheap-"CMD", run some command against a sample journal and display the heap profile )
$(STACK) exec -- hledgerprof +RTS -hc -RTS $* -f data/10000x1000x10.journal >/dev/null $(STACK) exec -- hledgerprof +RTS -hc -RTS $* -f examples/10000x1000x10.journal >/dev/null
hp2ps hledgerprof.hp hp2ps hledgerprof.hp
@echo generated hledgerprof.ps @echo generated hledgerprof.ps
$(VIEWPS) hledgerprof.ps $(VIEWPS) hledgerprof.ps
@ -812,50 +812,50 @@ ghcid-lib-doctest:
ghcid --command 'cd hledger-lib; $(STACK) ghci hledger-lib:test:doctests' --test ':main' --reload hledger-lib ghcid --command 'cd hledger-lib; $(STACK) ghci hledger-lib:test:doctests' --test ':main' --reload hledger-lib
samplejournals: \ samplejournals: \
data/sample.journal \ examples/sample.journal \
data/100x100x10.journal \ examples/100x100x10.journal \
data/1000x1000x10.journal \ examples/1000x1000x10.journal \
data/1000x10000x10.journal \ examples/1000x10000x10.journal \
data/10000x1000x10.journal \ examples/10000x1000x10.journal \
data/10000x10000x10.journal \ examples/10000x10000x10.journal \
data/100000x1000x10.journal \ examples/100000x1000x10.journal \
data/1000000x1000x10.journal \ examples/1000000x1000x10.journal \
data/ascii.journal \ examples/ascii.journal \
data/chinese.journal \ examples/chinese.journal \
data/mixed.journal \ examples/mixed.journal \
$(call def-help,samplejournals, regenerate standard sample journals in data/ ) $(call def-help,samplejournals, regenerate standard sample journals in examples/ )
data/sample.journal: examples/sample.journal:
true # XXX should probably regenerate this true # XXX should probably regenerate this
data/100x100x10.journal: tools/generatejournal examples/100x100x10.journal: tools/generatejournal
tools/generatejournal 100 100 10 >$@ tools/generatejournal 100 100 10 >$@
data/1000x1000x10.journal: tools/generatejournal examples/1000x1000x10.journal: tools/generatejournal
tools/generatejournal 1000 1000 10 >$@ tools/generatejournal 1000 1000 10 >$@
data/1000x10000x10.journal: tools/generatejournal examples/1000x10000x10.journal: tools/generatejournal
tools/generatejournal 1000 10000 10 >$@ tools/generatejournal 1000 10000 10 >$@
data/10000x1000x10.journal: tools/generatejournal examples/10000x1000x10.journal: tools/generatejournal
tools/generatejournal 10000 1000 10 >$@ tools/generatejournal 10000 1000 10 >$@
data/10000x10000x10.journal: tools/generatejournal examples/10000x10000x10.journal: tools/generatejournal
tools/generatejournal 10000 10000 10 >$@ tools/generatejournal 10000 10000 10 >$@
data/100000x1000x10.journal: tools/generatejournal examples/100000x1000x10.journal: tools/generatejournal
tools/generatejournal 100000 1000 10 >$@ tools/generatejournal 100000 1000 10 >$@
data/1000000x1000x10.journal: tools/generatejournal examples/1000000x1000x10.journal: tools/generatejournal
tools/generatejournal 1000000 1000 10 >$@ tools/generatejournal 1000000 1000 10 >$@
data/ascii.journal: tools/generatejournal examples/ascii.journal: tools/generatejournal
tools/generatejournal 3 5 5 >$@ tools/generatejournal 3 5 5 >$@
data/chinese.journal: tools/generatejournal examples/chinese.journal: tools/generatejournal
tools/generatejournal 3 5 5 --chinese >$@ tools/generatejournal 3 5 5 --chinese >$@
data/mixed.journal: tools/generatejournal examples/mixed.journal: tools/generatejournal
tools/generatejournal 3 5 5 --mixed >$@ tools/generatejournal 3 5 5 --mixed >$@
############################################################################### ###############################################################################

6
dev.hs
View File

@ -33,10 +33,10 @@ import Hledger
-- instance NFData Regex -- instance NFData Regex
journal = journal =
-- "data/10000x1000x10.journal" -- "examples/10000x1000x10.journal"
"data/10000x1000x10.journal" "examples/10000x1000x10.journal"
timeclock = "data/sample.timeclock" timeclock = "examples/sample.timeclock"
timeit :: String -> IO a -> IO (Double, a) timeit :: String -> IO a -> IO (Double, a)
timeit name action = do timeit name action = do

View File

@ -889,7 +889,7 @@ abspat pat = if isnegativepat pat then drop (length negateprefix) pat else pat
-- tests -- tests
-- A sample journal for testing, similar to data/sample.journal: -- A sample journal for testing, similar to examples/sample.journal:
-- --
-- 2008/01/01 income -- 2008/01/01 income
-- assets:bank:checking $1 -- assets:bank:checking $1

View File

@ -52,7 +52,7 @@ $ hledger -f t.timeclock print
``` ```
Here is a Here is a
[sample.timeclock](https://raw.github.com/simonmichael/hledger/master/data/sample.timeclock) to [sample.timeclock](https://raw.github.com/simonmichael/hledger/master/examples/sample.timeclock) to
download and some queries to try: download and some queries to try:
```shell ```shell

View File

@ -110,7 +110,7 @@ $ hledger -f t.timedot --alias /\\./=: bal date:2016/2/4
``` ```
Here is a Here is a
[sample.timedot](https://raw.github.com/simonmichael/hledger/master/data/sample.timedot). [sample.timedot](https://raw.github.com/simonmichael/hledger/master/examples/sample.timedot).
<!-- to download and some queries to try: --> <!-- to download and some queries to try: -->
<!-- ```shell --> <!-- ```shell -->

View File

@ -13,7 +13,7 @@ With no report interval (@--monthly@ etc.), hledger's balance
command emulates ledger's, showing accounts indented according to command emulates ledger's, showing accounts indented according to
hierarchy, along with their total amount posted (including subaccounts). hierarchy, along with their total amount posted (including subaccounts).
Here's an example. With @data/sample.journal@, which defines the following account tree: Here's an example. With @examples/sample.journal@, which defines the following account tree:
@ @
assets assets

View File

@ -19,7 +19,7 @@ You can use the command line:
or ghci: or ghci:
> $ ghci hledger > $ ghci hledger
> > j <- readJournalFile Nothing Nothing "data/sample.journal" > > j <- readJournalFile Nothing Nothing "examples/sample.journal"
> > register [] ["income","expenses"] j > > register [] ["income","expenses"] j
> 2008/01/01 income income:salary $-1 $-1 > 2008/01/01 income income:salary $-1 $-1
> 2008/06/01 gift income:gifts $-1 $-2 > 2008/06/01 gift income:gifts $-1 $-2

View File

@ -139,7 +139,7 @@ Example (see the [tutorial](step-by-step.html#record-a-transaction-with-hledger-
_shell_({{ _shell_({{
$ hledger add $ hledger add
Adding transactions to journal file /src/hledger/data/sample.journal Adding transactions to journal file /src/hledger/examples/sample.journal
Any command line arguments will be used as defaults. Any command line arguments will be used as defaults.
Use tab key to complete, readline keys to edit, enter to accept defaults. Use tab key to complete, readline keys to edit, enter to accept defaults.
An optional (CODE) may follow transaction dates. An optional (CODE) may follow transaction dates.
@ -511,7 +511,7 @@ Show some journal statistics.
```shell ```shell
$ hledger stats $ hledger stats
Main journal file : /src/hledger/data/sample.journal Main journal file : /src/hledger/examples/sample.journal
Included journal files : Included journal files :
Transactions span : 2008-01-01 to 2009-01-01 (366 days) Transactions span : 2008-01-01 to 2009-01-01 (366 days)
Last transaction : 2008-12-31 (2333 days ago) Last transaction : 2008-12-31 (2333 days ago)

View File

@ -1128,7 +1128,7 @@ Example (see the tutorial for a detailed explanation):
.nf .nf
\f[C] \f[C]
$\ hledger\ add $\ hledger\ add
Adding\ transactions\ to\ journal\ file\ /src/hledger/data/sample.journal Adding\ transactions\ to\ journal\ file\ /src/hledger/examples/sample.journal
Any\ command\ line\ arguments\ will\ be\ used\ as\ defaults. Any\ command\ line\ arguments\ will\ be\ used\ as\ defaults.
Use\ tab\ key\ to\ complete,\ readline\ keys\ to\ edit,\ enter\ to\ accept\ defaults. Use\ tab\ key\ to\ complete,\ readline\ keys\ to\ edit,\ enter\ to\ accept\ defaults.
An\ optional\ (CODE)\ may\ follow\ transaction\ dates. An\ optional\ (CODE)\ may\ follow\ transaction\ dates.
@ -2030,7 +2030,7 @@ A file extension matching one of the above formats selects that format.
.nf .nf
\f[C] \f[C]
$\ hledger\ stats $\ hledger\ stats
Main\ journal\ file\ \ \ \ \ \ \ \ :\ /src/hledger/data/sample.journal Main\ journal\ file\ \ \ \ \ \ \ \ :\ /src/hledger/examples/sample.journal
Included\ journal\ files\ \ \ :\ Included\ journal\ files\ \ \ :\
Transactions\ span\ \ \ \ \ \ \ \ :\ 2008\-01\-01\ to\ 2009\-01\-01\ (366\ days) Transactions\ span\ \ \ \ \ \ \ \ :\ 2008\-01\-01\ to\ 2009\-01\-01\ (366\ days)
Last\ transaction\ \ \ \ \ \ \ \ \ :\ 2008\-12\-31\ (2333\ days\ ago) Last\ transaction\ \ \ \ \ \ \ \ \ :\ 2008\-12\-31\ (2333\ days\ ago)

View File

@ -853,7 +853,7 @@ or press control-d or control-c to exit.
$ hledger add $ hledger add
Adding transactions to journal file /src/hledger/data/sample.journal Adding transactions to journal file /src/hledger/examples/sample.journal
Any command line arguments will be used as defaults. Any command line arguments will be used as defaults.
Use tab key to complete, readline keys to edit, enter to accept defaults. Use tab key to complete, readline keys to edit, enter to accept defaults.
An optional (CODE) may follow transaction dates. An optional (CODE) may follow transaction dates.
@ -1672,7 +1672,7 @@ Show some journal statistics.
$ hledger stats $ hledger stats
Main journal file : /src/hledger/data/sample.journal Main journal file : /src/hledger/examples/sample.journal
Included journal files : Included journal files :
Transactions span : 2008-01-01 to 2009-01-01 (366 days) Transactions span : 2008-01-01 to 2009-01-01 (366 days)
Last transaction : 2008-12-31 (2333 days ago) Last transaction : 2008-12-31 (2333 days ago)
@ -2259,71 +2259,71 @@ Node: activity24597
Ref: #activity24709 Ref: #activity24709
Node: add25068 Node: add25068
Ref: #add25169 Ref: #add25169
Node: balance27828 Node: balance27832
Ref: #balance27941 Ref: #balance27945
Node: Flat mode30954 Node: Flat mode30958
Ref: #flat-mode31081 Ref: #flat-mode31085
Node: Depth limited balance reports31500 Node: Depth limited balance reports31504
Ref: #depth-limited-balance-reports31703 Ref: #depth-limited-balance-reports31707
Node: Multicolumn balance reports32124 Node: Multicolumn balance reports32128
Ref: #multicolumn-balance-reports32326 Ref: #multicolumn-balance-reports32330
Node: Market value36975 Node: Market value36979
Ref: #market-value37139 Ref: #market-value37143
Node: Custom balance output38440 Node: Custom balance output38444
Ref: #custom-balance-output38613 Ref: #custom-balance-output38617
Node: Output destination40717 Node: Output destination40721
Ref: #output-destination40882 Ref: #output-destination40886
Node: CSV output41152 Node: CSV output41156
Ref: #csv-output41271 Ref: #csv-output41275
Node: balancesheet41668 Node: balancesheet41672
Ref: #balancesheet41796 Ref: #balancesheet41800
Node: cashflow42448 Node: cashflow42452
Ref: #cashflow42565 Ref: #cashflow42569
Node: help43255 Node: help43259
Ref: #help43367 Ref: #help43371
Node: incomestatement44204 Node: incomestatement44208
Ref: #incomestatement44334 Ref: #incomestatement44338
Node: info45061 Node: info45065
Ref: #info45168 Ref: #info45172
Node: man45530 Node: man45534
Ref: #man45627 Ref: #man45631
Node: print46030 Node: print46034
Ref: #print46135 Ref: #print46139
Node: register47481 Node: register47485
Ref: #register47594 Ref: #register47598
Node: Custom register output52086 Node: Custom register output52090
Ref: #custom-register-output52217 Ref: #custom-register-output52221
Node: stats53514 Node: stats53518
Ref: #stats53620 Ref: #stats53624
Node: test54496 Node: test54504
Ref: #test54583 Ref: #test54591
Node: ADD-ON COMMANDS54950 Node: ADD-ON COMMANDS54958
Ref: #add-on-commands55086 Ref: #add-on-commands55094
Node: api56374 Node: api56382
Ref: #api56466 Ref: #api56474
Node: autosync56500 Node: autosync56508
Ref: #autosync56615 Ref: #autosync56623
Node: diff58930 Node: diff58938
Ref: #diff59040 Ref: #diff59048
Node: equity59704 Node: equity59712
Ref: #equity59818 Ref: #equity59826
Node: interest61146 Node: interest61154
Ref: #interest61263 Ref: #interest61271
Node: irr64347 Node: irr64355
Ref: #irr64460 Ref: #irr64468
Node: print-unique66835 Node: print-unique66843
Ref: #print-unique66965 Ref: #print-unique66973
Node: rewrite67223 Node: rewrite67231
Ref: #rewrite67342 Ref: #rewrite67350
Node: ui67871 Node: ui67879
Ref: #ui67971 Ref: #ui67979
Node: web68012 Node: web68020
Ref: #web68100 Ref: #web68108
Node: TROUBLESHOOTING68133 Node: TROUBLESHOOTING68141
Ref: #troubleshooting68252 Ref: #troubleshooting68260
Node: Run-time problems68306 Node: Run-time problems68314
Ref: #run-time-problems68449 Ref: #run-time-problems68457
Node: Known limitations70393 Node: Known limitations70401
Ref: #known-limitations70536 Ref: #known-limitations70544
 
End Tag Table End Tag Table

View File

@ -746,7 +746,7 @@ COMMANDS
Example (see the tutorial for a detailed explanation): Example (see the tutorial for a detailed explanation):
$ hledger add $ hledger add
Adding transactions to journal file /src/hledger/data/sample.journal Adding transactions to journal file /src/hledger/examples/sample.journal
Any command line arguments will be used as defaults. Any command line arguments will be used as defaults.
Use tab key to complete, readline keys to edit, enter to accept defaults. Use tab key to complete, readline keys to edit, enter to accept defaults.
An optional (CODE) may follow transaction dates. An optional (CODE) may follow transaction dates.
@ -1419,7 +1419,7 @@ COMMANDS
above formats selects that format. above formats selects that format.
$ hledger stats $ hledger stats
Main journal file : /src/hledger/data/sample.journal Main journal file : /src/hledger/examples/sample.journal
Included journal files : Included journal files :
Transactions span : 2008-01-01 to 2009-01-01 (366 days) Transactions span : 2008-01-01 to 2009-01-01 (366 days)
Last transaction : 2008-12-31 (2333 days ago) Last transaction : 2008-12-31 (2333 days ago)

View File

@ -525,7 +525,7 @@ Finally, for quick, fine-grained performance measurements when troubleshooting o
### Generate sample journal files ### Generate sample journal files
Synthetic data files like `data/100x100x10.journal` are useful for benchmarks and testing. Synthetic data files like `examples/100x100x10.journal` are useful for benchmarks and testing.
The numbers describe the number of transactions, number of accounts, and maximum account depth respectively. The numbers describe the number of transactions, number of accounts, and maximum account depth respectively.
They are generated by [`tools/generatejournal.hs`](https://github.com/simonmichael/hledger/blob/master/tools/generatejournal.hs). They are generated by [`tools/generatejournal.hs`](https://github.com/simonmichael/hledger/blob/master/tools/generatejournal.hs).
They should be built as needed, if not you can use `make samplejournals` rule: They should be built as needed, if not you can use `make samplejournals` rule:
@ -535,15 +535,15 @@ $ make samplejournals
ghc tools/generatejournal.hs ghc tools/generatejournal.hs
[1 of 1] Compiling Main ( tools/generatejournal.hs, tools/generatejournal.o ) [1 of 1] Compiling Main ( tools/generatejournal.hs, tools/generatejournal.o )
Linking tools/generatejournal ... Linking tools/generatejournal ...
tools/generatejournal 100 100 10 >data/100x100x10.journal tools/generatejournal 100 100 10 >examples/100x100x10.journal
tools/generatejournal 1000 1000 10 >data/1000x1000x10.journal tools/generatejournal 1000 1000 10 >examples/1000x1000x10.journal
tools/generatejournal 1000 10000 10 >data/1000x10000x10.journal tools/generatejournal 1000 10000 10 >examples/1000x10000x10.journal
tools/generatejournal 10000 1000 10 >data/10000x1000x10.journal tools/generatejournal 10000 1000 10 >examples/10000x1000x10.journal
tools/generatejournal 10000 10000 10 >data/10000x10000x10.journal tools/generatejournal 10000 10000 10 >examples/10000x10000x10.journal
tools/generatejournal 100000 1000 10 >data/100000x1000x10.journal tools/generatejournal 100000 1000 10 >examples/100000x1000x10.journal
tools/generatejournal 3 5 5 >data/ascii.journal tools/generatejournal 3 5 5 >examples/ascii.journal
tools/generatejournal 3 5 5 --chinese >data/chinese.journal tools/generatejournal 3 5 5 --chinese >examples/chinese.journal
tools/generatejournal 3 5 5 --mixed >data/mixed.journal tools/generatejournal 3 5 5 --mixed >examples/mixed.journal
``` ```
### Run tests ### Run tests

View File

@ -1 +1 @@
../../data/balance-multicol.journal ../../examples/balance-multicol.journal

View File

@ -1 +1 @@
../../data/sample.journal ../../examples/sample.journal

View File

@ -1 +1 @@
../../data/alias.journal ../../examples/alias.journal

View File

@ -1 +1 @@
../../data/business.journal ../../examples/business.journal

View File

@ -1 +1 @@
../../data/personal.journal ../../examples/personal.journal

View File

@ -1 +1 @@
../../data/chinese.journal ../../examples/chinese.journal