Code Monkey home page Code Monkey logo

tapp's Introduction

TAPP

Totally Automated Propaganda Producer

This package contains scripts to be used to produce marketing materials for the Carnegie Mellon University Computer Club.

A copy of this repository is available to club members at /afs/club.cc.cmu.edu/projects/tapp. Users can edit the data directory and run the scripts as needed.

Requirements

Before running these scripts, you must install pip, a Python package manager. If you'd like to keep TAPP's dependencies in their own virtual environment (or "venv"), separate from the rest of your Python toolchain, you'll also want the python3-venv package for your operating system.

Then, to create a venv and install all of the necessary modules on your system, run:

python3 -m venv .venv/ --prompt tapp
source .venv/bin/activate
pip3 install -r requirements.txt

If you use a venv, make sure to activate it before running any of TAPP's generators.

Alternatively, if you don't mind polluting your local user environment:

pip3 install --user -r requirements.txt

Produce All the Propaganda!

To produce all of the propaganda for a semester, check the variables at the top of the Makefile and run:

make

With the proper AFS permissions, the files can be published to the web using:

make publish

Generating Individual Files

Talk Series

See data files such as data/2015-08_F15-talks.json for input reference. Use 0 as the cat value for weeks without a talk due to holidays, etc.

A cat value for each talk is required and relates to how it is colored on the posters; however, the categories array is optional and relates to how the schedule is rendered on the web. If the cat values are not logically contiguous (see Fall 2016 as an example), it is best to dispense with the categories.

Posters

Usage:

python3 -m tapp.talks.svg_gen -i foo.json -o bar.svg [-g]

The file 2015logo_light.svg must be in the same directory as the output file to display properly. Additionally, the filename given in the sponsor_logo field must be relative to the output file.

Use -g to generate a grayscale version more suitable for mass printing than the full-color version. In some browsers, logos may remain in color.

iCalendar File

Usage:

python3 -m tapp.talks.ics_gen -i foo.json -o bar.ics

Webpage

Usage:

python3 -m tapp.talks.php_gen -i foo.json -o bar.php

Club Overview Flyers

See data files such as data/2015-08_F15-flyer.json for input reference.

Usage:

python3 -m tapp.flyer.svg_gen -i foo.json -o bar.svg

The files 2015logo_light.svg and cmucc_qr.svg must be in the same directory as the output file to display properly.


Printing SVGs

Generated SVGs are intended to be viewed and printed from Google Chrome. Talk Series posters are best printed to tabloid (17"x11") paper, landscape orientation, with margins set to 0.25" on the left and right, 0.2" on top, and 0" on bottom. Club Overview flyers are best printed to letter (8.5"x11") paper, portrait orientation, with the "minimum margins" setting. For the most consistent results, print to a PDF.

In some cases, when attempting to open the SVGs in other tools, the transcluded logos can cause issues. As a workaround, manually remove the <image> tags from the SVG output, and replace them using an SVG editor such as Inkscape. Ensure all required fonts are installed, resize to desired output size, and print.

tapp's People

Contributors

timparenti avatar scgruber avatar haoxuany avatar aresh-p avatar

Stargazers

 avatar  avatar

Watchers

 avatar John Blaas avatar James Cloos avatar Lin Zhong avatar  avatar Christian Preseau avatar Che-Huai Lin avatar Sroaj Sosothikul avatar Spencer Baugh avatar  avatar

tapp's Issues

Generate PDFs directly instead of SVGs

The additions in c34199f summarize workarounds employed by @catern to convert the output of the SVG generators into PDFs suitable for printing.

We should probably be aiming to generate PDFs directly. Python packages exist to help with this, including pyfpdf and pdfrw, but those don't seem to have been updated in a while.

Allow single event location override

The talk on 2015-03-18 was moved from its regularly recurring location due to unprecedented interest and attendance. Since it was late in its series, we simply manually adjusted the necessary files to advertise this fact properly.

Since the upcoming talk on 2015-09-09 is similarly moved, is toward the beginning of its series, and we may be regenerating the content a few more times yet (particularly to fill in "Your Talk Here" slots), we should more fully support individual talks having their own location that "overrides" the typical location, specifically for the webpage and iCalendar feeds.

Per-section poster designs

I've already started some work on this privately, but I feel this blocks on #3 and #10.

The idea is that there could be posters for each "section" of the talk series which invert the colors of the main poster for the whole semester. For example, if the first section of talks appear yellow on the black background in the main poster, another poster focusing on just that section would have black text on a yellow background.

Since there would be fewer talks on each of these posters, they would necessarily appear larger (like #10) but could probably also have short descriptions appear as well.

Store fonts locally

Web fonts are great, but they only work in the browser and when connected to the Internet. Several officers have run into a variety of related issues when opening the SVG files in different tools.

Completing #4 will make that less of an issue, but this is still good to have for accuracy in offline development, where placeholder fonts would otherwise be used.

Create "grayscale" option for posters

Per @catern's suggestion at the 2015-09-01 meeting, it would be nice if we could generate a version of the talk series poster more suitable for mass grayscale printing than the current full-color version (which, although it looks great, uses a lot of color ink due to its composite dark-gray background).

Ideally, this would be something more black-on-white which simply lists the talks in a similar format as the poster and could be printed to 8.5"×5.5" half-sheets (see #12 for paper size issues).

Use icalendar package in iCalendar generation

Currently, talk_series/ics-gen.py generates an iCalendar file by manual effort. Although most iCalendar implementations will probably read this with no problems, it technically isn't robust to things like character escapement as specified in RFC5545, §3.3.11.

We should use a Python library for the iCalendar format, such as the aptly named icalendar package, to generate the iCalendar file in a more robust way.

Use argparse for argument parsing

Instead of manually reading options and parsing them, the argparse module from python should be used to add more flexibiliy to give suggestions to bash completion.
I opened this issue just to indicate that I'm working on it.

Select poster format based on number of talks

Because we did not have a full semester's worth of talks scheduled before we needed to start advertising talks for the first half of Spring 2015, there was a need for a "short" series poster design, introduced in 904b2ec. This format works somewhat better for a smaller number of talks, like 7, as opposed to the normal 15.

Ideally, a single script would be able to intelligently select a suitable format for the posters based on the number of talks in the data.

There are a decent number of magic numbers in the generators related to the placement of elements in the SVG generators. A fix would abstract these out to variables and select their values accordingly.

Deduplicate/merge scripts

The individual scripts, in their initial and rushed form, have a lot of repetitive boilerplate code and generally fail to adhere to DRY principles.

We should deduplicate this code where appropriate, so that like scripts can better be merged, grouped, or otherwise coalesced.

Support multiple paper sizes

Per @stroucki on IRC (2015-01-20), "the talk poster is rather large to post and not be rude to others". We should be able to support a few paper sizes in addition to the standard 17"×11" tabloid size; namely, 11"×8.5" for smaller posters.

With that, we could also do 8.5"×5.5" half-sheets or 5.5"×4.25" quarter-sheets as needed, since those are the same ratios as the above.

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.