sqlmarkdown
v0.2.0
Published
Convert markdown with SQL snippets to an interactive literate programming playground.
Downloads
3
Readme
SQL Markdown
SQL Markdown
Convert markdown with SQL snippets to an interactive literate programming playground. Powered by sql.js (sqlite compiled to javascript)
DEMO
What is SQL Markdown?
SQL Markdown is markdown converter that will convert your markdown to an interactive web page in a single HTML file.
Whenever SQL Markdown sees a sql
snippet, it will mark the SQL code as runnable in the playground generated by the converter.
SQL Snippets look like this:
```sql
-- run_on_start
CREATE TABLE Persons (
PersonID int,
LastName varchar(255),
FirstName varchar(255),
Address varchar(255),
City varchar(255)
);
```
Note: You can additionally add the comment
-- run_on_start
to signal to the interactive playground that that query should be ran when the playground is created.
See the:
Installation and usage
Make sure you have the lastest version of node.js installed (the latest LTS is recommended).
Then run the following:
npm install --global sqlmarkdown
Note: you may need
sudo
beforenpm install --global
Then to render a SQL markdown page:
sqlmarkdown my-doc.sql.md
Which will produce my-doc.sql.md.html
.