Git Product home page Git Product logo

paperboy's Introduction

Paperboy!

Paperboy is a slack bot that's going to grow to help us around the newsroom. Right now his killer feature is the ability to crawl gryphon and watch for new articles, PMing the author of the article when it finds a new one. Eventually, we'd like him to get smarter. I'm building this with some portability in mind, eventually maybe spinning his skills off into modules so he can be used by other gryphon customers and other newsrooms in general. For now though, he's pretty specific to our needs.

The near future

  • Actually finish the core crawl and notify functionality
  • Notify multimedia authors when the articles their stuff is attached to run

Configuration

settings.json should point to the relative paths of the documents that store users, previously found articles, and sections and their associated URLs.

  • users.json should contain a JSON object literal where the author's name as it appears in gryphon is the key and their slack username without the @ symbol should be the value
  • sections.json should contain a JSON object literal where the section's name is the key and the section's url with .json at the end is the value
  • array.json is automatically generated and stores the list of unique UID's that the bot has already seen so it doesn't just repeatedly remind people about old content that they've already published every time it scans. If you delete this, paperboy will ping every single author it can find with every single story they've written that still appears on the first page of the secion. It's stored as a JSON array literal, but internally when it's read it gets converted into a Set object then reconverted to an array when it needs to be written to the disk. I can't find much information about javascript's specific implementation of Set, but generally sets are better when one simply needs to check if it contains a certain unique member or not.

It's important that your slack token is in a text file simply called token with no extension that contains the following: module.exports = "a string literal of your token";

paperboy's People

Contributors

chuckdries avatar

Watchers

James Cloos avatar  avatar  avatar

paperboy's Issues

Improperly displayed special characters in slack message notifications

I know for a fact that I'm properly decoding the URLs on my side, as they display correctly when printed raw (at least when sent raw to the browser... perhaps logging would reveal a different result), but when bundled into slack messages something screws up. They're still escaped, just not completely with every necessary character. See images.

screen shot 2016-12-07 at 2 43 02 am
screen shot 2016-12-07 at 2 43 18 am

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.