summaryrefslogblamecommitdiff
path: root/lib/nola.ex
blob: 51c2150143141e913731b8d02eb32fab22d3b299 (plain) (tree)
1
2
3
4
5
6
7
8
9
                 
 
                  
                 
                                                      



                                      

                                                                            




                                               
 



                                  
                  
                                          

     
                
                                 

     
   
defmodule Nola do

  @default_brand [
    name: "Nola",
    source_url: "https://phab.random.sh/source/Nola/",
    owner: "Ashamed owner",
    owner_email: "contact@my.nola.bot"
  ]

  def env(), do: Application.get_env(:nola)
  def env(key, default \\ nil), do: Application.get_env(:nola, key, default)

  def brand(), do: env(:brand, @default_brand)
  def brand(key), do: Keyword.get(brand(), key)
  def name(), do: brand(:name)
  def source_url(), do: brand(:source_url)

  def data_path(suffix) do
    Path.join(data_path(), suffix)
  end

  def data_path do
    Application.get_env(:nola, :data_path)
  end

  def version do
    Application.spec(:nola)[:vsn]
  end

end