Class: JekyllImport::Importers::Ghost
Class Method Summary
collapse
inherited, run, stringify_keys, subclasses
Class Method Details
.process(options) ⇒ Object
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/jekyll-import/importers/ghost.rb', line 20
def self.process(options)
posts = fetch_posts(options.fetch("dbfile", "ghost.db"))
unless posts.empty?
FileUtils.mkdir_p("_posts")
FileUtils.mkdir_p("_drafts")
posts.each do |post|
write_post_to_file(post)
end
end
end
|
.require_deps ⇒ Object
10
11
12
13
14
15
16
17
18
|
# File 'lib/jekyll-import/importers/ghost.rb', line 10
def self.require_deps
JekyllImport.require_with_fallback(%w(
rubygems
sequel
sqlite3
fileutils
safe_yaml
))
end
|
.specify_options(c) ⇒ Object
6
7
8
|
# File 'lib/jekyll-import/importers/ghost.rb', line 6
def self.specify_options(c)
c.option "dbfile", "--dbfile", "Database file (default: ghost.db)"
end
|