Skip to content

Commit 06ac765

Browse files
committed
Seteaza adresa de inscriere la import.
1 parent 42fb9de commit 06ac765

File tree

3 files changed

+30
-4
lines changed

3 files changed

+30
-4
lines changed

import-meetup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,12 @@ def main(group_id, location, time_boundary, event_status, pandoc):
119119
rst = stream.getvalue().decode('utf-8')
120120

121121
with io.open(target_path, 'w', encoding='utf-8') as fh:
122-
fh.write('''
123-
{name}
122+
fh.write('''{name}
124123
###############################################################
125124
126125
:tags: unknown
126+
:registration:
127+
meetup.com: {event_url}
127128
128129
{rst}'''.format(rst=rst, **event))
129130
click.secho('\tWrote `{}`.'.format(target_path), fg='green')

theme/templates/article.html

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,33 @@ <h1 class="title" itemprop="name">{{ article.title }}</h1>
2424
{% endfor %}
2525
</p>
2626
{% endif %}
27-
</blockquote>
2827

28+
{% if article.metadata.registration %}
29+
<p class="registration">Înscrieri:
30+
{% for line in article.metadata.registration.splitlines() %}
31+
{% if ":" in line %}
32+
{% for name, url in [line.split(':', 1)] %}
33+
<a href="{{ url }}">{{ name }}</a>
34+
{% endfor %}
35+
{% else %}
36+
{{ line }}
37+
{% endif %}
38+
{% endfor %}
39+
{% endif %}
40+
41+
{% if article.metadata.location %}
42+
<p class="venue">Locație:
43+
{% for line in article.metadata.location.splitlines() %}
44+
{% if ":" in line %}
45+
{% for name, url in [line.split(':', 1)] %}
46+
<a href="{{ url }}">{{ name }}</a>
47+
{% endfor %}
48+
{% else %}
49+
{{ line }}
50+
{% endif %}
51+
{% endfor %}
52+
{% endif %}
53+
</blockquote>
2954
<div itemprop="articleBody">{{ article.content }}</div>
3055
</div>
3156
{% include "twitter.html" %}

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ skipsdist = true
44

55
[testenv]
66
envdir = {toxinidir}/.env
7-
#basepython = python3.4
7+
# basepython = python3.4
88
setenv =
99
PYTHONPATH=.
1010
# PYTHONHUNTER=module=socket

0 commit comments

Comments
 (0)