Add mysql2sqlite submodule and script for making a sqlite database out of the mysql dumps. This will be used to create html archives of the forum.
This commit is contained in:
parent
51e9782c7e
commit
7026bc2b34
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "mysql2sqlite"]
|
||||
path = mysql2sqlite
|
||||
url = https://github.com/dumblob/mysql2sqlite.git
|
14
forum/create_sqlite_database
Executable file
14
forum/create_sqlite_database
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
SQLITE_OUT=forum.sqlite
|
||||
AWK=awk
|
||||
|
||||
if command -v mawk &> /dev/null; then
|
||||
AWK=mawk
|
||||
fi
|
||||
|
||||
$AWK -f ../mysql2sqlite/mysql2sqlite structure.sql | sqlite3 -echo $SQLITE_OUT
|
||||
$AWK -f ../mysql2sqlite/mysql2sqlite misc_data.sql | sqlite3 -echo $SQLITE_OUT
|
||||
$AWK -f ../mysql2sqlite/mysql2sqlite categories.sql | sqlite3 -echo $SQLITE_OUT
|
||||
$AWK -f ../mysql2sqlite/mysql2sqlite boards.sql | sqlite3 -echo $SQLITE_OUT
|
||||
$AWK -f ../mysql2sqlite/mysql2sqlite threads.sql | sqlite3 -echo $SQLITE_OUT
|
||||
#cat threads.sql | sqlite3 $SQLITE_OUT
|
1
mysql2sqlite
Submodule
1
mysql2sqlite
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 2a759df79092f42893bff593beb685a2dc0a9607
|
Loading…
x
Reference in New Issue
Block a user