I started my original blog way back when…on blogger or blogspot or something. Then had a Wordpress site for a while. Then very briefly transferred everything over to a Ghost blog I was running on a digital ocean droplet. And now transferring to this jekyll/github pages blog. I hope it’s an easy process?
- Seems straightforward enough.
- Of course have to install
- Needed to add to the gem file:
If you're using bundler: 1. Add 'gem "sequel"' to your Gemfile 2. Add 'gem "sqlite3"' to your Gemfile 3. Run 'bundle install'
- Oops, ran
bundle installby sudo-ing and got:
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
- Wondering how to reverse that…Maybe this? Meh forgetting for now.
- Getting the following error:
SQLite3::CantOpenException: unable to open database file (Sequel::DatabaseConnectionError
- Going through options here.
- Double checked the db file I’m looking at using sqlitebrowser, everything seems to be there.
- Next going through the jekyll-importer source to see if there’s something weird that needs updating.
- Actually, just ran the importer from the folder with the
ghost.dband without specifying the file path and it seemed to work okay…Or half-way. It has all the dates wrong and just set everything to epoch time…so back to the source.
- So…I suspect it’s because the Ghost importer is attempting to convert the database times from milliseconds via
Time.at(), when from the looks of the database, it’s stored in straight-up
DateTime, not a millisecond integer or whatever? Unless there’s some sort of conversion going on under the hood. In any case, I think I need to muck around in the source. And how do I open installed gems locally…see here and here. Specifics here.
- There was a minor distraction while creating a new service for copying paths directly from finder.
- Oops, wrong directory.
- Hmm, forgot
jekyll-importisn’t actually in the
- Looking more into local overrides…
- Hmm, learning a bunch about monkey patching, haha…but ultimately didn’t go with this.
- Sidepath: Resetting IRB – https://stackoverflow.com/questions/10271676/reset-irb-console
- Ended up just editing the line I needed in the gem directly, just to run what I needed, literally just:
# the publish date if the post has been published, creation date otherwise # The database stores timestamps in milliseconds, so we need to divide by 1000 # to get time in seconds. #date = Time.at(post[draft ? :created_at : :published_at].to_i / 1000) date = post[draft ? :created_at : :published_at]