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

rpost

v1.0.3

Published

A CLI that helps you to submit a reddit post to multiple subreddits

Downloads

12

Readme

rpost

npm npm David

A CLI that helps you to submit a reddit post to multiple subreddits. The script will automatically wait between submissions to conform with Reddit rules (so you don't have to manually wait, just run the script and that's it).

Installation

$ npm install -g rpost

Getting client ID and secret

Before running the script, you need to get a client ID and secret from your Reddit profile first. You can do it as follows:

  1. Login to Reddit
  2. Go to https://www.reddit.com/prefs/apps
  3. Scroll down, click the "create an app" button
  4. Enter the following for the fields:
    • Name: anything (won't be used)
    • Type: script
    • Description: leave it blank
    • About URL: leave it blank
    • Redirect URL: any valid URL (i.e. https://reddit.com)
  5. Click create app
  6. Take a note of the client ID (below the app title) and the client secret. Make sure to keep them confidential.

Running the script

Usage:

$ rpost [-u <redditUserName>] [-p <redditPassword>] [-ci <clientId>] [-cs <clientSecret>] [-t <type>] [-pt <postTitle>] [-px <postText>] [-pu <postUrl>] [-s <subreddits>]

Arguments (all required):

  • -u redditUserName: your Reddit username
  • -p redditPassword: your Reddit password
  • -ci clientId: client ID. See Getting client ID and secret for more details.
  • -cs clientSecret: client secret. See Getting client ID and secret for more details.
  • -t type: post type (link/text).
  • -pt postTitle: post title.
  • -px postText: post text. Required only if post type is text.
  • -pu postUrl: post URL. Required only if post type is link.
  • -s subreddits: comma separated list of subreddits (without the r/ prefix).

If you miss some of the arguments on the first invocation, don't worry, you will be prompted to fill them after you hit enter.

Environment variables

Alternatively, to avoid having to enter the arguments every time you run the program, you can also set the values as environment variables. The variable name should be "rpost_" plus the argument name specified in the above list. Example: rpost_redditUserName, rpost_redditPassword, etc.

Links

Contributing

License