Coder Social home page Coder Social logo

py-svg-card-gen's Introduction

Py-svg-card-gen

A python script that automates the process of generating card-type graphics in svg format based on svgwrite.

Getting Started

Py-svg-card-gen is a kit for reading csv files and creating card-type graphics on predifined templates. There are two version included, a Cmd type App that has a prompt and can be used to test your settings and a class type script that can be used in your own scripts.

Cmd_app.py

Launch a prompt that has the following commands:

read_file {filename}

Read csv file and print last item from lines

count_file {filename}

Read csv file and count items and print sum

item_from {filename}

Read csv file, define line of source to be used and print last item

sqr3 {filename}

Read csv file, define line of source to be used and create type one square 3x3 svg card

sqr3m {filename}

Read csv file, define line of source to be used and create type two square 3x3 svg card (text in the middle)

sqr3_all {filename}

Read csv file, create type one svg cards for every line

sqr3m_all {filename}

Read csv file, create type two svg cards for every line, text in the middle

quit

Quit this app

info

For this list of commands

help

build-in Cmd help

Script.py

A script that has a class named card that gets 3 arguments:

card(data,data_row,filename)

data (csv file to read) data_row (line of csv file to read) filename (svg file output card)

and has 2 methods:

sqr3(self)

create type one svg cards from data_row

sqr3m(self)

create type two svg cards from data_row

Prerequisites

This Project needs Python 2.x and svgwrite installed.

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.