feat: embed some asciinema demos, and a demo command to play them
This commit is contained in:
parent
5ddb6028ed
commit
38fd51b97c
@ -27,6 +27,7 @@ module Hledger.Cli.Commands (
|
||||
,module Hledger.Cli.Commands.Close
|
||||
,module Hledger.Cli.Commands.Codes
|
||||
,module Hledger.Cli.Commands.Commodities
|
||||
,module Hledger.Cli.Commands.Demo
|
||||
,module Hledger.Cli.Commands.Descriptions
|
||||
,module Hledger.Cli.Commands.Diff
|
||||
,module Hledger.Cli.Commands.Help
|
||||
@ -68,6 +69,7 @@ import Hledger.Cli.Commands.Check
|
||||
import Hledger.Cli.Commands.Close
|
||||
import Hledger.Cli.Commands.Codes
|
||||
import Hledger.Cli.Commands.Commodities
|
||||
import Hledger.Cli.Commands.Demo
|
||||
import Hledger.Cli.Commands.Descriptions
|
||||
import Hledger.Cli.Commands.Diff
|
||||
import Hledger.Cli.Commands.Files
|
||||
@ -103,6 +105,7 @@ builtinCommands = [
|
||||
,(closemode , close)
|
||||
,(codesmode , codes)
|
||||
,(commoditiesmode , commodities)
|
||||
,(demomode , demo)
|
||||
,(descriptionsmode , descriptions)
|
||||
,(diffmode , diff)
|
||||
,(filesmode , files)
|
||||
@ -271,6 +274,7 @@ commandsList progversion othercmds highlight0 =
|
||||
," hledger -h show hledger's general help"
|
||||
," hledger COMMAND -h show COMMAND's help"
|
||||
," hledger help [-i|-m|-p] [TOPIC] show the hledger manual with info/man/pager"
|
||||
," hledger demo [NUM|NAME|STR] [ASOPTS] show small demos of hledger"
|
||||
," https://hledger.org html manuals, tutorials, support.."
|
||||
,""
|
||||
]
|
||||
|
||||
104
hledger/Hledger/Cli/Commands/Demo.hs
Normal file
104
hledger/Hledger/Cli/Commands/Demo.hs
Normal file
@ -0,0 +1,104 @@
|
||||
{-|
|
||||
The @demo@ command lists and plays small hledger demos in the terminal, using asciinema.
|
||||
-}
|
||||
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Hledger.Cli.Commands.Demo (
|
||||
demomode
|
||||
,demo
|
||||
) where
|
||||
|
||||
import Hledger
|
||||
import Hledger.Cli.CliOptions
|
||||
import Control.Monad (forM_)
|
||||
import System.Exit (exitSuccess, exitFailure)
|
||||
import Text.Printf
|
||||
import Control.Concurrent (threadDelay)
|
||||
import System.Process (callProcess)
|
||||
import System.IO.Error (catchIOError)
|
||||
import Safe (readMay, atMay, headMay)
|
||||
import Data.List (isPrefixOf, find, isInfixOf)
|
||||
import Data.Char (isDigit)
|
||||
import Control.Applicative ((<|>))
|
||||
import Data.ByteString as B (ByteString)
|
||||
import qualified Data.ByteString.Char8 as B
|
||||
import System.IO.Temp (withSystemTempFile)
|
||||
import System.IO (hClose)
|
||||
|
||||
data Demo = Demo {
|
||||
dfilename :: FilePath, -- file name
|
||||
dtitle :: String, -- asciinema title field, effectively a description
|
||||
_dcontent :: ByteString -- asciinema v2 content
|
||||
}
|
||||
|
||||
demos :: [Demo]
|
||||
demos = map readDemo [
|
||||
("install.cast", $(embedFileRelative "embeddedfiles/install.cast" ))
|
||||
,("add.cast", $(embedFileRelative "embeddedfiles/add.cast" ))
|
||||
,("reports.cast", $(embedFileRelative "embeddedfiles/reports.cast" ))
|
||||
]
|
||||
|
||||
-- | Command line options for this command.
|
||||
demomode = hledgerCommandMode
|
||||
$(embedFileRelative "Hledger/Cli/Commands/Demo.txt")
|
||||
[]
|
||||
[generalflagsgroup3]
|
||||
[]
|
||||
([], Just $ argsFlag "[NUM|NAME|STR] [-- ASCIINEMAOPTS]")
|
||||
|
||||
-- | The demo command.
|
||||
demo :: CliOpts -> Journal -> IO ()
|
||||
demo CliOpts{rawopts_=rawopts, reportspec_=ReportSpec{_rsQuery=_query}} _j = do
|
||||
-- demos <- getCurrentDirectory >>= readDemos
|
||||
let args = listofstringopt "args" rawopts
|
||||
case args of
|
||||
[] -> do
|
||||
forM_ (zip [(1::Int)..] demos) $ \(i, Demo f t _) -> printf "%d) %-15s %s\n" i f t
|
||||
exitSuccess
|
||||
|
||||
(a:as) ->
|
||||
case findDemo demos a of
|
||||
Nothing -> do
|
||||
putStrLn $ a <> " not recognized"
|
||||
putStrLn "Usage: hledger-demo [NUM|NAME|STR], run with no arguments to see a list"
|
||||
exitFailure
|
||||
|
||||
Just (Demo f t c) -> do
|
||||
printf "playing (space to pause, . to step, ctrl-c to quit):\n %-15s %s\n" f t
|
||||
threadDelay 1000000
|
||||
putStr "\n"
|
||||
runAsciinemaPlay c as
|
||||
|
||||
readDemo :: (FilePath, ByteString) -> Demo
|
||||
readDemo (name, content) = Demo name title content
|
||||
where
|
||||
title = maybe "" (readTitle . B.unpack) $ headMay $ B.lines content
|
||||
where
|
||||
readTitle s
|
||||
| "\"title\":" `isPrefixOf` s = takeWhile (/='"') $ drop 1 $ lstrip $ drop 8 s
|
||||
| null s = ""
|
||||
| otherwise = readTitle $ tail s
|
||||
|
||||
findDemo :: [Demo] -> String -> Maybe Demo
|
||||
findDemo ds s
|
||||
| all isDigit s = readMay s >>= atMay ds . subtract 1 -- find by number
|
||||
| otherwise =
|
||||
find ((==sl).lowercase.dfilename) ds -- or by name, ignoring case
|
||||
<|> find ((sl `isInfixOf`).lowercase.dfilename) ds -- or by name substring
|
||||
<|> find ((sl `isInfixOf`).lowercase.dtitle) ds -- or by title substring
|
||||
where
|
||||
sl = lowercase s
|
||||
|
||||
-- | Run asciinema play, passing content to its stdin.
|
||||
runAsciinemaPlay :: ByteString -> [String] -> IO ()
|
||||
runAsciinemaPlay content args =
|
||||
withSystemTempFile "hledger-cast" $ \f h -> do -- try piping to stdin also
|
||||
B.hPutStrLn h content >> hClose h
|
||||
callProcess "asciinema" ("play" : f : args)
|
||||
`catchIOError` \err -> do
|
||||
putStrLn $ "There was a problem. Is asciinema installed ?\n" <> show err -- (or PowerSession on Windows)
|
||||
exitFailure
|
||||
|
||||
26
hledger/Hledger/Cli/Commands/Demo.md
Normal file
26
hledger/Hledger/Cli/Commands/Demo.md
Normal file
@ -0,0 +1,26 @@
|
||||
## demo
|
||||
|
||||
Play small demos of hledger usage in the terminal.
|
||||
|
||||
_FLAGS
|
||||
|
||||
Run this command with no argument to list the demos.
|
||||
To play a demo, write its number or name or a substring.
|
||||
asciinema must be installed.
|
||||
|
||||
During playback, several keys are available:
|
||||
- SPACE pause/unpause
|
||||
- . step forward (while paused)
|
||||
- CTRL-c quit early
|
||||
|
||||
asciinema options can be added following a double-dash;
|
||||
list them with `asciinema -h`. `-s` (speed) and
|
||||
`-i` (max idle time) are particularly useful.
|
||||
|
||||
Examples:
|
||||
```shell
|
||||
$ hledger demo # list available demos
|
||||
$ hledger demo 1 # play the first demo
|
||||
$ hledger demo install -s5 -i.5 # play the demo named or containing "install",
|
||||
# at 5x speed, limiting idle time to 0.5s.
|
||||
```
|
||||
17
hledger/Hledger/Cli/Commands/Demo.txt
Normal file
17
hledger/Hledger/Cli/Commands/Demo.txt
Normal file
@ -0,0 +1,17 @@
|
||||
demo
|
||||
|
||||
Play small demos of hledger usage in the terminal.
|
||||
|
||||
_FLAGS
|
||||
|
||||
This command plays a number of short built-in demos, using asciinema.
|
||||
|
||||
Usage: hledger demo [NUM|NAME|SUBSTR] [-- ASCIINEMAOPTS]
|
||||
|
||||
Examples:
|
||||
|
||||
$ hledger demo # list available demos
|
||||
$ hledger demo 1 # play the first demo
|
||||
$ hledger demo install -s5 -i.5 # play the demo named or containing "install",
|
||||
# at 5x speed, limiting idle time to 0.5s.
|
||||
$ asciinema -h # list other ASCIINEMAOPTS
|
||||
@ -15,6 +15,7 @@ _command_({{Check}})
|
||||
_command_({{Close}})
|
||||
_command_({{Codes}})
|
||||
_command_({{Commodities}})
|
||||
_command_({{Demo}})
|
||||
_command_({{Descriptions}})
|
||||
_command_({{Diff}})
|
||||
_command_({{Files}})
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
Symbolic links to all the main hledger manuals in several formats.
|
||||
These files are embedded into the hledger executable at compile time, in Hledger/Cli/DocFiles.hs.
|
||||
Having them symlinked here allows embedding them without using absolute paths,
|
||||
which is allowed only within the current package directory.
|
||||
These files are embedded into the hledger executable at compile time.
|
||||
They include:
|
||||
|
||||
- symbolic links to all the main hledger manuals in several formats, for embedding in Hledger/Cli/DocFiles.hs.
|
||||
(Having these symlinked here within the hledger package allows embedding them without using absolute paths.)
|
||||
|
||||
- asciinema screen casts, for embedding in Hledger/Cli/Commands/Demo.hs.
|
||||
|
||||
525
hledger/embeddedfiles/add.cast
Normal file
525
hledger/embeddedfiles/add.cast
Normal file
@ -0,0 +1,525 @@
|
||||
{"version": 2, "width": 80, "height": 25, "timestamp": 1678904454, "env": {"SHELL": "/opt/homebrew/bin/bash", "TERM": "xterm-256color"}, "title": "The simplest way to start (hledger add)"}
|
||||
[0.255203, "o", "\u001b[?2004h~$ "]
|
||||
[1.234397, "o", "h"]
|
||||
[1.327242, "o", "l"]
|
||||
[1.370235, "o", "e"]
|
||||
[1.53249, "o", "d"]
|
||||
[1.644623, "o", "g"]
|
||||
[1.819847, "o", "e"]
|
||||
[1.918665, "o", "r"]
|
||||
[2.045801, "o", " "]
|
||||
[2.542267, "o", "f"]
|
||||
[2.64452, "o", "i"]
|
||||
[2.738195, "o", "l"]
|
||||
[2.791383, "o", "e"]
|
||||
[2.874609, "o", "s"]
|
||||
[3.26324, "o", "\r\n\u001b[?2004l\r"]
|
||||
[3.428244, "o", "The hledger journa"]
|
||||
[3.428272, "o", "l file \"/Users/simon/.hledger.journ"]
|
||||
[3.42833, "o", "al\" was not found.\r\nPlease create it first, eg wi"]
|
||||
[3.428339, "o", "th \"hledg"]
|
||||
[3.428343, "o", "er a"]
|
||||
[3.428347, "o", "dd\""]
|
||||
[3.42835, "o", " or"]
|
||||
[3.428353, "o", " a"]
|
||||
[3.428356, "o", " t"]
|
||||
[3.428377, "o", "ext"]
|
||||
[3.42838, "o", " edito"]
|
||||
[3.428508, "o", "r.\r\nOr, specify an existing journal file with -f or LEDGE"]
|
||||
[3.428519, "o", "R_FILE.\r\n"]
|
||||
[3.441928, "o", "\u001b[?2004h~$ "]
|
||||
[4.143164, "o", "#"]
|
||||
[4.300801, "o", " "]
|
||||
[4.567329, "o", "N"]
|
||||
[4.763292, "o", "o"]
|
||||
[4.867708, "o", " "]
|
||||
[5.065003, "o", "h"]
|
||||
[5.123361, "o", "l"]
|
||||
[5.18613, "o", "e"]
|
||||
[5.327324, "o", "d"]
|
||||
[5.418392, "o", "g"]
|
||||
[5.552056, "o", "e"]
|
||||
[5.627632, "o", "r"]
|
||||
[5.735515, "o", " "]
|
||||
[5.834046, "o", "d"]
|
||||
[5.964766, "o", "a"]
|
||||
[6.106152, "o", "t"]
|
||||
[6.226028, "o", "a"]
|
||||
[6.532517, "o", "."]
|
||||
[6.678581, "o", " "]
|
||||
[8.309635, "o", "G"]
|
||||
[8.631756, "o", "o"]
|
||||
[8.735402, "o", "a"]
|
||||
[8.871778, "o", "l"]
|
||||
[9.439375, "o", ":"]
|
||||
[9.515163, "o", " "]
|
||||
[9.997127, "o", "u"]
|
||||
[10.078262, "o", "s"]
|
||||
[10.121507, "o", "e"]
|
||||
[10.251843, "o", " "]
|
||||
[10.349225, "o", "t"]
|
||||
[10.452566, "o", "h"]
|
||||
[10.521314, "o", "e"]
|
||||
[10.609218, "o", " "]
|
||||
[10.683405, "o", "a"]
|
||||
[10.764836, "o", "d"]
|
||||
[10.900257, "o", "d"]
|
||||
[11.012004, "o", " "]
|
||||
[11.128565, "o", "c"]
|
||||
[11.224034, "o", "o"]
|
||||
[11.266054, "o", "m"]
|
||||
[11.426288, "o", "m"]
|
||||
[11.506869, "o", "a"]
|
||||
[11.617359, "o", "n"]
|
||||
[11.693657, "o", "d"]
|
||||
[11.811191, "o", " "]
|
||||
[11.930049, "o", "t"]
|
||||
[12.014447, "o", "o"]
|
||||
[12.08663, "o", " "]
|
||||
[12.28556, "o", "s"]
|
||||
[12.43082, "o", "t"]
|
||||
[12.580679, "o", "a"]
|
||||
[12.662909, "o", "r"]
|
||||
[12.718242, "o", "t"]
|
||||
[12.871033, "o", " "]
|
||||
[12.963237, "o", "a"]
|
||||
[13.064358, "o", " "]
|
||||
[13.236245, "o", "j"]
|
||||
[13.343545, "o", "o"]
|
||||
[13.418653, "o", "u"]
|
||||
[13.526455, "o", "r"]
|
||||
[13.662285, "o", "n"]
|
||||
[13.766545, "o", "a"]
|
||||
[13.878083, "o", "l"]
|
||||
[13.9981, "o", " "]
|
||||
[14.162788, "o", "f"]
|
||||
[14.28061, "o", "i"]
|
||||
[14.364875, "o", "l"]
|
||||
[14.477069, "o", "e"]
|
||||
[16.816326, "o", "\r\n"]
|
||||
[16.816471, "o", "\u001b[?2004l\r"]
|
||||
[16.817073, "o", "\u001b[?2004h~$ "]
|
||||
[17.363334, "o", "#"]
|
||||
[17.870424, "o", " "]
|
||||
[18.801564, "o", "a"]
|
||||
[18.922632, "o", "n"]
|
||||
[18.993035, "o", "d"]
|
||||
[19.099526, "o", " "]
|
||||
[19.215501, "o", "t"]
|
||||
[19.293816, "o", "e"]
|
||||
[19.388051, "o", "l"]
|
||||
[19.545868, "o", "l"]
|
||||
[19.598296, "o", " "]
|
||||
[19.837054, "o", "h"]
|
||||
[19.911172, "o", "l"]
|
||||
[19.99106, "o", "e"]
|
||||
[20.171846, "o", "d"]
|
||||
[20.281177, "o", "g"]
|
||||
[20.427339, "o", "e"]
|
||||
[20.532727, "o", "r"]
|
||||
[20.704936, "o", " "]
|
||||
[20.826309, "o", "a"]
|
||||
[20.945941, "o", "b"]
|
||||
[21.069307, "o", "o"]
|
||||
[21.143202, "o", "u"]
|
||||
[21.247183, "o", "t"]
|
||||
[21.356392, "o", " "]
|
||||
[21.497804, "o", "m"]
|
||||
[21.763716, "o", "y"]
|
||||
[21.845479, "o", " "]
|
||||
[21.936883, "o", "f"]
|
||||
[22.06424, "o", "i"]
|
||||
[22.145905, "o", "r"]
|
||||
[22.287272, "o", "s"]
|
||||
[22.388396, "o", "t"]
|
||||
[22.528249, "o", " "]
|
||||
[22.805059, "o", "a"]
|
||||
[22.857191, "o", "c"]
|
||||
[23.035561, "o", "c"]
|
||||
[23.097684, "o", "o"]
|
||||
[23.144705, "o", "u"]
|
||||
[23.33486, "o", "n"]
|
||||
[23.38399, "o", "t"]
|
||||
[24.02125, "o", ":"]
|
||||
[24.096632, "o", " "]
|
||||
[25.64211, "o", "m"]
|
||||
[25.875169, "o", "y"]
|
||||
[25.960022, "o", " "]
|
||||
[26.056582, "o", "w"]
|
||||
[26.174807, "o", "a"]
|
||||
[26.300508, "o", "l"]
|
||||
[26.434609, "o", "l"]
|
||||
[26.512283, "o", "e"]
|
||||
[26.603068, "o", "t"]
|
||||
[26.733512, "o", "."]
|
||||
[28.063557, "o", "\r\n"]
|
||||
[28.06375, "o", "\u001b[?2004l\r"]
|
||||
[28.064135, "o", "\u001b[?2004h"]
|
||||
[28.064168, "o", "~$ "]
|
||||
[28.804492, "o", "h"]
|
||||
[28.887535, "o", "l"]
|
||||
[28.941199, "o", "e"]
|
||||
[29.096535, "o", "d"]
|
||||
[29.196855, "o", "g"]
|
||||
[29.343033, "o", "e"]
|
||||
[29.423874, "o", "r"]
|
||||
[29.567085, "o", " "]
|
||||
[29.754997, "o", "a"]
|
||||
[29.84447, "o", "d"]
|
||||
[29.964696, "o", "d"]
|
||||
[30.821916, "o", "\r\n"]
|
||||
[30.821956, "o", "\u001b[?2004l\r"]
|
||||
[30.977925, "o", "Creating hledger journal file \"/Users/simon/.hledger.j"]
|
||||
[30.97808, "o", "ournal\".\r\n"]
|
||||
[30.979303, "o", "Add"]
|
||||
[30.979315, "o", "ing tran"]
|
||||
[30.979321, "o", "saction"]
|
||||
[30.979324, "o", "s to "]
|
||||
[30.979336, "o", "jou"]
|
||||
[30.979391, "o", "rnal file /"]
|
||||
[30.979397, "o", "Users/simon/.hledger.journal\r\nAny command line ar"]
|
||||
[30.979401, "o", "gum"]
|
||||
[30.979403, "o", "en"]
|
||||
[30.979521, "o", "ts will be used as defaults.\r\nU"]
|
||||
[30.979556, "o", "se tab key to complete, readline keys to edit, enter to accept defaults.\r\nAn opt"]
|
||||
[30.979597, "o", "ional (CODE) may follow tra"]
|
||||
[30.979629, "o", "nsaction dates.\r\nAn optional ; COMMENT"]
|
||||
[30.979656, "o", " may follow descriptions or amounts.\r\nIf you"]
|
||||
[30.979661, "o", " make "]
|
||||
[30.979664, "o", "a "]
|
||||
[30.979667, "o", "mis"]
|
||||
[30.979674, "o", "ta"]
|
||||
[30.979677, "o", "ke, en"]
|
||||
[30.979733, "o", "te"]
|
||||
[30.979739, "o", "r < at any prompt to go one step backward.\r\nTo end a"]
|
||||
[30.979746, "o", " trans"]
|
||||
[30.979763, "o", "action, enter "]
|
||||
[30.979766, "o", ". w"]
|
||||
[30.979769, "o", "he"]
|
||||
[30.979772, "o", "n p"]
|
||||
[30.979775, "o", "ro"]
|
||||
[30.979778, "o", "mp"]
|
||||
[30.979781, "o", "ted"]
|
||||
[30.979783, "o", ".\r\n"]
|
||||
[30.979789, "o", "To"]
|
||||
[30.979792, "o", " quit"]
|
||||
[30.979795, "o", ", "]
|
||||
[30.979898, "o", "enter . at a date prompt or press control-d or control-c.\r\n"]
|
||||
[30.981349, "o", "\u001b[?1h\u001b="]
|
||||
[30.981828, "o", "\u001b[1;32mDate [2023-03-15]: \u001b[0m"]
|
||||
[32.365693, "o", "E"]
|
||||
[32.500444, "o", "N"]
|
||||
[32.618772, "o", "T"]
|
||||
[32.735942, "o", "E"]
|
||||
[32.846347, "o", "R"]
|
||||
[33.019661, "o", " "]
|
||||
[33.327122, "o", "k"]
|
||||
[33.448324, "o", "e"]
|
||||
[33.604502, "o", "y"]
|
||||
[33.684293, "o", " "]
|
||||
[33.846854, "o", "t"]
|
||||
[33.943511, "o", "o"]
|
||||
[34.037209, "o", " "]
|
||||
[34.184367, "o", "a"]
|
||||
[34.218041, "o", "c"]
|
||||
[34.66764, "o", "e"]
|
||||
[35.057403, "o", "\b\u001b[K"]
|
||||
[35.181887, "o", "c"]
|
||||
[35.255623, "o", "e"]
|
||||
[35.427566, "o", "p"]
|
||||
[35.571436, "o", "t"]
|
||||
[35.675992, "o", " "]
|
||||
[35.818066, "o", "d"]
|
||||
[36.014537, "o", "e"]
|
||||
[36.124485, "o", "f"]
|
||||
[36.220167, "o", "a"]
|
||||
[36.292678, "o", "u"]
|
||||
[36.363166, "o", "l"]
|
||||
[36.64892, "o", "t"]
|
||||
[36.954332, "o", "."]
|
||||
[38.004952, "o", "\u001b[8D\u001b[K"]
|
||||
[38.182813, "o", "\u001b[7D\u001b[K"]
|
||||
[38.372388, "o", "\u001b[3D\u001b[K"]
|
||||
[38.566491, "o", "\u001b[4D\u001b[K"]
|
||||
[38.937339, "o", "\u001b[6D\u001b[K"]
|
||||
[39.366089, "o", "\r\r\n"]
|
||||
[39.366289, "o", "\u001b[?1l\u001b>"]
|
||||
[39.370371, "o", "\u001b[?1h\u001b="]
|
||||
[39.370686, "o", "\u001b[1;32mDescription: \u001b[0m"]
|
||||
[40.438771, "o", "o"]
|
||||
[40.510529, "o", "p"]
|
||||
[40.624829, "o", "e"]
|
||||
[40.790305, "o", "n"]
|
||||
[40.965564, "o", "i"]
|
||||
[41.043854, "o", "n"]
|
||||
[41.153372, "o", "g"]
|
||||
[41.232651, "o", " "]
|
||||
[41.46274, "o", "b"]
|
||||
[41.559769, "o", "a"]
|
||||
[41.688099, "o", "l"]
|
||||
[41.799534, "o", "a"]
|
||||
[41.87038, "o", "n"]
|
||||
[42.013444, "o", "c"]
|
||||
[42.100814, "o", "e"]
|
||||
[42.179245, "o", "s"]
|
||||
[42.672007, "o", "\r\r\n"]
|
||||
[42.672242, "o", "\u001b[?1l\u001b>"]
|
||||
[42.672897, "o", "\u001b[?1h\u001b="]
|
||||
[42.677624, "o", "\u001b[1;32mAccount 1: \u001b[0m"]
|
||||
[44.247752, "o", "I"]
|
||||
[44.451109, "o", "'"]
|
||||
[44.648424, "o", "l"]
|
||||
[44.796114, "o", "l"]
|
||||
[44.887984, "o", " "]
|
||||
[44.978643, "o", "c"]
|
||||
[45.044853, "o", "a"]
|
||||
[45.129135, "o", "l"]
|
||||
[45.276748, "o", "l"]
|
||||
[45.379586, "o", " "]
|
||||
[45.545822, "o", "i"]
|
||||
[45.670209, "o", "t"]
|
||||
[45.763155, "o", " "]
|
||||
[46.076756, "o", "c"]
|
||||
[46.206959, "o", "a"]
|
||||
[46.298797, "o", "s"]
|
||||
[46.40413, "o", "h"]
|
||||
[47.912169, "o", "\u001b[4D\u001b[K"]
|
||||
[48.126171, "o", "\u001b[3D\u001b[K"]
|
||||
[48.333167, "o", "\u001b[5D\u001b[K"]
|
||||
[48.539866, "o", "\u001b[3D\u001b[K"]
|
||||
[48.762142, "o", "\u001b[2D\u001b[K"]
|
||||
[49.06622, "o", "c"]
|
||||
[49.164572, "o", "a"]
|
||||
[49.250997, "o", "s"]
|
||||
[49.327952, "o", "h"]
|
||||
[49.73888, "o", "\r\r\n"]
|
||||
[49.739041, "o", "\u001b[?1l\u001b>"]
|
||||
[49.739718, "o", "\u001b[?1h\u001b="]
|
||||
[49.740062, "o", "\u001b[1;32mAmount 1: \u001b[0m"]
|
||||
[50.952601, "o", "$"]
|
||||
[51.407241, "o", "5"]
|
||||
[51.608231, "o", "0"]
|
||||
[51.926796, "o", "."]
|
||||
[52.089745, "o", "2"]
|
||||
[52.216239, "o", "5"]
|
||||
[53.233036, "o", "\r\r\n"]
|
||||
[53.23324, "o", "\u001b[?1l\u001b>"]
|
||||
[53.235334, "o", "\u001b[?1h\u001b="]
|
||||
[53.235626, "o", "\u001b[1;32mAccount 2: \u001b[0m"]
|
||||
[55.593736, "o", "I"]
|
||||
[55.778761, "o", "n"]
|
||||
[55.846798, "o", " "]
|
||||
[56.100551, "o", "D"]
|
||||
[56.321018, "o", "o"]
|
||||
[56.413207, "o", "u"]
|
||||
[56.470998, "o", "b"]
|
||||
[56.601466, "o", "l"]
|
||||
[56.670964, "o", "e"]
|
||||
[56.796657, "o", " "]
|
||||
[56.955752, "o", "E"]
|
||||
[57.171269, "o", "n"]
|
||||
[57.289458, "o", "t"]
|
||||
[57.339763, "o", "r"]
|
||||
[57.500175, "o", "y"]
|
||||
[57.573121, "o", " "]
|
||||
[57.846171, "o", "B"]
|
||||
[58.087773, "o", "o"]
|
||||
[58.244044, "o", "o"]
|
||||
[58.333501, "o", "k"]
|
||||
[58.836289, "o", "k"]
|
||||
[58.930351, "o", "e"]
|
||||
[59.083618, "o", "e"]
|
||||
[59.199624, "o", "p"]
|
||||
[59.415746, "o", "i"]
|
||||
[59.476424, "o", "n"]
|
||||
[59.570074, "o", "g"]
|
||||
[59.93668, "o", ","]
|
||||
[60.017958, "o", " "]
|
||||
[60.507438, "o", "w"]
|
||||
[60.589713, "o", "e"]
|
||||
[60.711635, "o", " "]
|
||||
[60.911856, "o", "m"]
|
||||
[61.105571, "o", "u"]
|
||||
[61.158489, "o", "s"]
|
||||
[61.250867, "o", "t"]
|
||||
[61.321488, "o", " "]
|
||||
[61.48602, "o", "s"]
|
||||
[61.574183, "o", "a"]
|
||||
[61.753348, "o", "y"]
|
||||
[61.829632, "o", " "]
|
||||
[62.100469, "o", "w"]
|
||||
[62.279986, "o", "h"]
|
||||
[62.393708, "o", "e"]
|
||||
[62.529779, "o", "r"]
|
||||
[62.626381, "o", "e"]
|
||||
[62.79806, "o", " "]
|
||||
[62.926809, "o", "t"]
|
||||
[63.029974, "o", "h"]
|
||||
[63.126396, "o", "e"]
|
||||
[63.136837, "o", " "]
|
||||
[63.336311, "o", "m"]
|
||||
[63.457882, "o", "o"]
|
||||
[63.565931, "o", "n"]
|
||||
[63.71167, "o", "e"]
|
||||
[63.941578, "o", "y"]
|
||||
[64.005898, "o", " "]
|
||||
[64.202506, "o", "c"]
|
||||
[64.299594, "o", "o"]
|
||||
[64.351714, "o", "m"]
|
||||
[64.452243, "o", "e"]
|
||||
[64.545918, "o", "s"]
|
||||
[64.676844, "o", " "]
|
||||
[64.800326, "o", "f"]
|
||||
[64.968768, "o", "r"]
|
||||
[65.000807, "o", "o"]
|
||||
[65.075064, "o", "m"]
|
||||
[65.335673, "o", "."]
|
||||
[65.434415, "o", " \b"]
|
||||
[65.754756, "o", "F"]
|
||||
[66.021373, "o", "o"]
|
||||
[66.105097, "o", "r"]
|
||||
[66.20665, "o", " "]
|
||||
[66.353568, "o", "o"]
|
||||
[66.433295, "o", "p"]
|
||||
[66.547727, "o", "e"]
|
||||
[66.678949, "o", "n"]
|
||||
[66.844279, "o", "i"]
|
||||
[66.929605, "o", "n"]
|
||||
[67.041925, "o", "g"]
|
||||
[67.249947, "o", " "]
|
||||
[67.912057, "o", "b"]
|
||||
[68.023269, "o", "a"]
|
||||
[68.128661, "o", "l"]
|
||||
[68.254994, "o", "a"]
|
||||
[68.33604, "o", "n"]
|
||||
[68.457164, "o", "c"]
|
||||
[68.527258, "o", "e"]
|
||||
[68.612963, "o", "s"]
|
||||
[68.904649, "o", ","]
|
||||
[68.985425, "o", " "]
|
||||
[69.977925, "o", "t"]
|
||||
[70.136536, "o", "h"]
|
||||
[70.219258, "o", "a"]
|
||||
[70.31614, "o", "t"]
|
||||
[70.485621, "o", "'"]
|
||||
[70.617502, "o", "s"]
|
||||
[70.83977, "o", " "]
|
||||
[71.662638, "o", "\""]
|
||||
[72.018456, "o", "e"]
|
||||
[72.221028, "o", "q"]
|
||||
[72.313577, "o", "u"]
|
||||
[72.349719, "o", "i"]
|
||||
[72.468137, "o", "t"]
|
||||
[72.568905, "o", "y"]
|
||||
[72.800114, "o", "\""]
|
||||
[73.188821, "o", "."]
|
||||
[77.548683, "o", "\u001b[8D\u001b[K"]
|
||||
[77.799445, "o", "\u001b[3D\u001b[K"]
|
||||
[77.832655, "o", "\u001b[5D\u001b[K"]
|
||||
[77.866934, "o", "\u001b[10D\u001b[K"]
|
||||
[77.901869, "o", "\u001b[8D\u001b[K"]
|
||||
[77.9349, "o", "\u001b[4D\u001b[K"]
|
||||
[77.97057, "o", "\r\u001b[A\u001b[74C\u001b[K\r\r\n\u001b[K\r\u001b[A\u001b[74C"]
|
||||
[78.001574, "o", "\u001b[6D\u001b[K"]
|
||||
[78.034116, "o", "\u001b[6D\u001b[K"]
|
||||
[78.067545, "o", "\u001b[4D\u001b[K"]
|
||||
[78.10191, "o", "\u001b[6D\u001b[K"]
|
||||
[78.134988, "o", "\u001b[4D\u001b[K"]
|
||||
[78.168896, "o", "\u001b[5D\u001b[K"]
|
||||
[78.201546, "o", "\u001b[3D\u001b[K"]
|
||||
[78.475379, "o", "\u001b[13D\u001b[K"]
|
||||
[78.727091, "o", "\u001b[6D\u001b[K"]
|
||||
[78.759581, "o", "\u001b[7D\u001b[K"]
|
||||
[78.794906, "o", "\u001b[3D\u001b[K"]
|
||||
[79.197513, "o", "e"]
|
||||
[79.388333, "o", "q"]
|
||||
[79.478797, "o", "u"]
|
||||
[79.557333, "o", "i"]
|
||||
[79.646162, "o", "t"]
|
||||
[79.752036, "o", "y"]
|
||||
[80.052548, "o", "\r\r\n"]
|
||||
[80.052709, "o", "\u001b[?1l\u001b>"]
|
||||
[80.053503, "o", "\u001b[?1h\u001b="]
|
||||
[80.053779, "o", "\u001b[1;32mAmount 2 [$-50.25]: \u001b[0m"]
|
||||
[81.514416, "o", "\r\r\n"]
|
||||
[81.514624, "o", "\u001b[?1l\u001b>"]
|
||||
[81.515346, "o", "\u001b[?1h\u001b="]
|
||||
[81.515758, "o", "\u001b[1;32mAccount 3 (or . or enter to finish this transaction): \u001b[0m"]
|
||||
[83.121045, "o", "\r\r\n"]
|
||||
[83.121349, "o", "\u001b[?1l\u001b>"]
|
||||
[83.124682, "o", "2023-03-15 opening balances\r\n cash $50.25\r\n equity $-50.25\r\n\r\n"]
|
||||
[83.124741, "o", "\u001b[?1h\u001b="]
|
||||
[83.125302, "o", "\u001b[1;32mSave this transaction to the journal ? [y]: \u001b[0m"]
|
||||
[84.648814, "o", "\r\r\n"]
|
||||
[84.649125, "o", "\u001b[?1l\u001b>"]
|
||||
[84.650906, "o", "Saved"]
|
||||
[84.650941, "o", ".\r\nStartin"]
|
||||
[84.650952, "o", "g th"]
|
||||
[84.650963, "o", "e "]
|
||||
[84.650973, "o", "nex"]
|
||||
[84.650983, "o", "t t"]
|
||||
[84.650993, "o", "ran"]
|
||||
[84.651004, "o", "sa"]
|
||||
[84.651014, "o", "cti"]
|
||||
[84.651025, "o", "on "]
|
||||
[84.651035, "o", "(."]
|
||||
[84.651045, "o", " or"]
|
||||
[84.651055, "o", " ct"]
|
||||
[84.651065, "o", "rl"]
|
||||
[84.651075, "o", "-D/"]
|
||||
[84.651086, "o", "ct"]
|
||||
[84.651096, "o", "rl-"]
|
||||
[84.651106, "o", "C t"]
|
||||
[84.651116, "o", "o "]
|
||||
[84.651126, "o", "qui"]
|
||||
[84.651136, "o", "t)\r\n"]
|
||||
[84.652027, "o", "\u001b[?1h\u001b="]
|
||||
[84.652505, "o", "\u001b[1;32mDate [2023-03-15]: \u001b[0m"]
|
||||
[86.062566, "o", "."]
|
||||
[86.948614, "o", "\r\r\n"]
|
||||
[86.94891, "o", "\u001b[?1l\u001b>"]
|
||||
[86.961366, "o", "\u001b[?2004h"]
|
||||
[86.961397, "o", "~$ "]
|
||||
[90.08491, "o", "h"]
|
||||
[90.169623, "o", "l"]
|
||||
[90.259761, "o", "e"]
|
||||
[90.393192, "o", "d"]
|
||||
[90.48565, "o", "g"]
|
||||
[90.643033, "o", "e"]
|
||||
[90.731047, "o", "r"]
|
||||
[90.845308, "o", " "]
|
||||
[90.989267, "o", "f"]
|
||||
[91.090677, "o", "i"]
|
||||
[91.155866, "o", "l"]
|
||||
[91.219015, "o", "e"]
|
||||
[91.318928, "o", "s"]
|
||||
[91.846494, "o", "\r\n"]
|
||||
[91.846728, "o", "\u001b[?2004l\r"]
|
||||
[91.89879, "o", "/Users/simon/.hledger.journal\r\n"]
|
||||
[91.905659, "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"]
|
||||
[100.830158, "o", "\u001b[?2004h"]
|
||||
[100.830201, "o", "~$ "]
|
||||
[105, "o", "\u001b[?2004l\r\r\n"]
|
||||
[105, "o", "exit\r\n"]
|
||||
1579
hledger/embeddedfiles/install.cast
Normal file
1579
hledger/embeddedfiles/install.cast
Normal file
File diff suppressed because it is too large
Load Diff
159
hledger/embeddedfiles/reports.cast
Normal file
159
hledger/embeddedfiles/reports.cast
Normal file
@ -0,0 +1,159 @@
|
||||
{"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"]
|
||||
[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"]
|
||||
[108.730511, "o", "d"]
|
||||
[108.803014, "o", "g"]
|
||||
[108.958676, "o", "e"]
|
||||
[109.045557, "o", "r"]
|
||||
[109.179193, "o", " "]
|
||||
[109.479806, "o", "b"]
|
||||
[109.579409, "o", "a"]
|
||||
[109.688887, "o", "l"]
|
||||
[109.797373, "o", "a"]
|
||||
[109.91028, "o", "n"]
|
||||
[109.997384, "o", "c"]
|
||||
[110.094392, "o", "e"]
|
||||
[110.502797, "o", " "]
|
||||
[110.689187, "o", " "]
|
||||
[110.861258, "o", " "]
|
||||
[110.983483, "o", "#"]
|
||||
[111.339007, "o", " "]
|
||||
[111.716216, "o", "s"]
|
||||
[111.764379, "o", "h"]
|
||||
[111.834664, "o", "o"]
|
||||
[111.929608, "o", "w"]
|
||||
[112.018977, "o", " "]
|
||||
[112.127754, "o", "a"]
|
||||
[112.222003, "o", "c"]
|
||||
[112.376553, "o", "c"]
|
||||
[112.447519, "o", "o"]
|
||||
[112.508197, "o", "u"]
|
||||
[112.718333, "o", "n"]
|
||||
[112.776805, "o", "t"]
|
||||
[112.882741, "o", " "]
|
||||
[113.097111, "o", "b"]
|
||||
[113.178418, "o", "a"]
|
||||
[113.315295, "o", "l"]
|
||||
[113.375822, "o", "a"]
|
||||
[113.519044, "o", "n"]
|
||||
[113.609534, "o", "c"]
|
||||
[113.696372, "o", "e"]
|
||||
[113.785515, "o", "s"]
|
||||
[115.603503, "o", "\r\n"]
|
||||
[115.603698, "o", "\u001b[?2004l\r"]
|
||||
[115.658566, "o", " $50.25 cash\r\n \u001b[31m$-50.25\u001b[m equity\r\n--------------------\r\n 0 \r\n"]
|
||||
[115.666234, "o", "\u001b[?2004h~$ "]
|
||||
[117.006486, "o", "h"]
|
||||
[117.097537, "o", "l"]
|
||||
[117.154161, "o", "e"]
|
||||
[117.331344, "o", "d"]
|
||||
[117.4488, "o", "g"]
|
||||
[117.596908, "o", "e"]
|
||||
[117.690342, "o", "r"]
|
||||
[117.799646, "o", " "]
|
||||
[118.066348, "o", "b"]
|
||||
[118.131542, "o", "a"]
|
||||
[118.269237, "o", "l"]
|
||||
[118.350699, "o", "a"]
|
||||
[118.45648, "o", "n"]
|
||||
[118.540488, "o", "c"]
|
||||
[118.651362, "o", "e"]
|
||||
[118.751114, "o", " "]
|
||||
[119.039376, "o", "c"]
|
||||
[119.146043, "o", "a"]
|
||||
[119.258617, "o", "s"]
|
||||
[119.41532, "o", "h"]
|
||||
[119.7897, "o", " "]
|
||||
[119.955405, "o", " "]
|
||||
[120.142919, "o", " "]
|
||||
[120.480195, "o", "#"]
|
||||
[120.753113, "o", " "]
|
||||
[120.904346, "o", "s"]
|
||||
[121.013868, "o", "h"]
|
||||
[121.06859, "o", "o"]
|
||||
[121.151587, "o", "w"]
|
||||
[121.241558, "o", " "]
|
||||
[121.408393, "o", "j"]
|
||||
[121.582123, "o", "u"]
|
||||
[121.637329, "o", "s"]
|
||||
[121.731132, "o", "t"]
|
||||
[121.799539, "o", " "]
|
||||
[121.972017, "o", "c"]
|
||||
[122.064462, "o", "a"]
|
||||
[122.157572, "o", "s"]
|
||||
[122.355162, "o", "h"]
|
||||
[122.459994, "o", " "]
|
||||
[122.595849, "o", "a"]
|
||||
[122.697417, "o", "c"]
|
||||
[122.861577, "o", "c"]
|
||||
[122.919021, "o", "o"]
|
||||
[122.953757, "o", "u"]
|
||||
[123.174305, "o", "n"]
|
||||
[123.270113, "o", "t"]
|
||||
[124.685978, "o", "\r\n"]
|
||||
[124.686062, "o", "\u001b[?2004l\r"]
|
||||
[124.827946, "o", " $50.25 cash\r\n--------------------\r\n $50.25 \r\n"]
|
||||
@ -5739,6 +5739,7 @@ These data entry commands are the only ones which can modify your journal file.
|
||||
### HELP
|
||||
|
||||
- [help](#help) - show the hledger manual with info/man/pager
|
||||
- [demo](#demo) - show small hledger demos in the terminal
|
||||
|
||||
<a name="addons"></a>
|
||||
<!-- #addons: the short explanation and list of common add-on commands. See also #add-on-commands. -->
|
||||
|
||||
@ -160,6 +160,7 @@ library:
|
||||
- Hledger.Cli.Commands.Close
|
||||
- Hledger.Cli.Commands.Codes
|
||||
- Hledger.Cli.Commands.Commodities
|
||||
- Hledger.Cli.Commands.Demo
|
||||
- Hledger.Cli.Commands.Descriptions
|
||||
- Hledger.Cli.Commands.Diff
|
||||
- Hledger.Cli.Commands.Help
|
||||
|
||||
Loading…
Reference in New Issue
Block a user