Clean up Enki importer and update History.
This commit is contained in:
parent
0dc55aacff
commit
f808c98232
|
@ -10,6 +10,7 @@
|
||||||
* Better error message for invalid post date (#291)
|
* Better error message for invalid post date (#291)
|
||||||
* Print formatted fatal exceptions to stdout on build failure
|
* Print formatted fatal exceptions to stdout on build failure
|
||||||
* Add Tumblr importer (#323)
|
* Add Tumblr importer (#323)
|
||||||
|
* Add Enki importer (#320)
|
||||||
* Bug Fixes
|
* Bug Fixes
|
||||||
* Secure additional path exploits
|
* Secure additional path exploits
|
||||||
|
|
||||||
|
|
|
@ -161,6 +161,7 @@ if ARGV.size > 0
|
||||||
:wordpress => 'Wordpress',
|
:wordpress => 'Wordpress',
|
||||||
:csv => 'CSV',
|
:csv => 'CSV',
|
||||||
:drupal => 'Drupal',
|
:drupal => 'Drupal',
|
||||||
|
:enki => 'Enki',
|
||||||
:mephisto => 'Mephisto',
|
:mephisto => 'Mephisto',
|
||||||
:mt => 'MT',
|
:mt => 'MT',
|
||||||
:textpattern => 'TextPattern',
|
:textpattern => 'TextPattern',
|
||||||
|
|
|
@ -17,10 +17,10 @@ module Jekyll
|
||||||
FROM posts p
|
FROM posts p
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
# just working with postgres, but can be easily adapted
|
# Just working with postgres, but can be easily adapted
|
||||||
# to work with both mysql and postgres
|
# to work with both mysql and postgres.
|
||||||
def self.process(dbname, user, pass, host='localhost')
|
def self.process(dbname, user, pass, host = 'localhost')
|
||||||
FileUtils.mkdir_p '_posts'
|
FileUtils.mkdir_p('_posts')
|
||||||
db = Sequel.postgres(:database => dbname,
|
db = Sequel.postgres(:database => dbname,
|
||||||
:user => user,
|
:user => user,
|
||||||
:password => pass,
|
:password => pass,
|
||||||
|
@ -28,7 +28,6 @@ module Jekyll
|
||||||
:encoding => 'utf8')
|
:encoding => 'utf8')
|
||||||
|
|
||||||
db[SQL].each do |post|
|
db[SQL].each do |post|
|
||||||
|
|
||||||
name = [ sprintf("%.04d", post[:date].year),
|
name = [ sprintf("%.04d", post[:date].year),
|
||||||
sprintf("%.02d", post[:date].month),
|
sprintf("%.02d", post[:date].month),
|
||||||
sprintf("%.02d", post[:date].day),
|
sprintf("%.02d", post[:date].day),
|
||||||
|
@ -46,6 +45,5 @@ module Jekyll
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end # module Enki
|
end
|
||||||
end # module Jekyll
|
|
||||||
|
|
Loading…
Reference in New Issue