npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

blogger2ghost

v0.9.2

Published

Blogspot JSON migrator plugin for Ghost

Downloads

28

Readme

build status

blogger2ghost - Blogspot JSON migrator plugin for Ghost

blogger2ghost allows you to convert your Blogspot blog content into one compatible with Ghost.

Usage

Basic

  1. Set your blog's feed to Full in your Blogger.com dashboard: Settings | Other | Allow Blog Feed
  2. Get posts in JSON format from your blog using <your blog>/feeds/posts/default?alt=json&max-results=10000 and save it to some file (eg. data.json)
  3. $ npm install blogger2ghost -g
  4. $ blogger2ghost -i data.json > ghost.json
  5. Surf to ghost/settings/labs at your blog
  6. Use Import controls to import the data to your blog

Alternatively you can install and invoke it as a library (ie. $ npm install blogger2ghost and node_modules/blogger2ghost -i data.json)

Advanced

Remove tables from posts:

$ blogger2ghost -i data.json > ghost.json --remove-tables

Supply authors for multi-user Ghost:

This will attribute imported posts to existing users, you should first create the users within Ghost.

  1. Create authors.json file e.g.:

    {
        "John Smith": { // key should match author name from blogger
            "id": 7, // id is arbitrary
            "email": "[email protected]" // email is used for lookup, must exist
        },
        "Jane Doe": {
            "id": 8,
            "email": "[email protected]"
        }
    }
  2. Run $ blogger2ghost -i data.json > ghost.json -a authors.json

Download images from Blogger:

This will download all images from existing Blogger posts and place them into a directory ready for upload to Ghost. It will also replace urls with normalised paths that will load from the local content directory of Ghost.

# 'blogger-images' directory will be created
$ blogger2ghost -i data.json > ghost.json -d blogger-images --download-limit 10

Custom

var convert = require('blogger2ghost');

// json to convert goes to first
// options (authors etc.) go to second param
// extension callback as third
convert({...}, {}, function(data, post) {
    // manipulate data based on post fields (see blogger data content above)
    // you can see data fields available at https://github.com/tryghost/Ghost/wiki/import-format

    ...

    // once you are done with manipulation, return result
    return data;
});

Contributors

  • ekaragodin - Fixed post import with non latin titles and tags
  • homerjam - Prettification of the output, support for multiple authors and downloading images
  • Mark Baird - Downloaded images correctly, fix duplicate tags and allow post content to be left in HTML format
  • Murphy Randle - Updated to-markdown to use correct invocation
  • Kiko Beats - Removed extra newlines after images as that broke image links.

License

blogger2ghost is available under MIT. See LICENSE for more details.