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

blogger-image

v1.1.1

Published

A fast, free tool for hassle-free photo uploads to your blog using a simple API.

Downloads

10

Readme

blogger image

:arrow_up: blogger-image helps you upload photos to blogger using simple api

install

npm i blogger-image
// or 
yarn add blogger-image

Usage

import Uploader from 'blogger-image'


const POST_ID = "https://www.blogger.com/blog/post/edit/.../...";

const uploader = new Uploader(
  POST_ID,
  {
    userDataDir: '/home/username/.config/chromium',
    // it is recommended to use an old version of chromium instead of the default browser.
    executablePath: '/home/username/.config/chrome-linux/chrome',  
  }
);
  
await uploader.init();

const result = await Promise.all([
  uploader.upload('./tree.png'),
]);

console.log(result);

// the `upload` method will not be available after this.
uploader.close();

kowen Issues

This package depends on puppeteer, which uses the latest version of Chromium.
The latest Chromium has problems with persistent login sessions, which may cause errors or unexpected behavior.
To avoid this, you need to use an old version on chromium and provide the "executablePath" option in your "new Uploader()" call, pointing to the path of the Chromium executable.

Follow the next instructions if you want to download an older version of Chromium and use it with the package.

Download an Old version of Chromium

cd ~/.config
wget "https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F962947%2Fchrome-linux.zip?generation=1643115368404678&alt=media" -q  --show-progress -O chrome_2f962947.zip
unzip chrome_2f962947.zip

Login to Blogger

This will open the The version that we just downloaded.

cd chrome-linux; ./chrome
  • Go to blogger.com
  • Login
  • Close the browser
pwd

Copy the result becuase you're gonna need it in excutablePath.
It should be /home/{username}/.config/chrome-linux where {username} is your username.

Add it to the options.


const uploader = new Uploader(
  POST_ID,
  {
    userDataDir: '/home/username/.config/chromium',
    executablePath: '/home/username/.config/chrome-linux/chrome', // recomnded
  }
);

await uploader.init();