Git Product home page Git Product logo

onemus-cardmaker's Introduction

onemus-cardmaker scrapes a google doc and outputs cards.

Installation

Grab the sourcecode and run

bundle install

Place the authorization .json that you get from the google_drive gem authorization in the config folder.

If you are running on Windows, you might have some SSL errors (Mac might too but the solution to that is to rebuild Ruby). I was able to solve my errors by pointing to a "cert.pem", available as "cacert.pem" in several places. The only one that actually worked for me was the one found by installing msys64 and looking in /usr/ssl. You can set SSL_CERT_FILE to the cert.pem found in msys/usr/ssl and SSL_CERT_DIR to the certs directory found there as well.

Reference

Card hardcoded fields

aspect - Determines the color for aspect-segmented cards.

name - Name of the card. Required for indexing purposes.

Fields

align - Text alignment (left, center, right)

color - Name of color template. Defined in a different yaml whose roots are globals and aspects. Globals are the same regardless, aspects change based on aspect:

  globals:
    border: '#000'
    none: '#0000'

  aspects:
    n:
      name: anger
      color:
        base: '#911'
        text: '#000'

combine - How the field is combined with the fields underneath

crop - Whether to crop to size. Resizes otherwise

dropshadow - Applies a drop shadow to the field

  • blur - How much to blur the shadow
  • x - Transpose X
  • y - Transpose Y

font - Font of the text

image - Image for image/icon type fields

images - character to match: image. Used in aspect_icon

outline - Outline for text fields

  • color - Color
  • stroke - Stroke width (how large the outline is)

poly-mask - Apply an *gon mask to the field

rotate - Degrees the field is rotated

round - How much the corners are rounded (more is more round)

side - Length of a side (used with *gon type)

sizex - Width

sizey - Height

textsize - Text size

tile - Is the image tiled? Defaults to false

tilex - Width of each tile if tile is true

tiley - Height of each tile if tile is true

type - Type of the component

  • aspect_icon - Like an icon, but changes the icon based on the aspect of the card
  • *gon - Paints a *-sided regular polygon
  • icon - Paints a static image
  • image - Paints a card-dependent image
  • rect - Paints a rectangle
  • rounded - Paints a rectangle with rounded border
  • static - Paints static text. This text should be defined in a different yaml whose root is texts
  • text - Paints card-dependent text

x - X position of the component

y - Y position of the component

z-index - Stacking order of the field

Arithmetic Operators

The cardmaker supports simple arithmetic with +, -, min (annotated as <), and max (annotated as >).

Order of operations works as normal for + and -, but the < and > operators take precedence.

Ex:

3+4=7

Ex2:

3+4<3+5=12
# 4<3 is calculated first (max of 4 and 3), then the rest of the arithmetic is performed

Ex3:

field1.x+field1.sizex
# Common usage

onemus-cardmaker's People

Contributors

bkovacik avatar dependabot[bot] avatar

Watchers

James Cloos 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.