Giter VIP home page Giter VIP logo

ebooks's Introduction

Ebooks

Generate your own horse_ebooks by @busterbenson (original gist, blog post) and compiled as a gem by @parkr

Build Status Dependency Status Code Climate Gem Version License Badges

Installation

Add this line to your application's Gemfile:

gem 'ebooks'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ebooks

Configuration

The ebooks executable and Ebooks.read_config_file will load in a yaml file (~/.ebooks by default) if you want to set your own defaults.

Here are the gem's defaults:

:tweets_csv_path: 'tweets.csv'
:corpus_path:     'markov_dict.txt'
:dictionary_name: 'dictionary'
:twitter:
  :consumer_key: ''
  :consumer_secret: ''
  :oauth_token: ''
  :oauth_token_secret: ''

Usage

As an API:

config = Ebooks.configuration(my_overrides)

# Generate a sentence and return it
Ebooks.generate(config)

# Generate sentence and tweet it
Ebooks.tweet(config)

# Just tweet a sentence
Ebooks::Twitter.new(config[:twitter]).tweet(my_sentence)

As an executable:

# To generate a new horse_ebooks sentence:
ebooks generate

# To generate a new sentence and tweet it:
ebooks tweet

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

ebooks's People

Contributors

parkr avatar pezholio avatar 404pnf avatar

Stargazers

 avatar idevnull avatar Oluwole Oyekanmi avatar Rowe Morehouse avatar Brackson avatar Angus H. avatar  avatar Matthew Holmes avatar Nicky McCurdy avatar Devin Halladay avatar Andrew Nesbitt avatar Suriyaa Sundararuban avatar Jacky Alciné avatar Lyong2023 avatar Chris Peterson avatar Ray Holder avatar Ivan Varghese avatar  avatar Florian Harbecke avatar Mert Dumenci avatar Alex Akers avatar Daniel Martínez avatar Liam Wooding avatar Gosha Spark avatar matheus avatar Jérôme Foray avatar Gaurav Koley avatar Colby Aley avatar

Watchers

 avatar James Cloos avatar Lyong2023 avatar  avatar

ebooks's Issues

Idea: Allow for tweet confirmation?

Some of these sentences are kind of shitty/boring/blah. It'd been cool to be able to pass some sort of confirm switch that would allow the user to approve/deny the tweet

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.