Giter Site home page Giter Site logo

rapinoe's Introduction

megan rapinoe

Rapinoe

Rapinoe helps you parse Apple Keynote files.

Primarily it's designed to help you access the simple metadata of a Keynote file: return how many slides there are, extract the slide previews baked into the file, tell you various details about the file itself on disk, and so on.

Install

First you'll need ImageMagick. If you use Homebrew, you'll be fine with a quick:

brew install imagemagick

Then install the gem:

gem install rapinoe

Usage

rapinoe = Rapinoe.new('talks/Literal Best Player Ever.key')
# => <Rapinoe::Keynote: @name="Literal Best Player Ever", @path="talks/Literal Best Player Ever.key", @data=[…]>

rapinoe.write_preview_to_file("my_dope_talk.jpg")
# => Writes the higher quality 1024px-width preview of your entire deck to a file

rapinoe.slides
# => [<Rapinoe::Slide>, <Rapinoe::Slide>, <Rapinoe::Slide>, <Rapinoe::Slide>]

rapinoe.slides.first.write_preview_to_file("/tmp/slide-preview.jpg")
# => writes the Keynote-generated slide preview to a file

rapinoe.widescreen?
# => true

rapinoe.colors
# Returns the dominant colors in the first title slide by percentage order. Keys
# are in RGB format.
#
# => {[108, 190, 212]=>0.9550793650793651, [117, 124, 143]=>0.012619047619047618, [125, 83, 100]=>0.010158730158730159, [143, 23, 33]=>0.009603174603174603, [151, 10, 16]=>0.007301587301587302, [133, 49, 62]=>0.005238095238095238}

rapinoe's People

Contributors

holman 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.