From 44efb251eb3bf7b6fb0f618683319b63b64c1f9b Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Mon, 2 Mar 2015 23:28:08 -0500 Subject: Add papers --- Makefile | 2 +- build.py | 8 +++++++- index.jinja | 1 + papers/ageev2004.pdf | Bin 0 -> 284652 bytes papers/calinescu2007.pdf | Bin 0 -> 222340 bytes papers/calinescu2011.pdf | Bin 0 -> 361857 bytes papers/khuller1999.pdf | Bin 0 -> 1722129 bytes papers/nemhauser1978.pdf | Bin 0 -> 1243305 bytes papers/sviridenko2004.pdf | Bin 0 -> 135886 bytes papers/vondrak2008.pdf | Bin 0 -> 192087 bytes papers/vondrak2011.pdf | Bin 0 -> 549683 bytes 11 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 papers/ageev2004.pdf create mode 100644 papers/calinescu2007.pdf create mode 100644 papers/calinescu2011.pdf create mode 100644 papers/khuller1999.pdf create mode 100644 papers/nemhauser1978.pdf create mode 100644 papers/sviridenko2004.pdf create mode 100644 papers/vondrak2008.pdf create mode 100644 papers/vondrak2011.pdf diff --git a/Makefile b/Makefile index 0ea1871..bdd584c 100644 --- a/Makefile +++ b/Makefile @@ -4,4 +4,4 @@ build: python2 build.py deploy: - rsync -r index.html notes horel.org:public_html/submodularity + rsync -r index.html notes papers horel.org:public_html/submodularity diff --git a/build.py b/build.py index 73a9b89..be367c2 100644 --- a/build.py +++ b/build.py @@ -16,7 +16,8 @@ def get_references(sessions): "-o - -unicode -nokeys -a -citefile keys.txt " "-s abbrv sub.bib"], shell=True) os.remove("keys.txt") - body = BeautifulSoup(html_refs, "lxml").body + soup = BeautifulSoup(html_refs, "lxml") + body = soup.body body.name = "ol" body.hr.decompose() entries = body.find_all("p") @@ -28,6 +29,11 @@ def get_references(sessions): entry["id"] = entry.a["name"] entry.a.decompose() keys[entry["id"]] = i + 1 + fname = op.join("papers", entry["id"] + ".pdf") + if op.isfile(fname): + link = soup.new_tag("a", href=fname) + link.string = "[pdf]" + entry.append(link) return unicode(body), keys diff --git a/index.jinja b/index.jinja index 575eb67..d020982 100644 --- a/index.jinja +++ b/index.jinja @@ -20,6 +20,7 @@ li + li { margin-top: 0.5em}

Submodular Optimization Reading Group
Spring 2015

+

See the Hackpad for discussions.

Sessions