<commit_before>import m = require("mithril");

import testData = require("./rssFeedExampleFromFSF");

export function initialize() {
    console.log("test data:", testData)
    console.log("RSS plugin initialized");
}

export function display() {
    return m("div.rssPlugin", ["RSS feed reader plugin", m("pre", JSON.stringify(testData, null, 2))]);
}<commit_msg>Improve display of test RSS data<commit_after>import m = require("mithril");

import testData = require("./rssFeedExampleFromFSF");

export function initialize() {
    console.log("test data:", testData)
    console.log("RSS plugin initialized");
}

function displayItem(item) {
    var title = item.title;
    var link = item.link;
    var description = item.desc;
    var timestamp = item.date;

    return m("div.item", [
        m("br")
        m("strong", title),
        m("br")
        description,
        " ",
        m("a", { href: link }, "More ..."),
        m("br"),
    ]);
}

function displayRSS() {
    return m("div.feed", [
        testData.items.map(displayItem);
	]);
}

export function display() {
    return m("div.rssPlugin", [
        m("hr"),
        m("strong", "RSS feed reader plugin"),
        //m("pre", JSON.stringify(testData, null, 2))
        displayRSS()
    ]);
}
{'fraction_non_alphanumeric': 0.1702296120348377, 'fraction_numerical': 0.001583531274742676, 'mean_word_length': 3.051282051282051, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1118792', 'n_tokens_mistral': 395, 'n_tokens_neox': 385, 'n_words': 95}