Remove deprecated scripts
Pandoc can just display Textile directly.
This commit is contained in:
parent
80aa25c7d1
commit
49dd8f6396
|
@ -1,24 +0,0 @@
|
||||||
sqlite3 = require "lsqlite3"
|
|
||||||
|
|
||||||
db = assert sqlite3.open "../db/posts.db"
|
|
||||||
|
|
||||||
update_stmt = assert db\prepare "UPDATE Posts SET mdown=? WHERE id=?"
|
|
||||||
|
|
||||||
db\exec [[ BEGIN TRANSACTION; ]]
|
|
||||||
|
|
||||||
for post in db\nrows "SELECT * FROM Posts"
|
|
||||||
with fout = io.open "../raw/posts/#{post.id}.textile.md", "r"
|
|
||||||
unless fout
|
|
||||||
db\exec [[ ROLLBACK; ]]
|
|
||||||
error "can't open #{post.id}.textile.md"
|
|
||||||
|
|
||||||
body = fout\read("*a")
|
|
||||||
|
|
||||||
do
|
|
||||||
update_stmt\bind_values body, tonumber(post.id)
|
|
||||||
update_stmt\step!
|
|
||||||
update_stmt\reset!
|
|
||||||
|
|
||||||
fout\close!
|
|
||||||
|
|
||||||
db\exec [[ COMMIT; ]]
|
|
|
@ -1,8 +0,0 @@
|
||||||
sqlite3 = require "lsqlite3"
|
|
||||||
|
|
||||||
db = assert sqlite3.open "../db/posts.db"
|
|
||||||
|
|
||||||
for post in db\nrows "SELECT * FROM Posts"
|
|
||||||
with fout = io.open "../raw/posts/#{post.id}.textile", "w"
|
|
||||||
fout\write post.body
|
|
||||||
fout\close!
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
cd ../raw/posts
|
|
||||||
|
|
||||||
for file in *.textile
|
|
||||||
do
|
|
||||||
pandoc -r textile -w markdown_github -o "$file".md $file
|
|
||||||
done
|
|
Loading…
Reference in New Issue