Skip to content

Commit

Permalink
Merge branch 'master' of github.com:srnd/posters
Browse files Browse the repository at this point in the history
  • Loading branch information
tylermenezes committed Jan 8, 2020
2 parents ef9ead9 + e7ea62c commit 327deb7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# posters
It makes posters
posters.srnd.org
# Posters
Live @ [posters.codeday.org](https://posters.codeday.org)

This system automatically generates posters for CodeDay events, using data from clear. To add more templates, please see the [template repo](https://github.com/srnd/CodeDayPosterTemplates/)
3 changes: 2 additions & 1 deletion api/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def __init__(self, data, promo=None, promoFor=None):
self.year = self.start.strftime('%Y')
self.webname = self.current_event['webname']
self.url = self.current_event['webname']
self.name = self.current_event['region_name']

def get_cache(self, file_format, template_name='', full=True):
basedir = os.path.dirname(os.path.realpath(__file__)) if full else ''
Expand Down Expand Up @@ -83,7 +84,7 @@ def make_poster_png(self, template_name):
f_out = self.get_cache('png', template_name)

with open(os.devnull, 'wb') as devnull:
subprocess.check_call(['inkscape', '-z', '-w', '600', '-f', f_in, '-e', f_out], stdout=devnull, stderr=subprocess.STDOUT)
subprocess.check_call(['inkscape', '-z', '-f', f_in, '-e', f_out], stdout=devnull, stderr=subprocess.STDOUT)

def make_posters(self,templates=env.list_templates()):
for template_name in templates:
Expand Down

0 comments on commit 327deb7

Please sign in to comment.