Skip to content

Ghost Importer#100

Merged
parkr merged 7 commits intojekyll:masterfrom
gr4y:master
Dec 8, 2013
Merged

Ghost Importer#100
parkr merged 7 commits intojekyll:masterfrom
gr4y:master

Conversation

@gr4y
Copy link
Contributor

@gr4y gr4y commented Dec 6, 2013

Hey there,

I quickly hacked together an Importer for the Ghost SQLite Database. 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a not to 'Database file' that it defaults to ./ghost.db?

@parkr
Copy link
Member

parkr commented Dec 6, 2013

Looks awesome!! Thanks so much for writing this :)

Would you please split the process method into smaller methods that process calls? Easier to maintain that way :)

@gr4y
Copy link
Contributor Author

gr4y commented Dec 6, 2013

@parkr Sure. I just realized that the ghost importer even imports the drafts, but doesn't move it to the _drafts directory, so I am currently working on that.

@parkr
Copy link
Member

parkr commented Dec 6, 2013

@gr4y you rock. thanks!

@gr4y
Copy link
Contributor Author

gr4y commented Dec 6, 2013

@parkr There we go. The importer now copies drafts to the _drafts directory and the published posts to _posts. One question I ask myself: Why should the --dbfile option be mandatory when it defaults to `ghost.db? Shouldn't I remove that line of code?

@parkr
Copy link
Member

parkr commented Dec 7, 2013

It doesn't need to be mandatory if you're ok with having a default. :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very interesting way to approach this. What's your primary dev language? Looks very Python/C :)

What do you think of the following?

filename = File.join(directory, "#{date.strftime('%Y-%m-%d')}-#{post[:slug]}.markdown")

It's a bit more idiomatic to Ruby (but that doesn't mean we have to do it that way)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied that line from the Joomla Importer, but I think you are right. The File.join approach is a little more descriptive and easier to read. I updated my branch.

I would consider Ruby as my primary language, cause I write most of my stuff in Ruby, but I am also writing Java and PHP when I have to.

@parkr
Copy link
Member

parkr commented Dec 7, 2013

Looking really great so far!

@mattr-
Copy link
Member

mattr- commented Dec 7, 2013

👍 so far. Really excited about this. 😃

@gr4y Should we consider this complete now?

@gr4y
Copy link
Contributor Author

gr4y commented Dec 7, 2013

@parkr I removed the self.validate stub completely, cause --dbfile has a default.
@mattr- Yes, I would consider it complete! 😀

@parkr
Copy link
Member

parkr commented Dec 7, 2013

Looks so good. Would you please add tests? Once those are in place, I'll merge :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No one will see this note -- remove it? 😄

parkr added a commit that referenced this pull request Dec 8, 2013
@parkr parkr merged commit 488e713 into jekyll:master Dec 8, 2013
parkr added a commit that referenced this pull request Dec 8, 2013
@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants