<commit_before>defmodule PhoenixPoker.Utils do
  use Timex
  
  @moduledoc false

  def yyyymmdd_now() do
    now = Timex.now("-9")
    now.year * 10000 + now.month * 100 + now.day
  end
  
  def mailto_link(game_night) do
    subj = "Poker Results: #{game_night.yyyymmdd}"

    emails = Enum.map(game_night.attendee_results, fn(a_r) ->
      a_r.player.email
    end)
    |> Enum.join(",")
    
    body = Enum.map(game_night.attendee_results, fn(a_r) ->
      "#{a_r.player.nickname}: $#{
        a_r.rounded_cents / 100} (#{
        a_r.chips / 100} chips / $#{
        a_r.exact_cents / 100})"
    end)
    |> Enum.join("\n")

    "mailto:" <> emails <>
    "?subject=" <> subj <>
    "&body=" <> body <> ";"
  end
end<commit_msg>Attempting spaces and br tags to separate lines (:crossed_fingers:). TODO: order players by winnings and then names.<commit_after>defmodule PhoenixPoker.Utils do
  use Timex
  
  @moduledoc false

  def yyyymmdd_now() do
    now = Timex.now("-9")
    now.year * 10000 + now.month * 100 + now.day
  end
  
  def mailto_link(game_night) do
    subj = "Poker Results: #{game_night.yyyymmdd}"

    emails = Enum.map(game_night.attendee_results, fn(a_r) ->
      a_r.player.email
    end)
    |> Enum.join(",")
    
    body = Enum.map(game_night.attendee_results, fn(a_r) ->
      " #{a_r.player.nickname}: $#{
        a_r.rounded_cents / 100} (#{
        a_r.chips / 100} chips / $#{
        a_r.exact_cents / 100}) <br /> "
    end)
    |> Enum.join("\n")

    "mailto:" <> emails <>
    "?subject=" <> subj <>
    "&body=" <> body <> ";"
  end
end
{'fraction_non_alphanumeric': 0.1620253164556962, 'fraction_numerical': 0.02278481012658228, 'mean_word_length': 2.497787610619469, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4090707', 'n_tokens_mistral': 673, 'n_tokens_neox': 612, 'n_words': 120}