small infrastructure fixes
updates to website text updates to website generation add a little makefile
This commit is contained in:
parent
455726f6c2
commit
63a23cabf4
30
Makefile
Normal file
30
Makefile
Normal file
|
@ -0,0 +1,30 @@
|
|||
|
||||
# quick makefile to document how to do the various tasks
|
||||
|
||||
# there is no real reason to actually use the makefile except for a
|
||||
# very small amount of convenience
|
||||
|
||||
.PHONY : init
|
||||
init :
|
||||
cabal sandbox init
|
||||
cabal install --only-dependencies --enable-tests
|
||||
cabal configure --enable-tests
|
||||
|
||||
.PHONY : build
|
||||
build :
|
||||
cabal build
|
||||
|
||||
.PHONY : test
|
||||
test : build
|
||||
dist/build/Tests/Tests --hide-successes
|
||||
|
||||
.PHONY : website
|
||||
website :
|
||||
website/make_website.sh
|
||||
|
||||
.PHONY : clean
|
||||
clean :
|
||||
cabal clean
|
||||
cabal sandbox delete
|
||||
rm -Rf build/
|
||||
|
|
@ -7,9 +7,9 @@ description: A parser for SQL. Parses most SQL:2011
|
|||
transaction management and session management
|
||||
syntax. Please see the homepage for more
|
||||
information
|
||||
<http://jakewheat.github.io/simple-sql-parser/>.
|
||||
<http://jakewheat.github.io/simple-sql-parser/latest>.
|
||||
|
||||
homepage: http://jakewheat.github.io/simple-sql-parser/
|
||||
homepage: http://jakewheat.github.io/simple-sql-parser/latest
|
||||
license: BSD3
|
||||
license-file: LICENSE
|
||||
author: Jake Wheat
|
||||
|
|
34
website/AddLinks.lhs
Normal file
34
website/AddLinks.lhs
Normal file
|
@ -0,0 +1,34 @@
|
|||
|
||||
Little hack to add links to the navigation bars
|
||||
|
||||
> main :: IO ()
|
||||
> main = interact addLinks
|
||||
|
||||
|
||||
> addLinks :: String -> String
|
||||
> addLinks [] = error "not found"
|
||||
> addLinks ('<':'/':'u':'l':'>':'\n':'<':'/':'d':'i':'v':'>':xs) =
|
||||
> "</ul>" ++ linkSection ++ "\n</div>" ++ xs
|
||||
> addLinks (x:xs) = x : addLinks xs
|
||||
|
||||
> linkSection :: String
|
||||
> linkSection =
|
||||
> "<hr />\n\
|
||||
> \<ul class=\"sectlevel1\">\n\
|
||||
> \<div id=\"toctitle\">Links</div>\n\
|
||||
> \<li><a href=\"index.html\">Index</a></li>\n\
|
||||
> \<li><a href='haddock/index.html'>Haddock</li>\n\
|
||||
> \<li><a href=\"supported_sql.html\" class=\"bare\">Supported SQL</a></li>\n\
|
||||
> \<li><a href=\"test_cases.html\">Test cases</a></li>\n\
|
||||
> \</ul>\n\
|
||||
> \<br />\n\
|
||||
> \<ul class=\"sectlevel1\">\n\
|
||||
> \<li><a href=\"http://jakewheat.github.io/simple-sql-parser/latest\" class=\"bare\">Homepage</a></li>\n\
|
||||
> \<li><a href=\"http://hackage.haskell.org/package/simple-sql-parser\" class=\"bare\">Hackage</a></li>\n\
|
||||
> \<li><a href=\"https://github.com/JakeWheat/simple-sql-parser\" class=\"bare\">Repository</a></li>\n\
|
||||
> \<li><a href=\"https://github.com/JakeWheat/simple-sql-parser/issues\" class=\"bare\">Bug tracker</a></li>\n\
|
||||
> \<li><a href=\"https://github.com/JakeWheat/simple-sql-parser/blob/master/changelog\" class=\"bare\">Changes</a></li>\n\
|
||||
> \<li><a href=\"http://jakewheat.github.io/simple-sql-parser/\" class=\"bare\">Other versions</a></li>\n\
|
||||
> \<li><a href=\"http://jakewheat.github.io/\" class=\"bare\">Parent project</a>\n\
|
||||
> \</li><li>jakewheatmail@gmail.com</li>\n\
|
||||
> \</ul>\n"
|
|
@ -26,9 +26,9 @@ Tested with GHC 7.10.2, 7.8.4 and 7.6.3.
|
|||
|
||||
== Links
|
||||
|
||||
* Local haddock: link:haddock/index.html[]
|
||||
* Supported SQL:link:supported_sql.html[]
|
||||
* Examples: link:test_cases.html[simple-sql-parser test cases]
|
||||
* Haddock: link:haddock/index.html[]
|
||||
* Supported SQL: link:supported_sql.html[]
|
||||
* Test cases: link:test_cases.html[simple-sql-parser test cases]
|
||||
* Homepage: http://jakewheat.github.io/simple-sql-parser/latest
|
||||
* Hackage: http://hackage.haskell.org/package/simple-sql-parser
|
||||
* Repository: https://github.com/JakeWheat/simple-sql-parser
|
||||
|
@ -38,6 +38,12 @@ Tested with GHC 7.10.2, 7.8.4 and 7.6.3.
|
|||
* Parent project: http://jakewheat.github.io/
|
||||
* Contact: +++jakewheatmail@gmail.com+++
|
||||
|
||||
The simple-sql-parser is a lot less simple than it used to be. If you
|
||||
just need to parse much simpler SQL than this, or want to start with a
|
||||
simpler parser and modify it slightly, you could also look at the
|
||||
basic query parser in the intro_to_parsing project, the code is here:
|
||||
link:https://github.com/JakeWheat/intro_to_parsing/blob/master/SimpleSQLQueryParser0.lhs[SimpleSQLQueryParser].
|
||||
|
||||
== Feature support
|
||||
|
||||
* query expressions
|
||||
|
@ -65,9 +71,8 @@ Tested with GHC 7.10.2, 7.8.4 and 7.6.3.
|
|||
See the link:supported_sql.html[] page for details on
|
||||
the supported SQL.
|
||||
|
||||
Here is a document with all the link:test_cases.html[simple-sql-parser
|
||||
test cases] rendered in a webpage so you can get an idea of what it
|
||||
supports.
|
||||
Here is all the link:test_cases.html[simple-sql-parser test cases]
|
||||
rendered in a webpage so you can get an idea of what it supports.
|
||||
|
||||
== Examples
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#! /bin/sh
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
# todo: check this is run from the project root and not the website/
|
||||
|
@ -11,9 +10,11 @@ cp website/main.css build
|
|||
cp website/ocean.css build
|
||||
|
||||
# index
|
||||
asciidoctor website/index.asciidoc -o build/index.html
|
||||
asciidoctor website/index.asciidoc -o - | runhaskell website/AddLinks.lhs > build/index.html
|
||||
#pandoc --from=markdown --to=html website/index.txt -o build/index.html -c main.css --title=simple-sql-parser --toc
|
||||
asciidoctor website/supported_sql.asciidoc -o build/supported_sql.html
|
||||
asciidoctor website/supported_sql.asciidoc -o - | runhaskell website/AddLinks.lhs > build/supported_sql.html
|
||||
|
||||
|
||||
#pandoc --from=markdown --to=html website/supported_sql.txt -o build/supported_sql.html -c main.css '--title=simple-sql-parser supported SQL' --toc
|
||||
|
||||
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
== Overview
|
||||
|
||||
link:index.html[simple-sql-parser home]
|
||||
|
||||
This page has more details on the supported SQL in simple-sql-parser.
|
||||
|
||||
See the link:test_cases.html[simple-sql-parser test cases] page for
|
||||
|
|
Loading…
Reference in a new issue