🏡 index : ~doyle/dave.git

author ghost.of.christmas.past <stnicholas@northpole.no> 2019-01-13 19:00:00.0 +00:00:00
committer Jordan Johnson-Doyle <jordanjd@amazon.co.uk> 2019-01-28 15:58:54.0 +00:00:00
commit
b22b0d021f1cfe590f0f99d92f9aaf32ed801c6f [patch]
tree
97f8a06e793d79326e19a471ff1a8fa38a49887b
parent
3236a0e97361764064781aba15b19c3468c34287
download
b22b0d021f1cfe590f0f99d92f9aaf32ed801c6f.tar.gz

Removes bold from titles.



Diff

 dave/modules/reddit.py | 8 +++++---
 dave/modules/title.py  | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dave/modules/reddit.py b/dave/modules/reddit.py
index f011e06..f2adcb1 100644
--- a/dave/modules/reddit.py
+++ a/dave/modules/reddit.py
@@ -39,8 +39,8 @@
    bot.msg(source, assembleFormattedText(
        A.normal[
            A.bold[A.fg.lightRed["[NSFW] "]] if resp["over_18"] else "",
            A.bold[resp["title"][:75] + (resp["title"][75:] and '...')],
            " by ", A.bold[resp["author"]],
            A.normal[resp["title"][:75] + (resp["title"][75:] and '...')],
            " by ", A.normal[resp["author"]],
            " (/r/{}) {} comments, {} points, posted {}".format(
                resp["subreddit"],
                intcomma(resp["num_comments"]),
@@ -88,7 +88,7 @@
    bot.msg(source, assembleFormattedText(
        A.normal[
            A.bold[A.fg.lightRed["[NSFW] "]] if resp["over18"] else "",
            A.bold[resp["title"]],
            A.normal[resp["title"]],
            " ({}), a community for {}. {} subscribers, {} browsing right now.".format(
                resp["display_name_prefixed"],
                naturaldelta(datetime.utcnow().timestamp() - resp["created"]),
@@ -129,7 +129,7 @@

    bot.msg(source, assembleFormattedText(
        A.normal[
            A.bold[resp["name"]],
            A.normal[resp["name"]],
            ", a redditor for {}. {} link karma, {} comment karma.".format(
                naturaldelta(datetime.utcnow().timestamp() - resp["created"]),
                intcomma(resp["link_karma"]),
diff --git a/dave/modules/title.py b/dave/modules/title.py
index 3045294..04c3b97 100644
--- a/dave/modules/title.py
+++ a/dave/modules/title.py
@@ -45,7 +45,7 @@
            title = str(dave.config.redis.get("site:{}".format(match)), 'utf8')

        if title is not None:
            titles.append(assembleFormattedText(A.bold[title]))
            titles.append(assembleFormattedText(A.normal[title]))

    if titles:
        # remove duplicates