James K. Lowden wrote:
> I recently wrote a utility to produce simple reports.
>
> https://github.com/jklowden/sqlrpt
>
> Numeric columns are aligned on the decimal point and formatted
> with the thousands separator consistent with the locale.
>
> Wide text columns are formatted to fit nicely on the page.
James ....
I installed your sqlrpt program under debian linux
and managed to successfully run it with an sql query
from a file ....
$ sqlrpt -d ../db/test.sql3 -q "`cat stocks_list.sql`" > stocks.out
and display the output via the man command ....
$ man ./stocks.out
┌───────────────────────────────────────────────────────────────────────────────┐
│date trans name qty price amount
│
├───────────────────────────────────────────────────────────────────────────────┤
│2011‐06‐04 BUY Bank of America 30.000000 11.280000 338.400000
│
│2011‐06‐04 BUY Citigroup 500.000000 39.850000 19,925.000000
│
│2011‐06‐04 BUY Ford Motor 300.000000 14.010000 4,203.000000
│
│2011‐06‐04 BUY General Electric 100.000000 18.820000 1,882.000000
│
│2011‐06‐04 BUY Jp Morgan Chase 500.000000 41.570000 20,785.000000
│
│2011‐06‐04 BUY Nokia 50.000000 6.660000 333.000000
│
│2011‐06‐04 BUY Pfizer 100.000000 20.840000 2,084.000000
│
│2006‐01‐05 BUY Red Hat 100.000000 35.130000 3,513.000000
│
│2011‐06‐04 BUY Sprint Nextel 200.000000 5.670000 1,134.000000
│
│2011‐06‐04 BUY Wells Fargo 300.000000 26.860000 8,058.000000
│
└───────────────────────────────────────────────────────────────────────────────┘
The question is ....
Can the floating point numbers be formatted
for example .... ah la .... %8.4f
I have seen the width option under the format column specifiers
in man tbl but haven't tried using it with the sqlrpt -f option ....
--
Stanley C. Kitching
Human Being
Phoenix, Arizona
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users