Commit Graph

23 Commits (main)

Author SHA1 Message Date
Oystein Kristoffer Tveit 51ab2cf393
docbook2txt: halfway finish `<informaltable>`
This required a lot of restructuring, which is why I won't
put this on another branch.

A part of the library which is updated in github but not yet at hackage,
is needed to continue. Specifically, the `Monoid` instance in
`Text.Layout.Table.Cell.Formatted` is needed to put together multiple
colored text in a table.

Among other things introduced, there is now our own `Formatted` type
which is used to await formatting until things like tables come up.
Compared to the earlier `IO ()` approach, this is probably a lot better.
2022-11-30 20:26:36 +01:00
Oystein Kristoffer Tveit 4099bbce8d
docbook2txt: clean up some code
- Introduce pattern synonym `TextLeaf` for `TagLeaf (TagText)`
- Convert `replaceTagColor` to use "case-of" pattern matching
2022-11-30 03:08:01 +01:00
Oystein Kristoffer Tveit c1d4bece4a
docbook2txt: parse more tags
- parse `<quote>`
- parse `<warning>`
2022-11-30 02:49:06 +01:00
Oystein Kristoffer Tveit ea4e35b82a
docbook2txt: rename `xmldoc2txt` to `docbook2txt` 2022-11-29 23:16:52 +01:00
Oystein Kristoffer Tveit 33fcdf7ab9
xmldoc2txt: parse more tags
- Document some functions
- Parse `<envar>`
- Parse `<citerefentry>`
2022-11-29 19:49:03 +01:00
Oystein Kristoffer Tveit d94dc97394
xmldoc2txt: fix case where multiple `<para>` are present 2022-11-29 17:34:56 +01:00
Oystein Kristoffer Tveit 067f44413f
json2nix: fix output when expr is raw string 2022-11-29 17:34:16 +01:00
Oystein Kristoffer Tveit 74ed72ff0b
flake.nix: add internal programs as runnables
These are useful when testing the programs on raw
input, compared to having to test the program
through a searcher.
2022-11-29 16:18:05 +01:00
Oystein Kristoffer Tveit 3d92480602
shell.nix: print aliases on starting nix-shell 2022-11-29 16:16:47 +01:00
Oystein Kristoffer Tveit 5ba23966e1
bat: specify syntax highlighting language 2022-11-29 15:49:27 +01:00
Oystein Kristoffer Tveit e17274e94d
xmldoc2txt: init
xmldoc2txt is a more rigid framework for replacing
xml tags in the documentation. It replaces the clunky
perl substitution expressions.
2022-11-29 15:48:31 +01:00
Oystein Kristoffer Tveit 93cc90c97b
json2nix: add compiler as a package option 2022-11-29 15:31:48 +01:00
Oystein Kristoffer Tveit 42758507b6
json2nix: fix string quotation bug 2022-11-28 20:23:03 +01:00
Oystein Kristoffer Tveit d30a1093a3
json2nix: `ghc942` -> `ghc924`
Downgrade ghc compiler to support `nixos-22.05`
2022-11-26 21:08:14 +01:00
Oystein Kristoffer Tveit fddecffa02
naming consistency: `nix-attrs-*` -> `nix-attr-*` 2022-11-26 21:01:29 +01:00
Oystein Kristoffer Tveit fa2f0fd6b4
json2nix: use nixfmt internally
This helps with creating better error messages,
because we can now see where in the pipeline
the error occurred
2022-11-26 20:50:22 +01:00
Oystein Kristoffer Tveit eab555988e
utils/ormolu: init
Add tool for formatting haskell files
2022-11-26 20:48:26 +01:00
Oystein Kristoffer Tveit ca3e27ec77
nix-option-search: Init 2022-11-26 06:35:58 +01:00
Oystein Kristoffer Tveit a5d68057d0
format 2022-11-26 06:02:52 +01:00
Oystein Kristoffer Tveit 36b5f5e5f7
hms: make `defaultManualPath` into callPackage arg 2022-11-26 06:02:19 +01:00
Oystein Kristoffer Tveit 3e2697ca4d
hms: handle more example cases 2022-11-26 06:01:04 +01:00
Oystein Kristoffer Tveit f6217e4c54
Restructure project:
The project has grown quite a bit without me remembering
to make any commits...

Here's a summary of what has happened:

- Make the project friendly towards non-flake users
- Add searchers to be created: `nur-package-search`, `nix-lib-search`
- Add misc util scripts for formatting and testing code.
- Split templates into their own directory,
    as they get quite large after a while.

- Add colorized templates.
- Replace some of the xml tags with optionally colorized output.
- Add `--no-color` option
- Add json2nix script, which will convert the json-converted
    nix code back into nix.
2022-11-26 05:14:14 +01:00
Oystein Kristoffer Tveit 0aaa30346e
Initial commit 2022-11-24 20:09:31 +01:00