Browse Source

adding tags to the table view

master
mb 2 years ago
parent
commit
a578c22ded
  1. 4
      aggregator.py
  2. 8
      templates/index.template.html

4
aggregator.py

@ -113,7 +113,7 @@ def create_frontmatter(entry):
'publisher': publisher, 'publisher': publisher,
'original_link': entry.links[0]['href'].replace('opds/cover/','books/'), 'original_link': entry.links[0]['href'].replace('opds/cover/','books/'),
'feed_name': entry['feed_name'], 'feed_name': entry['feed_name'],
'tags': str(tags), 'tags': tags,
'category': "books" 'category': "books"
} }
else: else:
@ -124,7 +124,7 @@ def create_frontmatter(entry):
'author': author, 'author': author,
'original_link': entry.link, 'original_link': entry.link,
'feed_name': entry['feed_name'], 'feed_name': entry['feed_name'],
'tags': str(tags), 'tags': tags,
'card_type': card_type, 'card_type': card_type,
'featured_image': featured_image 'featured_image': featured_image
} }

8
templates/index.template.html

@ -40,9 +40,10 @@
<tr> <tr>
<th onclick="sortTable(0)">title</th> <th onclick="sortTable(0)">title</th>
<th onclick="sortTable(1)">post</th> <th onclick="sortTable(1)">post</th>
<th onclick="sortTable(2)">feed</th> <th onclick="sortTable(2)">tags</th>
<th onclick="sortTable(3)">date</th> <th onclick="sortTable(3)">feed</th>
<th onclick="sortTable(4)">through</th> <th onclick="sortTable(4)">date</th>
<th onclick="sortTable(5)">through</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -53,6 +54,7 @@
<a href="{{ post_dir }}">aggregated</a> <a href="{{ post_dir }}">aggregated</a>
<a href="{{ post.frontmatter.original_link }}">source</a> <a href="{{ post.frontmatter.original_link }}">source</a>
</td> </td>
<td>{% for tag in post.frontmatter.tags %}{{ tag }} {% endfor %}</td>
<td>{{ post.frontmatter.feed_name }}</td> <td>{{ post.frontmatter.feed_name }}</td>
<td>{{ post.frontmatter.date }}</td> <td>{{ post.frontmatter.date }}</td>
<td>{{ post.frontmatter.author }}</td> <td>{{ post.frontmatter.author }}</td>

Loading…
Cancel
Save