1
Fork 0

a few documentation and website tweaks

This commit is contained in:
Jake Wheat 2016-02-22 23:16:36 +02:00
parent 10a38657b5
commit 3f7e0123a2
6 changed files with 48 additions and 33 deletions

View file

@ -4,8 +4,8 @@ Converts the test data to asciidoc
> import Language.SQL.SimpleSQL.Tests
> import Text.Show.Pretty
> import Control.Monad.State
> import Language.SQL.SimpleSQL.Parser
> import Language.SQL.SimpleSQL.Lexer
> import Language.SQL.SimpleSQL.Parse
> import Language.SQL.SimpleSQL.Lex
> import Data.List
> data TableItem = Heading Int String
@ -32,7 +32,10 @@ Converts the test data to asciidoc
> doc _ (ParseValueExprFails d str) =
> [Row str (ppShow $ parseValueExpr d "" Nothing str)]
> doc _ (LexerTest d str t) =
> doc _ (LexTest d str t) =
> [Row str (ppShow $ lexSQL d "" Nothing str)]
> doc _ (LexFails d str) =
> [Row str (ppShow $ lexSQL d "" Nothing str)]
TODO: should put the dialect in the html output

View file

@ -22,7 +22,7 @@ asciidoctor website/supported_sql.asciidoc -o - | runhaskell website/AddLinks.lh
# tpch sql file
# pandoc src/tpch.sql -s --highlight-style kate -o tpch.sql.html
# rendered test cases
runhaskell -package-db=.cabal-sandbox/x86_64-linux-ghc-7.10.2-packages.conf.d -i:tools website/RenderTestCases.lhs > build/test_cases.asciidoc
runhaskell -package-db=.cabal-sandbox/x86_64-linux-ghc-7.10.3-packages.conf.d -i:tools website/RenderTestCases.lhs > build/test_cases.asciidoc
#pandoc --from=markdown --to=html build/test_cases.asciidoc -o build/test_cases.html -c main.css '--title=simple-sql-parser examples/test cases' --toc
asciidoctor build/test_cases.asciidoc -o - | \
@ -31,7 +31,7 @@ asciidoctor build/test_cases.asciidoc -o - | \
# TODO: reduce the text size on the test cases page
# TODO: use scrollbars inside the tables
# TODO: make the tables autowidth
# -e "s/(code.*)font-size:1em/\1font-size:0.8em/g"
# -e "s/(code.*)font-size:1em/\1font-size:0.8em/g"
rm build/test_cases.asciidoc
# haddock