imp: demo: split print / balance demos

This commit is contained in:
Simon Michael 2023-03-16 23:18:01 -10:00
parent 6777182c70
commit 98865d6025
3 changed files with 47 additions and 68 deletions

View File

@ -35,9 +35,10 @@ data Demo = Demo {
demos :: [Demo]
demos = map readDemo [
$(embedFileRelative "embeddedfiles/install.cast" )
,$(embedFileRelative "embeddedfiles/add.cast" )
,$(embedFileRelative "embeddedfiles/reports.cast" )
$(embedFileRelative "embeddedfiles/install.cast")
,$(embedFileRelative "embeddedfiles/add.cast")
,$(embedFileRelative "embeddedfiles/print.cast")
,$(embedFileRelative "embeddedfiles/balance.cast")
]
-- | Command line options for this command.
@ -91,9 +92,9 @@ findDemo ds s =
sl = lowercase s
printDemos :: IO ()
printDemos = putStrLn $ unlines $
printDemos = putStr $ unlines $
"Demos:" :
"" :
-- "" :
[show i <> ") " <> t | (i, Demo t _) <- zip [(1::Int)..] demos]
-- | Run asciinema play, passing content to its stdin.

View File

@ -1,67 +1,5 @@
{"version": 2, "width": 80, "height": 25, "timestamp": 1678904454, "idle_time_limit": 0.5, "env": {"SHELL": "/opt/homebrew/bin/bash", "TERM": "xterm-256color"}, "title": "Simple reports (print, balance)"}
[92.851861, "o", "\u001b[?2004h~$ "]
[93.218891, "o", "c"]
[93.397969, "o", "a"]
[93.545225, "o", "t"]
[93.677595, "o", " "]
[93.891204, "o", "."]
[94.181562, "o", "h"]
[94.223614, "o", "l"]
[94.309628, "o", "e"]
[94.451716, "o", "d"]
[94.549868, "o", "g"]
[94.684816, "o", "e"]
[94.792859, "o", "r"]
[94.855242, "o", "."]
[95.054234, "o", "j"]
[95.201191, "o", "o"]
[95.260721, "o", "u"]
[95.404053, "o", "r"]
[95.529899, "o", "n"]
[95.655928, "o", "a"]
[95.768796, "o", "l"]
[97.848002, "o", "\r\n\u001b[?2004l\r"]
[97.85161, "o", "; journal created 2023-03-15 by hledger\r\n\r\n2023-03-15 opening balances\r\n cash $50.25\r\n equity $-50.25\r\n"]
{"version": 2, "width": 80, "height": 25, "timestamp": 1678904454, "idle_time_limit": 0.5, "env": {"SHELL": "/opt/homebrew/bin/bash", "TERM": "xterm-256color"}, "title": "Showing account balances (balance)"}
[97.851861, "o", "\u001b[?2004h~$ "]
[99.846929, "o", "h"]
[99.937799, "o", "l"]
[100.053606, "o", "e"]
[100.200706, "o", "d"]
[100.294199, "o", "g"]
[100.442973, "o", "e"]
[100.539811, "o", "r"]
[100.67039, "o", " "]
[100.863265, "o", "p"]
[101.011799, "o", "r"]
[101.106802, "o", "i"]
[101.159327, "o", "n"]
[101.248174, "o", "t"]
[101.70797, "o", " "]
[101.896357, "o", " "]
[102.07318, "o", " "]
[102.261496, "o", "#"]
[102.529299, "o", " "]
[102.975838, "o", "s"]
[103.097044, "o", "h"]
[103.157234, "o", "o"]
[103.241647, "o", "w"]
[103.371897, "o", " "]
[104.520774, "o", "t"]
[104.586339, "o", "r"]
[104.675919, "o", "a"]
[104.793261, "o", "n"]
[104.894559, "o", "s"]
[104.97797, "o", "a"]
[105.074301, "o", "c"]
[105.278951, "o", "t"]
[105.371914, "o", "i"]
[105.402599, "o", "o"]
[105.467888, "o", "n"]
[105.52808, "o", "s"]
[106.697984, "o", "\r\n"]
[106.698066, "o", "\u001b[?2004l\r"]
[106.877241, "o", "2023-03-15 opening balances\r\n cash $50.25\r\n equity $-50.25\r\n\r\n"]
[106.886187, "o", "\u001b[?2004h~$ "]
[108.4427, "o", "h"]
[108.511571, "o", "l"]
[108.563283, "o", "e"]

View File

@ -0,0 +1,40 @@
{"version": 2, "width": 80, "height": 25, "timestamp": 1678904454, "idle_time_limit": 0.5, "env": {"SHELL": "/opt/homebrew/bin/bash", "TERM": "xterm-256color"}, "title": "Showing journal entries (print)"}
[97.851861, "o", "\u001b[?2004h~$ "]
[99.846929, "o", "h"]
[99.937799, "o", "l"]
[100.053606, "o", "e"]
[100.200706, "o", "d"]
[100.294199, "o", "g"]
[100.442973, "o", "e"]
[100.539811, "o", "r"]
[100.67039, "o", " "]
[100.863265, "o", "p"]
[101.011799, "o", "r"]
[101.106802, "o", "i"]
[101.159327, "o", "n"]
[101.248174, "o", "t"]
[101.70797, "o", " "]
[101.896357, "o", " "]
[102.07318, "o", " "]
[102.261496, "o", "#"]
[102.529299, "o", " "]
[102.975838, "o", "s"]
[103.097044, "o", "h"]
[103.157234, "o", "o"]
[103.241647, "o", "w"]
[103.371897, "o", " "]
[104.520774, "o", "t"]
[104.586339, "o", "r"]
[104.675919, "o", "a"]
[104.793261, "o", "n"]
[104.894559, "o", "s"]
[104.97797, "o", "a"]
[105.074301, "o", "c"]
[105.278951, "o", "t"]
[105.371914, "o", "i"]
[105.402599, "o", "o"]
[105.467888, "o", "n"]
[105.52808, "o", "s"]
[106.697984, "o", "\r\n"]
[106.698066, "o", "\u001b[?2004l\r"]
[106.877241, "o", "2023-03-15 opening balances\r\n cash $50.25\r\n equity $-50.25\r\n\r\n"]