Clean up Enki importer and update History.

This commit is contained in:
Tom Preston-Werner 2011-05-09 00:59:40 -07:00
parent 0dc55aacff
commit f808c98232
3 changed files with 14 additions and 14 deletions

View File

@ -10,6 +10,7 @@
* Better error message for invalid post date (#291)
* Print formatted fatal exceptions to stdout on build failure
* Add Tumblr importer (#323)
* Add Enki importer (#320)
* Bug Fixes
* Secure additional path exploits

View File

@ -161,6 +161,7 @@ if ARGV.size > 0
:wordpress => 'Wordpress',
:csv => 'CSV',
:drupal => 'Drupal',
:enki => 'Enki',
:mephisto => 'Mephisto',
:mt => 'MT',
:textpattern => 'TextPattern',

View File

@ -17,10 +17,10 @@ module Jekyll
FROM posts p
EOS
# just working with postgres, but can be easily adapted
# to work with both mysql and postgres
# Just working with postgres, but can be easily adapted
# to work with both mysql and postgres.
def self.process(dbname, user, pass, host = 'localhost')
FileUtils.mkdir_p '_posts'
FileUtils.mkdir_p('_posts')
db = Sequel.postgres(:database => dbname,
:user => user,
:password => pass,
@ -28,7 +28,6 @@ module Jekyll
:encoding => 'utf8')
db[SQL].each do |post|
name = [ sprintf("%.04d", post[:date].year),
sprintf("%.02d", post[:date].month),
sprintf("%.02d", post[:date].day),
@ -46,6 +45,5 @@ module Jekyll
end
end
end
end # module Enki
end # module Jekyll
end
end