https://github.com/niku/hobot_output_console
An output plugin which writes messages to a console for hobot
https://github.com/niku/hobot_output_console
Last synced: 28 days ago
JSON representation
An output plugin which writes messages to a console for hobot
- Host: GitHub
- URL: https://github.com/niku/hobot_output_console
- Owner: niku
- License: mit
- Created: 2017-05-10T03:26:25.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-11T10:34:33.000Z (about 9 years ago)
- Last Synced: 2025-10-22T00:53:12.703Z (8 months ago)
- Language: Elixir
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hobot.Output.Console
An output plugin which writes messages to a console for hobot
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `hobot_output_console` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:hobot_output_console, "~> 0.1.0"}]
end
```
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/hobot_output_console](https://hexdocs.pm/hobot_output_console).
## Usage
You can show messages which you subscribed topics.
```
% git clone https://github.com/niku/hobot_output_console.git
% cd hobot_output_console
hobot_output_console% mix deps.get
hobot_output_console% iex -S mix
iex(1)> {:ok, pid} = Hobot.Output.Console.start_link("a_topic")
{:ok, #PID<0.243.0>}
iex(2)> # Publish a message
nil
iex(3)> Hobot.publish("a_topic", "hello~")
{"a_topic", "hello~"}
:ok
```