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

@ts-ghost/ghost-blog-buster

v0.6.16

Published

Elegant interactive CLI to export your Ghost Blog Content to a static website, format in Markdown, JSON...

Downloads

11

Readme

License

Screen Shot

About The Project

Ghost Blog Buster is an interactive CLI allowing you to interact with your Ghost Blog directly via the Ghost Content API. From the cli you will be able to:

  • 🌪️ Choose between Content API or Admin API (for members or blog post content behind subscribption)
  • 📚 Export specific or all blog Posts in Markdown format to the folder of your choice.
  • ⚙️ Display or export to JSON your Tags, Tiers, Authors, Members (Admin API only)
  • 📶 Connect / Disconnect from the Blog

Compatible Ghost versions.

This tool was developped and tested mostly for Ghost versions 5.x.

  • Ghost 5^

Built With

Basic usage

Use directly with npx

npx @ts-ghost/ghost-blog-buster

Or install globally

npm install -g @ts-ghost/ghost-blog-buster

Then, in a new SHELL session, launch with

ghost-blog-buster

Advanced usage

If you want to bypass the interactive prompts, you can use the CLI with pipeable commands.

Export content with export <resource>

For example if we already configured the URL and the Content API key, we can export all the posts to the ./posts folder with the following command:

ghost-blog-buster export posts --output ./posts

Options available

  • --host or -h: The URL of the blog (if not provided, it will check your config file that is filled by the interactive prompt)
  • --key or -k: The Content API key (if not provided, it will check your config file that is filled by the interactive prompt)
  • --output or -o: The destination folder. If no output is provided, content will go to stdout.

Full example:

ghost-blog-buster export posts --host https://astro-starter.digitalpress.blog --key e9b414c5d95a5436a647ff04ab --output ./posts

Available export

Display help

ghost-blog-buster --help

Export content from Admin API with export-admin <resource>

This export use the Admin API and require you to provide the Admin API key. An Admin API key is different from the Content API key. You can either use a Staff access token, visible at the bottom of a Ghost User profile or you can find it in your Ghost Admin panel, in the Integrations section.

This is useful if your Blog Posts contain a free preview, paid content and you want to export everything.

ghost-blog-buster export-admin posts --output ./posts

Options available

  • --host or -h: The URL of the blog (if not provided, it will check your config file that is filled by the interactive prompt)
  • --key or -k: The Content API key (if not provided, it will check your config file that is filled by the interactive prompt)
  • --output or -o: The destination folder. If no output is provided, content will go to stdout.

Full example:

ghost-blog-buster export-admin posts --host https://astro-starter.digitalpress.blog --key 1efedd9db174adee2d23d982:4b74dca0219bad629852191af326a45037346c2231240e0f7aec1f9371cc14e8 --output ./posts

Available export-admin <resource> resources:

  • posts
  • pages
  • members

Example piping commands

You can use > to pipe the content into a file or something else.

ghost-blog-buster export authors --host https://astro-starter.digitalpress.blog --key e9b414c5d95a5436a647ff04ab > authors.json

Roadmap

  • [ ] Interact with more content
  • [ ] Customize the frontmatter output
  • [x] Usage without interactive prompts, pipeable cmds

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  • If you have suggestions for adding or removing projects, feel free to open an issue to discuss it, or directly create a pull request after you edit the README.md file with necessary changes.
  • Please make sure you check your spelling and grammar.
  • Create individual PR for each suggestion.
  • Please also read through the Code Of Conduct before posting your first idea as well.

License

Distributed under the MIT License. See LICENSE for more information.

Authors

Acknowledgements

  • Ghost is the best platform for blogging 💖.
  • Clack to build beautiful prompts.