Giter Club home page Giter Club logo

random_wiki's Introduction

random_wiki
Matt Nichols

random_wiki is a Python script which tweets the first sentence of a random Wikipedia article and a shortened link to said article several times a day. Using several rules, the script attempts to generate an aesthetic tweet (avoiding common garbage from in-process pages, uncommon formattings, and the like), and determine a reasonable amount of time to wait before tweeting again (randomly, between two and four hours).

Known issues:

- Sentence endings are determined using periods, but excepting circumstances to which any of several rules apply ("Dr.", "U.S.A.", or "Ph.D." are examples where this is necessary). However, there's no way I've catalogued all possible abbreviations, so there will inevitably be some errors here.
- The body of the article is found by the first <p> segment of the Wikipedia webpage, but occasionally a page will have an infoboxe which precedes the actual body of text in the markup, and have content which can be mistaken for the article's real beginning. The "Synonyms" section of some pages is an example. As a workaround, random_wiki will not post from pages including these infoboxes, but eventually I'll incorporate a HTML parser for even more intelligent first sentence identification.
- This readme could be more detailed.

random_wiki's People

Watchers

 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.