Skip to content

DDG: make output format and separator configurable #1612

@Pulecz

Description

@Pulecz

Currently in lots of search outputs the link to the search result is only after the description of the link which often can be after first 512 characters (the IRC message limit). So if the user want's to get to the link fast they often have to write more command.

To put the link first it's as simple to switch the order here https://github.com/progval/Limnoria/blob/master/plugins/DDG/plugin.py#L164
strings.append(format("%u - %s %s", r[2], ircutils.bold(r[0]), r[1]))

Personally I am not a fan of "," as a separator so I edited it to red bold "|"

separator = ircutils.bold(ircutils.mircColor(" | ", "red"))
irc.reply(separator.join(strings), prefixNick=True)

However the preference can vary a lot, so it would be best to make it configurable somehow, rather than forcing new defaults.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions