Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/azohra/memo_generator
An elixir application to generate memos based on your team's Trello board
https://github.com/azohra/memo_generator
Last synced: about 1 month ago
JSON representation
An elixir application to generate memos based on your team's Trello board
- Host: GitHub
- URL: https://github.com/azohra/memo_generator
- Owner: azohra
- License: mit
- Created: 2018-09-20T21:05:18.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-16T14:35:53.000Z (about 6 years ago)
- Last Synced: 2024-10-29T08:45:03.861Z (about 2 months ago)
- Language: Elixir
- Size: 168 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# MemoGenerator
### An Elixir application to generate a memo by scraping your team's trello boards.
![Sample Memo](docs/sample.png "Sample Memo")
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `memo_generator` to your list of dependencies in `mix.exs`:```elixir
def deps do
[
{:memo_generator, "~> 0.1.0"}
]
end
```## Configuration
```elixir
# Used to Authenticate your bot into the Trello workspace
config :memo_generator, api_key: System.get_env("TRELLO_API_KEY")
config :memo_generator, api_token: System.get_env("TRELLO_API_TOKEN")
```## Functions
```Elixir
# Customize what attributes you want on your memo
# You can chose between a text splash
attributes = %{splash: "Please read carefully
"}
# A company logo
attributes = %{logo: "https://www.company.com/logo"}
# Or both
attributes = %{splash: "Please read carefully
", logo: "https://www.company.com/logo"}# To generate a memo for all boards with no added attributes
def go(:all, filename, title) do
# ...
end# To generate a memo for a list of boards with no added attributes
def go(["Board_1", "Board_2"], filename, title) do
# ...
end# To generate a memo for all boards with added attributes
def go(:all, filename, title, attributes) do
# ...
end# To generate a memo for a list of boards with added attributes
def go(["Board_1", "Board_2"], filename, title, attributes) do
# ...
end# To return a list of all boards the application has access to
def get_all_board_names do
# ...
end# To delete a rendered memo from your file system
def delete(filename) do
# ...
end
```## Usage Examples
### Use the function within your Elixir application...
```Elixir
# ... inside your applicationdef your_api(conn, assigns) do
%{
board_list: boards,
title: title,
filename: filename,
opts: opts,
...
} = assignsMemoGenerator.go(boards, filename, title, opts)
send_file(conn, filename)
MemoGenerator.delete(filename)
conn
end
```### or you can use it through iex
```console
iex(1)> MemoGenerator.go(["Backlog", "Secret Project"], "eCommerce-memo.md", "Weekly Memo - eCommerce", %{logo: "https://www.company.com/logo"})16:04:44.341 [info] Rendered logo
16:04:44.355 [info] Rendered all cards for list: Backlog
16:04:44.430 [info] Rendered all cards for list: Focused
16:04:44.502 [info] Rendered all cards for list: Doing
16:04:44.586 [info] Rendered all cards for list: Done
16:04:44.587 [info] Rendered all cards and lists for board: Main
16:04:44.745 [info] Rendered all cards for list: Backlog
16:04:44.820 [info] Rendered all cards for list: Focused
16:04:44.897 [info] Rendered all cards for list: Doing
16:04:44.974 [info] Rendered all cards for list: Done
16:04:44.974 [info] Rendered all cards and lists for board: Secret Project16:04:44.974 [info] Finished rendering: Weekly Memo - eCommerce, into file: eCommerce-memo.md
:ok
```Created with ♥ by Azohra.