Documentation
¶
Overview ¶
Package render converts texts to varioius text formats: plaintext, HTML, and syndication feed representations of a collection of texts. Notably, this doesn't include interactive interfaces for displaying new texts (e.g. at the command line).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTML ¶
HTML table rendering for texts, grouped by text.Text.Timestamp. HTML assumes texts it receives are already ordered by timestamp, descending; see text.Sort.
Example output:
<head> <!-- Head contents... --> </head> <h1 class="title">tir</h1> <p><a href="https://github.com/lukasschwab/tiir">GitHub</a></p> <hr/> <table class="table"> <tr> <th>Title</th> <th>Author</th> <th>Note</th> <th>Date</th> </tr> <td colspan="4"><h3>April 7, 2023</h3></td> <tr> <td><a href="https://davidchall.github.io/ggip/articles/visualizing-ip-data.html">Visualizing IP data</a></td> <td>David Hall</td> <td>Use a Hilbert Curve: efficient 2D packing that keeps consecutive sequences spatially contiguous.</td> <td>2023-04-07</td> </tr> <!-- More rows... --> </table>
func JSON ¶
JSON list renderer for texts. Example output:
[{ "title": "Visualizing IP data", "url": "https://davidchall.github.io/ggip/articles/visualizing-ip-data.html", "author": "David Hall", "note": "Use a Hilbert Curve: efficient 2D packing that keeps consecutive sequences spatially contiguous.", "id": "35bb8126", "timestamp": "2023-04-07T21:43:52.776451-07:00" }]
func JSONFeed ¶
JSONFeed rendering for texts. Example output:
{ "version": "https://jsonfeed.org/version/1", "title": "tir", "items": [ { "id": "35bb8126", "url": "https://davidchall.github.io/ggip/articles/visualizing-ip-data.html", "title": "Visualizing IP data", "content_text": "Use a Hilbert Curve: efficient 2D packing that keeps consecutive sequences spatially contiguous.", "date_published": "2023-04-07T21:43:52-07:00", "authors": [ { "name": "David Hall" } ] } ] }
Types ¶
Click to show internal directories.
Click to hide internal directories.