Skip to content

Commit

Permalink
Add a PDF for the PyConFR schedule.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Sep 12, 2012
1 parent 3c29408 commit a74305b
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 3 deletions.
2 changes: 1 addition & 1 deletion exyr/__init__.py
Expand Up @@ -115,7 +115,7 @@ def stylesheet():
return app.response_class(css, mimetype='text/css')


STATIC_EXTENSIONS = ('.jpg', '.png', '.html')
STATIC_EXTENSIONS = ('.jpg', '.png', '.html', '.css', '.pdf')

# the repr() of a tuple matches the micro-syntax used by `any`
# http://werkzeug.pocoo.org/documentation/dev/routing.html#werkzeug.routing.AnyConverter
Expand Down
15 changes: 13 additions & 2 deletions exyr/pages/2012/weasyprint-at-pyconfr.markdown
@@ -1,16 +1,27 @@
title: WeasyPrint at PyConFR 2012
published: 2012-08-10
published: 2012-09-10
tags: [kozea, weasyprint]
public: true
summary: |
I’ll be [giving a talk](http://www.pycon.fr/2012/schedule/presentation/16/)
about WeasyPrint at PyConFR on Sunday.


I’ll be at PyConFR in Paris this weekend, the 15th and 16th September.
I’ll be at PyConFR in Paris this weekend, September 15th and 16th.
I’ll be [giving a talk](http://www.pycon.fr/2012/schedule/presentation/16/)
Sunday 16th at noon, on [WeasyPrint](http://weasyprint.org/) and CSS for print.
The talk will be in French, but the slides in English. I’ll post them here
afterwards.

See you there!

**Update 2012-09-12**:
I made [a PDF version](PyConFR_2012_schedule.pdf) of
[the schedule](http://www.pycon.fr/2012/schedule/) for printing, of course
dogfooding WeasyPrint. There is [a bit of CSS](print.css) to remove irrelevant
navigation links, fix some brokenness of the original page, and generally
make it look nice on A4. You can regenerate the same PDF with:

:::sh
weasyprint http://www.pycon.fr/2012/schedule/ PyConFR_2012_schedule.pdf \
-s http://exyr.org/2012/weasyprint-at-pyconfr/print.css
2 changes: 2 additions & 0 deletions exyr/pages/2012/weasyprint-at-pyconfr/Makefile
@@ -0,0 +1,2 @@
PyConFR_2012_schedule.pdf: print.css
weasyprint http://www.pycon.fr/2012/schedule/ -s $< $@
Binary file not shown.
30 changes: 30 additions & 0 deletions exyr/pages/2012/weasyprint-at-pyconfr/print.css
@@ -0,0 +1,30 @@
/* Navigation and stuff */
.login, nav, .badges.legend + *, footer,
/* hyperlink to the same page */
.container>:nth-child(2),
/* Wednesday to Friday’s schedule is very simple, no need to print it */
.container>:nth-child(5),
.container>:nth-child(6),
.container>:nth-child(7),
.container>:nth-child(8),
.container>:nth-child(9),
.container>:nth-child(10),
/* Too many cells because of a bad interaction of rowspan and colspan */
.container>:nth-child(12) tr:nth-child(7) td:nth-child(3),
.container>:nth-child(12) tr:nth-child(8) td:nth-child(3),
/* URLs after links are not needed */
:link::after
{ display: none !important}

header .container { height: 0 !important }
body, .container { background: none !important }
#body h1 { font-size: 180% !important; margin: 0 0 20px 220px !important }
.container { width: auto !important }
.badge { float: left; clear: left; margin-right: 1ex !important }
h2 { margin-top: 2em !important }
td:first-child { width: 8em !important }
td { padding: 2px 4px !important }
table, td { border: .5px solid #444 !important }
a { text-decoration: none !important }
:root { font-size: 12pt !important }
@page { margin: 1cm 2cm }
3 changes: 3 additions & 0 deletions exyr/templates/style.css
Expand Up @@ -175,3 +175,6 @@ hr:before {
.codehilite {
line-height: normal;
}
.codehilite pre {
white-space: pre-wrap;
}

0 comments on commit a74305b

Please sign in to comment.