Skip to content

Commit

Permalink
Create basic website.
Browse files Browse the repository at this point in the history
  • Loading branch information
electroly committed Apr 17, 2016
1 parent 0cace09 commit 7cbdfa2
Show file tree
Hide file tree
Showing 11 changed files with 121 additions and 6 deletions.
4 changes: 1 addition & 3 deletions license.md
@@ -1,7 +1,5 @@
# MIT License

SQL Notebook
Copyright © 2016 Brian Luft
Copyright © 2016 Brian Luft

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
12 changes: 9 additions & 3 deletions readme.md
@@ -1,7 +1,7 @@
<a href="https://raw.githubusercontent.com/electroly/sqlnotebook/master/art/screenshot.png" target="_blank"><img src="https://raw.githubusercontent.com/electroly/sqlnotebook/master/art/screenshot-thumb.png" align="right"></a>
<img src="https://raw.githubusercontent.com/electroly/sqlnotebook/master/art/icon-title.png">
### [**Download & Install**](http://sqlnotebook.com/install/setup.exe)
<a href="http://sqlnotebook.com/index.html"><img src="http://sqlnotebook.com/art/icon-title.png"></a>
[**Home**](http://sqlnotebook.com/index.html) &nbsp;&nbsp;[**Download & Install**](http://sqlnotebook.com/install/setup.exe) &nbsp;&nbsp;[**Documentation**](http://sqlnotebook.com/doc.html) &nbsp;&nbsp;[**GitHub**](https://github.com/electroly/sqlnotebook)

<a href="http://sqlnotebook.com/art/screenshot.png" target="_blank"><img src="http://sqlnotebook.com/art/screenshot-thumb.png" align="right" style="margin-left: 10px; margin-bottom: 10px;"></a>
SQL Notebook is a Windows desktop application for **ad hoc data exploration and manipulation**. Fundamentally, it is a frontend for the SQLite database engine. The notebook file is an SQLite database and the SQL language is used to interact with data. SQLite is extended to support the following features:

- **Microsoft SQL Server**, **PostgreSQL**, and **MySQL** servers can be linked into the notebook and queried interchangeably with local tables. Remote data is not physically copied into the notebook file unless requested; instead, the data source is queried on-the-fly. Any combination of data sources can be used together in the same SQL query.
Expand Down Expand Up @@ -31,3 +31,9 @@ SQL Notebook requires 64-bit Windows 7 or higher. .NET Framework 4.6 and the Vi
### Building from Source

Visual Studio 2015 must be installed with support for both C# and C++. PowerShell 3 or higher is also required. When building on Windows 7, you must install the latest PowerShell and reboot before building SQL Notebook. Once the prerequisites are installed, open `src\SqlNotebook.sln` and build the solution.

### License

SQL Notebook is available under the <a href="http://sqlnotebook.com/license.html">MIT license</a>.

Copyright © 2016 Brian Luft
2 changes: 2 additions & 0 deletions web/.gitignore
@@ -0,0 +1,2 @@
site/
temp/
13 changes: 13 additions & 0 deletions web/doc.md
@@ -0,0 +1,13 @@
# Documentation

SQL Notebook ships with an in-app searchable help system that includes all of the documentation listed here. Press F1 inside the application to see the list of help topics.

## SQLite Documentation

There is extensive documentation available for SQLite, the engine underlying SQL Notebook.
<a href="https://www.sqlite.org/docs.html">Click here to view the SQLite documentation</a>.

## SQL Notebook Help

- [Structured Programming in SQL Notebook](extended-syntax.html)
- [Error Functions](error-functions.html)
9 changes: 9 additions & 0 deletions web/error.html
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Error</title>
</head>
<body>
<p>There was a problem with your request.</p>
</body>
</html>
Binary file added web/favicon.ico
Binary file not shown.
49 changes: 49 additions & 0 deletions web/generate-site.ps1
@@ -0,0 +1,49 @@
# must have pandoc installed.
function ReadFile($filePath) {
$utf8 = New-Object System.Text.UTF8Encoding($False)
return [System.IO.File]::ReadAllText($filePath, $utf8)
}

function WriteFile($filePath, $text) {
$utf8 = New-Object System.Text.UTF8Encoding($False)
[System.IO.File]::WriteAllText($filePath, $text, $utf8)
}

function MdToHtml($markdownPath) {
Remove-Item .\temp\md.html -ErrorAction SilentlyContinue
pandoc -o .\temp\md.html "$markdownPath" | Out-Null
return (ReadFile .\temp\md.html)
}

function FormatPage($title, $content) {
$header = (ReadFile .\header.template.html)
$tmpl = (ReadFile .\generic.template.html)
return $tmpl.Replace("<!--TITLE-->", $title).Replace("<!--CONTENT-->", $content).Replace("<!--HEADER-->", $header)
}

function FormatMdPage($title, $mdPath) {
$html = (MdToHtml $mdPath)
return (FormatPage $title $html)
}

New-Item site -Type Directory -ErrorAction SilentlyContinue
New-Item site/art -Type Directory -ErrorAction SilentlyContinue
New-Item temp -Type Directory -ErrorAction SilentlyContinue

copy .\sqlnotebook.css .\site\
copy ..\art\*.* .\site\art\
copy .\error.html .\site\
copy .\favicon.ico .\site\

# index.html
$readme = (MdToHtml ..\readme.md)
$indexTmpl = (ReadFile .\index.template.html)
WriteFile .\site\index.html $indexTmpl.Replace("<!--CONTENT-->", $readme)

# markdown-based pages
WriteFile .\site\license.html (FormatMdPage "License" ..\license.md)
WriteFile .\site\doc.html (FormatMdPage "Documentation" .\doc.md)

# html-based pages
WriteFile .\site\error-functions.html (FormatPage "Error Functions" (ReadFile ..\doc\error-functions.html))
WriteFile .\site\extended-syntax.html (FormatPage "Structured Programming in SQL Notebook" (ReadFile ..\doc\extended-syntax.html))
12 changes: 12 additions & 0 deletions web/generic.template.html
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SQL Notebook - <!--TITLE--></title>
<link rel="stylesheet" href="sqlnotebook.css">
</head>
<body>
<!--HEADER-->
<!--CONTENT-->
</body>
</html>
2 changes: 2 additions & 0 deletions web/header.template.html
@@ -0,0 +1,2 @@
<p style="padding-bottom: 10px;"><a href="http://sqlnotebook.com/index.html"><img src="http://sqlnotebook.com/art/icon-title.png"></a><br />
<a href="http://sqlnotebook.com/"><strong>Home</strong></a> &nbsp;&nbsp; ➔ <a href="http://sqlnotebook.com/install/setup.exe"><strong>Download &amp; Install</strong></a> &nbsp;&nbsp; ➔ <a href="http://sqlnotebook.com/doc.html"><strong>Documentation</strong></a> &nbsp;&nbsp; ➔ <a href="https://github.com/electroly/sqlnotebook"><strong>GitHub</strong></a></p>
11 changes: 11 additions & 0 deletions web/index.template.html
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SQL Notebook</title>
<link rel="stylesheet" href="sqlnotebook.css">
</head>
<body>
<!--CONTENT-->
</body>
</html>
13 changes: 13 additions & 0 deletions web/sqlnotebook.css
@@ -0,0 +1,13 @@
body {
font-family: sans-serif;
margin: 0 auto;
width: 800px;
line-height: 150%;
}
a, a:visited {
color: #4078c0;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}

0 comments on commit 7cbdfa2

Please sign in to comment.