Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up #107

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions content/pages/2018/privacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ URL: 2018/privacy.html
save_as: 2018/privacy.html
section: euroscipy_2018


### Personal data management policy

Privacy Informed Consent Form
Privacy Informed Consent Form
pursuant to Section 13 Legislative Decree no. 196 of 30 June 2003 “Personal Data Protection Code”

Fondazione Bruno Kessler (hereinafter “FBK”) - in its capacity of Data Controller - with the present form, provides some information regarding the use of your personal data required to process your contract and
Expand Down Expand Up @@ -34,7 +33,7 @@ You may contact FBK Digital Communication and Big Events Unit, via Sommarive 18,
In particular, you may refuse at any time the handling of your personal data for institutional promotional material mailing purposes.

We would also like to inform you that the registration system to the conferences makes use of the online specialised system Eventbrite.com, which use terms and conditions and privacy policy are available at the link
[https://www.eventbrite.com/privacypolicy](https://www.eventbrite.com/privacypolicy).
[https://www.eventbrite.com/privacypolicy](https://www.eventbrite.com/privacypolicy).

Therefore, the undersigned relieves FBK of any liability in the processing of data entered in the Eventbrite.com system by the undersigned.

Expand Down
26 changes: 13 additions & 13 deletions papercall_grabbing.py → scripts/papercall_grabbing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

token = 'your_papercall_token' # ,<-- fill this in

THIS_DIR = os.path.abspath(os.path.dirname(__file__))
ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))

des_template = """
Title: {title}
Expand All @@ -34,15 +34,15 @@ def get_reviewer_list():
"""
# Collect submission ids
all_ids = get_submission_ids()

# Collect all reviewers
reviewers = set()
for id in all_ids:
url = 'https://www.papercall.io/api/v1/submissions/%s/ratings?_token=%s'
ratings = requests.get(url % (id, token)).json()
for rating in ratings:
reviewers.add(rating['user']['name'])

# Print a list
for reviewer in sorted(reviewers):
print(reviewer)
Expand All @@ -53,7 +53,7 @@ def get_talk_descriptions():
"""
# Collect submission ids
all_ids = get_submission_ids()

# Collect descriptions
index = {}
for id in all_ids:
Expand All @@ -63,13 +63,13 @@ def get_talk_descriptions():
title = submission['talk']['title']
page = des_template.format(description=submission['talk']['description'],
title=title, id=id)
fname = os.path.join(THIS_DIR, 'content', 'pages', '2017', 'descriptions', id + '.md')
fname = os.path.join(ROOT_DIR, 'content', 'pages', '2017', 'descriptions', id + '.md')
with open(fname, 'wb') as f:
f.write(page.encode())
index[id] = title
time.sleep(0.1)
fname = os.path.join(THIS_DIR, 'content', 'pages', '2017', 'descriptions', 'index.md')

fname = os.path.join(ROOT_DIR, 'content', 'pages', '2017', 'descriptions', 'index.md')
with open(fname, 'wb') as f:
for id in sorted(index):
line = id + ' - ' + index[id] + '\n'
Expand All @@ -80,24 +80,24 @@ def make_links_in_program():
""" Make the talk titles in the program link to description pages,
as far as we can, anyway. The rest should be done by hand by making use of
the descriptions.index.md.

Beware, this is ugly, and makes all kinds of assumptions about how the program
table is formatted, and it needs manual corrections, and it does not work after
it has applied the changes. We should probably just throw it away.
"""

# Build reverse index
rindex = {}
fname = os.path.join(THIS_DIR, 'content', 'pages', '2017', 'descriptions', 'index.md')
fname = os.path.join(ROOT_DIR, content', 'pages', '2017', 'descriptions', 'index.md')
with open(fname, 'rb') as f:
for line in f.read().decode().splitlines():
if line.strip():
id, _, title = line.partition('-')
rindex[title.strip().lower()] = 'descriptions/' + id.strip() + '.html'
default_link = 'descriptions/oops.html'

# Add links
fname = os.path.join(THIS_DIR, 'content', 'pages', '2017', 'program.md')
fname = os.path.join(ROOT_DIR, 'content', 'pages', '2017', 'program.md')
text = open(fname, 'rb').read().decode()
lines = text.splitlines()
for i in range(len(lines)-1):
Expand All @@ -112,7 +112,7 @@ def make_links_in_program():
title, _, rest = line.lstrip()[4:].partition('<br>')
id = rindex.get(title.strip().lower(), default_link)
lines[i] = " <td><a href='%s'>%s</a><br>%s" % (id, title, rest)

with open(fname, 'wb') as f:
text = '\n'.join(lines)
f.write(text.encode())
Expand Down
7 changes: 5 additions & 2 deletions theme/tuxlite_zf/templates/twitter.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{% if TWITTER_USERNAME %}
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="{{TWITTER_USERNAME}}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
{% endif %}
<a href="http://twitter.com/share" class="twitter-share-button"
data-count="horizontal" data-via="{{TWITTER_USERNAME}}">Tweet</a>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js">
</script>
{% endif %}