hledger/hledger-lib/Hledger
Simon Michael b1f3880c3d lib: drop the file format auto-detection feature
For a long time hledger has auto-detected the file format when it's
not known, eg when reading from a file with unusual extension (like
.dat or .txt), or from standard input (-f-), or when using the include
directive (which currently ignores file extensions).

Auto-detecting has been done by trying all readers until one succeeds.
This could guess wrong in some cases, but it was so rare that it has
been working fine.

Recently, more conveniences have been added to timedot format,
increasing its overlap with journal format, which makes this kind of
auto-detection unreliable.

Auto-detection and auto-detection failures are (probably) still pretty
rare in practice. But when it does happen it's confusing, giving
misleading errors or false successes (eg printing timedot entries
instead of a journal error).

For predictability and to minimise confusion, hledger no longer tries
to guess; when there's no file extension or reader prefix, it assumes
journal format. To specify one of the other formats, you must use a
standard file extension (.timeclock, .timedot, .csv, .ssv, .tsv), or a
reader prefix (-f csv:foo.txt, -f timedot:-).

For now, the include directive still tries to autodetect
(journal/timeclock/timedot), and this can't be overridden; it will be
fixed later.

Experimental; testing and feedback welcome.
2020-03-01 14:06:29 -08:00
..
Data ;lib: add YYYY.MM.DD to parsedate/parsedateM helpers 2020-02-27 10:57:55 -08:00
Read timedot: rewrite the parser, making it more usable 2020-03-01 14:06:29 -08:00
Reports bs,cf,is,bal,print,reg: support json output format 2020-02-24 17:49:53 -08:00
Utils ;lib: comments 2020-03-01 14:06:29 -08:00
Data.hs move JSON instances from hledger-web to hledger-lib 2019-12-16 17:17:00 -08:00
Query.hs ;lib: couple of doctests 2020-02-03 10:10:32 -08:00
Read.hs lib: drop the file format auto-detection feature 2020-03-01 14:06:29 -08:00
Reports.hs ;lib: rename MultiBalanceReports.hs -> MultiBalanceReport.hs 2019-06-14 11:45:25 -07:00
Utils.hs web: edit/upload: normalise line endings, avoiding parse errors (#1194) 2020-02-24 14:04:44 -08:00