Giter Site home page Giter Site logo

moonkite-ou / openbadges-bakery Goto Github PK

View Code? Open in Web Editor NEW

This project forked from daenarya/openbadges-bakery

0.0 0.0 0.0 35 KB

Python module for baking and unbaking Open Badges via command line or python interface.

License: Apache License 2.0

Python 100.00%

openbadges-bakery's Introduction

Open Badges Bakery

This package contains the utilities needed to "bake" Open Badges metadata into PNG or SVG image files or extract ('unbake') metada from such images.

This Open Badges Bakery is produced by Concentric Sky. https://concentricsky.com

Installation

pip:

pip install openbadges_bakery

Command Line Interface

There is a command line interface for baking and unbaking assertion data.

To bake a badge, identify the existing BadgeClass image with the input_filename and desired baked Assertion image filename to be created as well as the data to be baked into the image.

bakery bake [input_filename] [output_filename] --data='{"data": "data"}'

To extract Open Badges data from an image, use the unbake command.

bakery unbake [input_filename]

Output_filename is optional if you want the baked data to be written to a file.

bakery unbake [input_filename] [output_filename]

Python Interface

The bake and unbake functions are available when installed as a python module

To bake a badge, pass in an open file as input_file and the string of the badge data you wish to bake into the image. Result is an open TemporaryFile that contains the data.

from openbadges_bakery import bake
output_file = bake(input_file, assertion_json_string)

To unbake a badge, pass in an open file as input_file:

from openbadges_bakery import unbake
output_file = unbake(input_file)

openbadges-bakery's People

Contributors

ottonomy avatar iankpconcentricsky avatar viktorhaag 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.