Skip to content

Instantly share code, notes, and snippets.

@wardbekker
Created September 9, 2011 11:52
Show Gist options
  • Save wardbekker/1206022 to your computer and use it in GitHub Desktop.
Save wardbekker/1206022 to your computer and use it in GitHub Desktop.
query_results({facet_results, [{"Tags", Tags}, {"CreationDate", _CreationDate}]}, [Ws]) ->
Html = lists:map(
fun({[Tag], Count}) ->
io_lib:format(
"<li>~ts ( ~p ) </li>",
[Tag, Count]
)
end,
Tags
),
Output = io_lib:format("<p><ol>~ts</ol></p>", [lists:append(Html)]),
Ws:send(["tags:", unicode:characters_to_binary(Output)]),
ok;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment