Skip to content

Commit

Permalink
Tags are silly. Remove them.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Mar 6, 2014
1 parent 123edb2 commit be77b45
Show file tree
Hide file tree
Showing 28 changed files with 1 addition and 97 deletions.
25 changes: 0 additions & 25 deletions exyr/__init__.py
Expand Up @@ -110,31 +110,6 @@ def about():
return render_template('flatpage.html', page=Page.load('', 'about'))


@app.route('/tags/')
def tags():
counts = {}
for article in Page.all_articles():
for tag in article.meta.get('tags', []):
counts[tag] = counts.get(tag, 0) + 1

return render_template('tag_list.html', tags=[
# count => weight: 1 => 100, 10 => 150, 100 => 200
(tag, int(100 + 50 * math.log10(count)))
# sorted alphabetically by tag name
for tag, count in sorted(counts.items())
])


@app.route('/tags/<name>/')
def tag(name):
articles = by_date(
a for a in Page.all_articles() if name in a.meta.get('tags', [])
)
if not articles:
abort(404)
return render_template('tag.html', tag=name, posts=articles)


@app.route('/<int:year>/')
def archives(year):
articles = by_date(Page.articles_by_year(str(year)))
Expand Down
3 changes: 0 additions & 3 deletions exyr/pages/2010/Flask-Static.markdown
@@ -1,9 +1,6 @@
title: "Flask-Static: yet another static website generator"
published: 2010-12-28
modified: 2011-02-21
tags:
- web-development
- flask
summary: >
I’ve been working on re-launching my personal website (you’re looking
at the result), and wrote a static website generator in the process.
Expand Down
5 changes: 0 additions & 5 deletions exyr/pages/2010/Jinja-in-Django.markdown
@@ -1,10 +1,5 @@
title: Using Jinja2 in Django
published: 2010-12-29
tags:
- web-development
- django
- jinja
- snippets
summary: >
How to replace Django’s templating system by Jinja2 and still profit from
it eg. in generic views.
Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2011/Frozen-Flask.markdown
@@ -1,6 +1,5 @@
title: Flask-Static is dead, long live Frozen-Flask!
published: 2011-02-21
tags: [web-development, flask]
summary: Just because the new name is so much cooler.

[Flask-Static](/2010/Flask-Static/) is nice but the name was not so great.
Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2011/Poor-man-NTP.markdown
@@ -1,6 +1,5 @@
title: Poor man’s NTP
published: 2011-05-28
tags: [ntp]
summary: How to synchronize a Linux computer’s clock when NTP doesn’t work.

The network where I live currently is heavily filtered. I believe that UDP
Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2011/event-loop.markdown
@@ -1,6 +1,5 @@
title: Single-threaded event loop for file input and timers
published: 2011-02-27
tags: [snippets]
summary: |
To wait for various events and without polling, a blocking threads for each
event is the obvious solution. However, multi-threading comes with its
Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2011/gedit-plugins-packaged.markdown
@@ -1,6 +1,5 @@
title: Two Gedit 3 plugins packaged for Arch Linux
published: 2011-07-03
tags: [gedit, packaging, archlinux]
summary:
I just packaged for Arch Linux the *Gedit Whitespace Terminator* and
*Gedit Source Code Browser* plugins for Gedit 3. You can find them in
Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2011/git-mirrors.markdown
@@ -1,6 +1,5 @@
title: Mirroring a Gitorious repository to GitHub
published: 2011-04-30
tags: [git, backups]
summary: |
You can not make Gitorious or GitHub push to somewhere else, so mirroring
them requires a few more steps.
Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2011/gnome-terminal-tabs.markdown
@@ -1,6 +1,5 @@
title: Programatically open multiple GNOME Terminal tabs
published: 2011-02-20
tags: [snippets]
summary: |
To run several tasks in parallel and keep their output separated, run each
one in its own shell. Doing so can be automated, and thus it should.
Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2011/hashing-passwords.markdown
@@ -1,6 +1,5 @@
title: Hashing passwords the Right Way
published: 2011-12-05
tags: [passwords, web-development, snippets]
summary:
Don’t store passwords in plain text. Don’t use a fast algorithm.
And don’t forget the salt.
Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2011/inotify-run.markdown
@@ -1,6 +1,5 @@
title: Run a script on file changes with inotify
published: 2011-10-13
tags: [inotify, snippets]
summary:
Have a script (eg. your test suite) run automatically every time a file
changes.
Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2011/multicorn.markdown
@@ -1,6 +1,5 @@
title: "Multicorn: Access foreign data in PostgreSQL with Python"
published: 2011-11-07
tags: [kozea]
summary:
We just released [Multicorn](http://multicorn.org/). It enables you
to write Foreign Data Wrappers for PostgreSQL in Python. Any data
Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2011/random-pronounceable-passwords.markdown
@@ -1,6 +1,5 @@
title: Random pronounceable passwords
published: 2011-02-11
tags: [passwords, snippets]
summary: |
Using a sample text for statistics and Markov chains, we can generate
passwords that are both random (and thus strong) and pronounceable
Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2011/virtualenv-HOWTO.markdown
@@ -1,6 +1,5 @@
title: virtualenv HOWTO
published: 2011-06-10
tags: [packaging]
summary: Slides for an introduction to virtualenv and pip I gave recently.


Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2011/weasyprint.markdown
@@ -1,6 +1,5 @@
title: WeasyPrint renders HTML+CSS to PDF
published: 2011-11-02
tags: [kozea, weasyprint]
summary:
The project I’ve been working on in the past few months has finally
reached an usable state and has gotten a public release!
Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2012/csswg-invited-expert.markdown
@@ -1,6 +1,5 @@
title: Invited Expert at W3C’s CSSWG
published: 2012-09-17
tags: [weasyprint, W3C]
summary: |
I just joined [W3C’s *CSS Working Group*](http://www.w3.org/Style/CSS/)
as an *Invited Expert*.
Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2012/flask-flatpage-maintenance.markdown
@@ -1,6 +1,5 @@
title: Who wants to maintain Flask-FlatPages?
published: 2012-09-27
tags: [web-development, flask]
summary: >
I stopped using Flask-FlatPages on this site and I most likely won’t
work on it anymore. Anyone wants to take over and maintain the project?
Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2012/flask-weasyprint.markdown
@@ -1,6 +1,5 @@
title: Flask-WeasyPrint
published: 2012-07-19
tags: [kozea, weasyprint]
summary: |
I just released [Flask-WeasyPrint](http://packages.python.org/Flask-WeasyPrint/)

Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2012/fosdem.markdown
@@ -1,6 +1,5 @@
title: I’m going to FOSDEM
published: 2012-02-01
tags: [fosdem, kozea]
summary: |
I’m going to [FOSDEM](http://fosdem.org/2012/) this week-end.
See you there!
Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2012/tinycss-css-parser.markdown
@@ -1,6 +1,5 @@
title: "tinycss: a new CSS parser for Python"
published: 2012-04-05
tags: [kozea, weasyprint]
summary: |
I made [tinycss](http://packages.python.org/tinycss/), a new free software
CSS parser for Python. It is extensible, well-documented, well-tested
Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2012/w3c-developer-meetup-lyon.markdown
@@ -1,6 +1,5 @@
title: W3C Developer Meetup in Lyon
published: 2012-10-29
tags: [kozea, weasyprint, W3C]
summary: |
This is a bit last minute, but I’m giving a talk tonight in the Lyon
city hall for the
Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2012/weasyprint-at-pyconfr.markdown
@@ -1,6 +1,5 @@
title: WeasyPrint at PyConFR 2012
published: 2012-09-10
tags: [kozea, weasyprint]
summary: |
I’ll be [giving a talk](http://www.pycon.fr/2012/schedule/presentation/16/)
about WeasyPrint at PyConFR on Sunday.
Expand Down
1 change: 0 additions & 1 deletion exyr/pages/2012/weasyprint-is-bsd.markdown
@@ -1,6 +1,5 @@
title: WeasyPrint is now BSD-licensed
published: 2012-03-22
tags: [kozea, weasyprint]
summary: |
We just changed [WeasyPrint](http://weasyprint.org/)’s license from
AGPL to BSD.
Expand Down
7 changes: 1 addition & 6 deletions exyr/templates/flatpage.html
Expand Up @@ -8,12 +8,7 @@
<article>
<header>
<h2>{{ page.title }}</h2>
<p>By Simon Sapin on {{ utils.html5_date(page.published) }}
{% for tag in page.tags|d([]) -%}
{% if loop.first %}in {% else %}, {% endif -%}
<a href="{{ url_for('tag', name=tag) }}">{{ tag }}</a>
{%- endfor %}
</p>
<p>By Simon Sapin, on {{ utils.html5_date(page.published) }}</p>
</header>
{{ page.html|safe }}
</article>
Expand Down
1 change: 0 additions & 1 deletion exyr/templates/layout.html
Expand Up @@ -34,7 +34,6 @@ <h1><a href="/">{% block site_title %}Exyr.org{% endblock %}</a></h1>
<nav>
<ul>
<li><a href="{{ url_for('home') }}">Posts</a></li>
<li><a href="{{ url_for('tags') }}">Tags</a></li>
<li><a href="{{ url_for('about') }}">About</a></li>
<li><a href="{{ url_for('feed') }}">Subscribe <img alt=""
src="{{ url_for('static', filename='feed-icon.png') }}"></a></li>
Expand Down
12 changes: 0 additions & 12 deletions exyr/templates/style.css
Expand Up @@ -148,18 +148,6 @@ hr:before {
margin: .5em 0;
}

#tag_list {
list-style: none;
margin: 1em 0;
padding: 0;
text-align: center;
}
#tag_list li {
display: inline;
padding: 0;
margin: 0 .5em;
}

{{ pygments_css }}

.codehilite, blockquote {
Expand Down
9 changes: 0 additions & 9 deletions exyr/templates/tag.html

This file was deleted.

16 changes: 0 additions & 16 deletions exyr/templates/tag_list.html

This file was deleted.

0 comments on commit be77b45

Please sign in to comment.