Giter VIP home page Giter VIP logo

pokreate's Introduction

pokreate

A project to "open" and "close" a subreddit by setting it to restricted or public mode. It was specifically made for /r/PokemonCreate, so its application will be fairly narrow. The other half of what it does is replace a specific link text in the sidebar.

Installation

git clone https://github.com/jarhill0/pokreate.git

Requirements

  • praw

Setup

  1. Install the requirements (using pip or easy_install or your method of choice).
  2. Copy EXAMPLE_config.py to config.py and fill in the values. Subreddit and Username are mandatory. The other three may be left blank if you have a praw.ini configured. If you do, set username equal to the "site name" of your configuration.

Usage

Invoke the script at a basic level with the command python or the command python3 followed by a path to main.py. For example, if the script is in your current working directory, you can run it with python3 main.py. You can also call it with a relative or absolute path, same as any other file on the command line.

The script has mandatory options:

  • Provide exactly one of --open or --close (can be shortened to -o or -c, respectively)
  • Provide new button text, surrounded by quotes

Example usage:

python3 main.py -o "Submit your request"
python ~/pokreate/main.py --close "Closed for the week"
python3 /home/pi/pokreate/main.py --open "Welcome back!"

If you wish to run the script on a specific schedule, look into the UNIX utility crontab, which can be set up to run commands on a recurring basis.

pokreate's People

Contributors

jarhill0 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.