From b72ed2d86cf11983d41f3cef9d1aa7cdfe792503 Mon Sep 17 00:00:00 2001
From: zoldar
See
- Similar to Example: Similar to Example:insert_all/2 but with the following differences:Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
+insert_all/2 but with the following differences:
+{100_000, nil} = Repo.insert_stream("ecto_ch_demo", rows, types: [a: Ch.Types.u64(), b: :string])Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
-defmodule Demo do
+defmodule Demo do
use Ecto.Schema
@primary_key false
- schema "ecto_ch_demo" do
+ schema "ecto_ch_demo" do
field :a, Ch, type: "UInt64"
field :b, :string
- end
-end
+ end
+end
-rows = Stream.map(1..100_000, fn i -> %{a: i, b: to_string(i)} end)
-{100_000, nil} = Repo.insert_stream(Demo, rows)
+rows = Stream.map(1..100_000, fn i -> %{a: i, b: to_string(i)} end)
+{100_000, nil} = Repo.insert_stream(Demo, rows)
# schemaless
-{100_000, nil} = Repo.insert_stream("ecto_ch_demo", rows, types: [a: Ch.Types.u64(), b: :string])
Give
Queries the ClickHouse database for the monthly pageview usage. If the given user's
subscription is active, past_due, or a deleted (but not yet expired), a map
-with the following structure is returned:
%{
- current_cycle: usage_cycle(),
- last_cycle: usage_cycle(),
- penultimate_cycle: usage_cycle()
-}In all other cases of the subscription status (or a free_10k subscription which
-does not have a last_bill_date defined) - the following structure is returned:
%{last_30_days: usage_cycle()}Given only a user as input, the usage is queried from across all the sites that the +with the following structure is returned:
%{
+ current_cycle: usage_cycle(),
+ last_cycle: usage_cycle(),
+ penultimate_cycle: usage_cycle()
+}In all other cases of the subscription status (or a free_10k subscription which
+does not have a last_bill_date defined) - the following structure is returned:
%{last_30_days: usage_cycle()}Given only a user as input, the usage is queried from across all the sites that the
user owns. Alternatively, given an optional argument of site_ids, the usage from
across all those sites is queried instead.
Cldr.LanguageTag.The format of an Accept-Language header is as follows in ABNF format:
Accept-Language = "Accept-Language" ":"
1#( language-range [ ";" "q" "=" qvalue ] )
- language-range = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" )Each language-range MAY be given an associated quality value which represents an + language-range = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" )
Each language-range MAY be given an associated quality value which represents an estimate of the user's preference for the languages specified by that range. The quality value defaults to "q=1". For example,
Accept-Language: da, en-gb;q=0.8, en;q=0.7would mean: "I prefer Danish, but will accept British English and other types of English."
@@ -261,54 +261,54 @@ a configuredExamples
-iex> Plausible.Cldr.AcceptLanguage.best_match("da;q=0.1,zh-TW;q=0.3", TestBackend.Cldr)
-{:ok,
- %Cldr.LanguageTag{
+iex> Plausible.Cldr.AcceptLanguage.best_match("da;q=0.1,zh-TW;q=0.3", TestBackend.Cldr)
+{:ok,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "zh-TW",
cldr_locale_name: :"zh-Hant",
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "zh",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :"zh-Hant",
requested_locale_name: "zh-TW",
script: :Hant,
territory: :TW,
- transform: %{},
- language_variants: []
- }}
+ transform: %{},
+ language_variants: []
+ }}
-iex> Plausible.Cldr.AcceptLanguage.best_match("da;q=0.1,zh-TW;q=0.3", TestBackend.Cldr)
-{:ok,
- %Cldr.LanguageTag{
+iex> Plausible.Cldr.AcceptLanguage.best_match("da;q=0.1,zh-TW;q=0.3", TestBackend.Cldr)
+{:ok,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "zh-TW",
cldr_locale_name: :"zh-Hant",
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "zh",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :"zh-Hant",
requested_locale_name: "zh-TW",
script: :Hant,
territory: :TW,
- transform: %{},
- language_variants: []
- }}
-
-iex> Plausible.Cldr.AcceptLanguage.best_match("xx,yy;q=0.3")
-{:error,
- {Cldr.NoMatchingLocale,
- "No configured locale could be matched to \"xx,yy;q=0.3\""}}
-
-iex> Plausible.Cldr.AcceptLanguage.best_match("invalid_tag")
-{:error, {Cldr.LanguageTag.ParseError,
- "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
+ transform: %{},
+ language_variants: []
+ }}
+
+iex> Plausible.Cldr.AcceptLanguage.best_match("xx,yy;q=0.3")
+{:error,
+ {Cldr.NoMatchingLocale,
+ "No configured locale could be matched to \"xx,yy;q=0.3\""}}
+
+iex> Plausible.Cldr.AcceptLanguage.best_match("invalid_tag")
+{:error, {Cldr.LanguageTag.ParseError,
+ "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
@@ -369,95 +369,95 @@ wuth an error tuple for each invalid tag added at the end of the list.
Example
-iex> Cldr.AcceptLanguage.parse("da,zh-TW;q=0.3", TestBackend.Cldr)
-{:ok,
- [
- {1.0,
- %Cldr.LanguageTag{
+iex> Cldr.AcceptLanguage.parse("da,zh-TW;q=0.3", TestBackend.Cldr)
+{:ok,
+ [
+ {1.0,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "da",
cldr_locale_name: :da,
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "da",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :da,
requested_locale_name: "da",
script: :Latn,
territory: :DK,
- transform: %{},
- language_variants: []
- }},
- {0.3,
- %Cldr.LanguageTag{
+ transform: %{},
+ language_variants: []
+ }},
+ {0.3,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "zh-TW",
cldr_locale_name: :"zh-Hant",
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "zh",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :"zh-Hant",
requested_locale_name: "zh-TW",
script: :Hant,
territory: :TW,
- transform: %{},
- language_variants: []
- }}
- ]}
-
-iex> Plausible.Cldr.AcceptLanguage.parse("invalid_tag")
-{:error,
- {Cldr.LanguageTag.ParseError,
- "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
-
-iex> Plausible.Cldr.AcceptLanguage.parse("da,zh-TW;q=0.3,invalid_tag")
-{:ok,
- [
- {1.0,
- %Cldr.LanguageTag{
+ transform: %{},
+ language_variants: []
+ }}
+ ]}
+
+iex> Plausible.Cldr.AcceptLanguage.parse("invalid_tag")
+{:error,
+ {Cldr.LanguageTag.ParseError,
+ "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
+
+iex> Plausible.Cldr.AcceptLanguage.parse("da,zh-TW;q=0.3,invalid_tag")
+{:ok,
+ [
+ {1.0,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "da",
cldr_locale_name: :da,
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "da",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :da,
requested_locale_name: "da",
script: :Latn,
territory: :DK,
- transform: %{},
- language_variants: []
- }},
- {0.3,
- %Cldr.LanguageTag{
+ transform: %{},
+ language_variants: []
+ }},
+ {0.3,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "zh-TW",
cldr_locale_name: :"zh-Hant",
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "zh",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :"zh-Hant",
requested_locale_name: "zh-TW",
script: :Hant,
territory: :TW,
- transform: %{},
- language_variants: []
- }},
- {:error,
- {Cldr.LanguageTag.ParseError,
- "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
- ]}
+ transform: %{},
+ language_variants: []
+ }},
+ {:error,
+ {Cldr.LanguageTag.ParseError,
+ "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
+ ]}
@@ -502,92 +502,92 @@ wuth an error tuple for each invalid tag added at the end of the list.
Example
-iex> Plausible.Cldr.AcceptLanguage.parse!("da,zh-TW;q=0.3")
-[
- {1.0,
- %Cldr.LanguageTag{
+iex> Plausible.Cldr.AcceptLanguage.parse!("da,zh-TW;q=0.3")
+[
+ {1.0,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "da",
cldr_locale_name: :da,
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "da",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :da,
requested_locale_name: "da",
script: :Latn,
territory: :DK,
- transform: %{},
- language_variants: []
- }},
- {0.3,
- %Cldr.LanguageTag{
+ transform: %{},
+ language_variants: []
+ }},
+ {0.3,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "zh-TW",
cldr_locale_name: :"zh-Hant",
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "zh",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :"zh-Hant",
requested_locale_name: "zh-TW",
script: :Hant,
territory: :TW,
- transform: %{},
- language_variants: []
- }}
-]
+ transform: %{},
+ language_variants: []
+ }}
+]
Plausible.Cldr.AcceptLanguage.parse! "invalid_tag"
** (Cldr.AcceptLanguageError) "Expected a BCP47 language tag. Could not parse the remaining "g" starting at position 11
(ex_cldr) lib/cldr/accept_language.ex:304: Cldr.AcceptLanguage.parse!/1
-iex> Plausible.Cldr.AcceptLanguage.parse!("da,zh-TW;q=0.3,invalid_tag")
-[
- {1.0,
- %Cldr.LanguageTag{
+iex> Plausible.Cldr.AcceptLanguage.parse!("da,zh-TW;q=0.3,invalid_tag")
+[
+ {1.0,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "da",
cldr_locale_name: :da,
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "da",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :da,
requested_locale_name: "da",
script: :Latn,
territory: :DK,
- transform: %{},
- language_variants: []
- }},
- {0.3,
- %Cldr.LanguageTag{
+ transform: %{},
+ language_variants: []
+ }},
+ {0.3,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "zh-TW",
cldr_locale_name: :"zh-Hant",
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "zh",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :"zh-Hant",
requested_locale_name: "zh-TW",
script: :Hant,
territory: :TW,
- transform: %{},
- language_variants: []
- }},
- {:error,
- {Cldr.LanguageTag.ParseError,
- "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
-]
+ transform: %{},
+ language_variants: []
+ }},
+ {:error,
+ {Cldr.LanguageTag.ParseError,
+ "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
+]
diff --git a/Plausible.Cldr.Currency.html b/Plausible.Cldr.Currency.html
index 17223c663..7f11cd470 100644
--- a/Plausible.Cldr.Currency.html
+++ b/Plausible.Cldr.Currency.html
@@ -14,7 +14,7 @@
-
+
@@ -419,11 +419,11 @@ The default is :all. See FJD: %Cldr.Currency{
+ %{ FJD: %Cldr.Currency{
cash_digits: 2,
cash_rounding: 0,
code: "FJD",
- count: %{one: "Fijian dollar", other: "Fijian dollars"},
+ count: %{one: "Fijian dollar", other: "Fijian dollars"},
digits: 2,
from: nil,
iso_digits: 2,
@@ -433,12 +433,12 @@ The default is :all. See symbol: "FJD",
tender: true,
to: nil
- },
- SUR: %Cldr.Currency{
+ },
+ SUR: %Cldr.Currency{
cash_digits: 2,
cash_rounding: 0,
code: "SUR",
- count: %{one: "Soviet rouble", other: "Soviet roubles"},
+ count: %{one: "Soviet rouble", other: "Soviet roubles"},
digits: 2,
from: nil,
iso_digits: nil,
@@ -448,7 +448,7 @@ The default is :all. See symbol: "SUR",
tender: true,
to: nil
- },
+ },
...
}}
@@ -499,11 +499,11 @@ The default is :all. See Example
MyApp.Cldr.Currency.currencies_for_locale!("en")
- => %{
FJD: %Cldr.Currency{
+ => %{FJD: %Cldr.Currency{
cash_digits: 2,
cash_rounding: 0,
code: "FJD",
- count: %{one: "Fijian dollar", other: "Fijian dollars"},
+ count: %{one: "Fijian dollar", other: "Fijian dollars"},
digits: 2,
from: nil,
iso_digits: 2,
@@ -513,12 +513,12 @@ The default is :all. See symbol: "FJD",
tender: true,
to: nil
-},
-SUR: %Cldr.Currency{
+},
+SUR: %Cldr.Currency{
cash_digits: 2,
cash_rounding: 0,
code: "SUR",
- count: %{one: "Soviet rouble", other: "Soviet roubles"},
+ count: %{one: "Soviet rouble", other: "Soviet roubles"},
digits: 2,
from: nil,
iso_digits: nil,
@@ -528,7 +528,7 @@ The default is :all. See symbol: "SUR",
tender: true,
to: nil
-},
+},
...
}
@@ -586,13 +586,13 @@ or a
Examples
-iex> Plausible.Cldr.Currency.currency_for_code("AUD")
-{:ok,
- %Cldr.Currency{
+iex> Plausible.Cldr.Currency.currency_for_code("AUD")
+{:ok,
+ %Cldr.Currency{
cash_digits: 2,
cash_rounding: 0,
code: "AUD",
- count: %{one: "Australian dollar", other: "Australian dollars"},
+ count: %{one: "Australian dollar", other: "Australian dollars"},
digits: 2,
iso_digits: 2,
name: "Australian Dollar",
@@ -600,15 +600,15 @@ or a rounding: 0,
symbol: "A$",
tender: true
-}}
+}}
-iex> Plausible.Cldr.Currency.currency_for_code("THB")
-{:ok,
- %Cldr.Currency{
+iex> Plausible.Cldr.Currency.currency_for_code("THB")
+{:ok,
+ %Cldr.Currency{
cash_digits: 2,
cash_rounding: 0,
code: "THB",
- count: %{one: "Thai baht", other: "Thai baht"},
+ count: %{one: "Thai baht", other: "Thai baht"},
digits: 2,
iso_digits: 2,
name: "Thai Baht",
@@ -616,7 +616,7 @@ or a rounding: 0,
symbol: "THB",
tender: true
-}}
+}}
@@ -675,12 +675,12 @@ or a
Examples
-iex> Plausible.Cldr.Currency.currency_for_code!("AUD")
-%Cldr.Currency{
+iex> Plausible.Cldr.Currency.currency_for_code!("AUD")
+%Cldr.Currency{
cash_digits: 2,
cash_rounding: 0,
code: "AUD",
- count: %{one: "Australian dollar", other: "Australian dollars"},
+ count: %{one: "Australian dollar", other: "Australian dollars"},
digits: 2,
iso_digits: 2,
name: "Australian Dollar",
@@ -688,14 +688,14 @@ or a rounding: 0,
symbol: "A$",
tender: true
-}
+}
-iex> Plausible.Cldr.Currency.currency_for_code!("THB")
-%Cldr.Currency{
+iex> Plausible.Cldr.Currency.currency_for_code!("THB")
+%Cldr.Currency{
cash_digits: 2,
cash_rounding: 0,
code: "THB",
- count: %{one: "Thai baht", other: "Thai baht"},
+ count: %{one: "Thai baht", other: "Thai baht"},
digits: 2,
iso_digits: 2,
name: "Thai Baht",
@@ -703,7 +703,7 @@ or a rounding: 0,
symbol: "THB",
tender: true
-}
+}
@@ -744,15 +744,15 @@ or a
Examples
-iex> {:ok, locale} = Plausible.Cldr.validate_locale("en")
+iex> {:ok, locale} = Plausible.Cldr.validate_locale("en")
iex> Plausible.Cldr.Currency.currency_from_locale locale
:USD
-iex> {:ok, locale} = Plausible.Cldr.validate_locale("en-AU")
+iex> {:ok, locale} = Plausible.Cldr.validate_locale("en-AU")
iex> Plausible.Cldr.Currency.currency_from_locale locale
:AUD
-iex> Plausible.Cldr.Currency.currency_from_locale("en-GB")
+iex> Plausible.Cldr.Currency.currency_from_locale("en-GB")
:GBP
@@ -796,14 +796,14 @@ or a
Example
-iex> MyApp.Cldr.Currency.currency_history_for_locale("en")
-{:ok,
- %{
- USD: %{from: ~D[1792-01-01], to: nil},
- USN: %{tender: false},
- USS: %{from: nil, tender: false, to: ~D[2014-03-01]}
- }
-}
+iex> MyApp.Cldr.Currency.currency_history_for_locale("en")
+{:ok,
+ %{
+ USD: %{from: ~D[1792-01-01], to: nil},
+ USN: %{tender: false},
+ USS: %{from: nil, tender: false, to: ~D[2014-03-01]}
+ }
+}
@@ -862,9 +862,9 @@ The default is :all. See Example
-MyApp.Cldr.Currency.currency_strings("en")
-=> {:ok,
- %{
+MyApp.Cldr.Currency.currency_strings("en")
+=> {:ok,
+ %{
"mexican silver pesos" => :MXP,
"sudanese dinar" => :SDD,
"bad" => :BAD,
@@ -874,7 +874,7 @@ The default is :all. See "guyanaese dollars" => :GYD,
"equatorial guinean ekwele" => :GQE,
...
- }}
+ }}
@@ -933,8 +933,8 @@ The default is :all. See Example
-MyApp.Cldr.Currency.currency_strings!("en")
-=> %{
+MyApp.Cldr.Currency.currency_strings!("en")
+=> %{
"mexican silver pesos" => :MXP,
"sudanese dinar" => :SDD,
"bad" => :BAD,
@@ -944,7 +944,7 @@ The default is :all. See "guyanaese dollars" => :GYD,
"equatorial guinean ekwele" => :GQE,
...
- }
+ }
@@ -982,10 +982,10 @@ or a
Example
-iex> MyApp.Cldr.Currency.current_currency_from_locale("en")
+iex> MyApp.Cldr.Currency.current_currency_from_locale("en")
:USD
-iex> MyApp.Cldr.Currency.current_currency_from_locale("en-AU")
+iex> MyApp.Cldr.Currency.current_currency_from_locale("en-AU")
:AUD
@@ -1033,7 +1033,7 @@ mapping is returned for that territory.Example
-iex> Plausible.Cldr.Currency.current_territory_currencies()
+iex> Plausible.Cldr.Currency.current_territory_currencies()
@@ -1125,11 +1125,11 @@ currency codeExamples
-iex> Plausible.Cldr.Currency.known_currency_code("AUD")
-{:ok, :AUD}
+iex> Plausible.Cldr.Currency.known_currency_code("AUD")
+{:ok, :AUD}
-iex> Plausible.Cldr.Currency.known_currency_code("GGG")
-{:error, {Cldr.UnknownCurrencyError, "The currency \"GGG\" is invalid"}}
+iex> Plausible.Cldr.Currency.known_currency_code("GGG")
+{:error, {Cldr.UnknownCurrencyError, "The currency \"GGG\" is invalid"}}
@@ -1176,13 +1176,13 @@ currency codeExamples
-iex> Plausible.Cldr.Currency.known_currency_code?("AUD")
+iex> Plausible.Cldr.Currency.known_currency_code?("AUD")
true
-iex> Plausible.Cldr.Currency.known_currency_code?("GGG")
+iex> Plausible.Cldr.Currency.known_currency_code?("GGG")
false
-iex> Plausible.Cldr.Currency.known_currency_code?(:XCV)
+iex> Plausible.Cldr.Currency.known_currency_code?(:XCV)
false
@@ -1217,7 +1217,7 @@ currency codeExample
-iex> Plausible.Cldr.Currency.known_currency_codes()
+iex> Plausible.Cldr.Currency.known_currency_codes()
@@ -1276,14 +1276,14 @@ such as 0.05. Optional.Example
-iex> Plausible.Cldr.Currency.new(:XAE, name: "Custom Name", digits: 0)
-{:ok,
- %Cldr.Currency{
+iex> Plausible.Cldr.Currency.new(:XAE, name: "Custom Name", digits: 0)
+{:ok,
+ %Cldr.Currency{
alt_code: :XAE,
cash_digits: 0,
cash_rounding: nil,
code: :XAE,
- count: %{other: "Custom Name"},
+ count: %{other: "Custom Name"},
digits: 0,
from: nil,
iso_digits: 0,
@@ -1293,11 +1293,11 @@ such as 0.05. Optional.symbol
: "XAE",
tender: false,
to: nil
- }}
-iex> MyApp.Cldr.Currency.new(:XAH, name: "Custom Name")
-{:error, "Required options are missing. Required options are [:name, :digits]"}
-iex> Plausible.Cldr.Currency.new(:XAE, name: "XAE", digits: 0)
-{:error, {Cldr.CurrencyAlreadyDefined, "Currency :XAE is already defined."}}
+ }}
+iex> MyApp.Cldr.Currency.new(:XAH, name: "Custom Name")
+{:error, "Required options are missing. Required options are [:name, :digits]"}
+iex> Plausible.Cldr.Currency.new(:XAE, name: "XAE", digits: 0)
+{:error, {Cldr.CurrencyAlreadyDefined, "Currency :XAE is already defined."}}
@@ -1355,20 +1355,20 @@ default is Plaus
Examples
-iex> Plausible.Cldr.Currency.pluralize(1, :USD)
-{:ok, "US dollar"}
+iex> Plausible.Cldr.Currency.pluralize(1, :USD)
+{:ok, "US dollar"}
-iex> Plausible.Cldr.Currency.pluralize(3, :USD)
-{:ok, "US dollars"}
+iex> Plausible.Cldr.Currency.pluralize(3, :USD)
+{:ok, "US dollars"}
-iex> Plausible.Cldr.Currency.pluralize(12, :USD, locale: "zh")
-{:ok, "美元"}
+iex> Plausible.Cldr.Currency.pluralize(12, :USD, locale: "zh")
+{:ok, "美元"}
-iex> Plausible.Cldr.Currency.pluralize(12, :USD, locale: "fr")
-{:ok, "dollars des États-Unis"}
+iex> Plausible.Cldr.Currency.pluralize(12, :USD, locale: "fr")
+{:ok, "dollars des États-Unis"}
-iex> Plausible.Cldr.Currency.pluralize(1, :USD, locale: "fr")
-{:ok, "dollar des États-Unis"}
+iex> Plausible.Cldr.Currency.pluralize(1, :USD, locale: "fr")
+{:ok, "dollar des États-Unis"}
@@ -1410,8 +1410,8 @@ or a
Example
-iex> MyApp.Cldr.Currency.strings_for_currency(:AUD, "en")
-["a$", "australian dollars", "aud", "australian dollar"]
+iex> MyApp.Cldr.Currency.strings_for_currency(:AUD, "en")
+["a$", "australian dollars", "aud", "australian dollar"]
diff --git a/Plausible.Cldr.Locale.html b/Plausible.Cldr.Locale.html
index ab48e5b44..40e20ad61 100644
--- a/Plausible.Cldr.Locale.html
+++ b/Plausible.Cldr.Locale.html
@@ -14,7 +14,7 @@
-
+
@@ -326,16 +326,16 @@ this specific locale..Examples
-iex> Plausible.Cldr.Locale.fallback_locale_names(:"fr-CA")
-{:ok, [:"fr-CA", :fr, :und]}
+iex> Plausible.Cldr.Locale.fallback_locale_names(:"fr-CA")
+{:ok, [:"fr-CA", :fr, :und]}
# Fallbacks are typically formed by progressively
# stripping variant, territory and script from the
# given locale name. But not always - there are
# certain fallbacks that take a different path.
-iex> Plausible.Cldr.Locale.fallback_locale_names(:nb)
-{:ok, [:nb, :no, :und]}
+iex> Plausible.Cldr.Locale.fallback_locale_names(:nb)
+{:ok, [:nb, :no, :und]}
@@ -389,20 +389,20 @@ this specific locale.Examples
-Plausible.Cldr.Locale.fallback_locales(:"fr-CA")
-=> {:ok,
- [#Cldr.LanguageTag<fr-CA [validated]>, #Cldr.LanguageTag<fr [validated]>,
- #Cldr.LanguageTag<und [validated]>]}
+Plausible.Cldr.Locale.fallback_locales(:"fr-CA")
+=> {:ok,
+ [#Cldr.LanguageTag<fr-CA [validated]>, #Cldr.LanguageTag<fr [validated]>,
+ #Cldr.LanguageTag<und [validated]>]}
# Fallbacks are typically formed by progressively
# stripping variant, territory and script from the
# given locale name. But not always - there are
# certain fallbacks that take a different path.
-Plausible.Cldr.Locale.fallback_locales(:nb))
-=> {:ok,
- [#Cldr.LanguageTag<nb [validated]>, #Cldr.LanguageTag<no [validated]>,
- #Cldr.LanguageTag<und [validated]>]}
+Plausible.Cldr.Locale.fallback_locales(:nb))
+=> {:ok,
+ [#Cldr.LanguageTag<nb [validated]>, #Cldr.LanguageTag<no [validated]>,
+ #Cldr.LanguageTag<und [validated]>]}
@@ -533,15 +533,15 @@ generic top-level domain names.Examples
iex> Plausible.Cldr.Locale.locale_from_host "a.b.com.au"
-Elixir.Plausible.Cldr.validate_locale(:"en-AU")
+Elixir.Plausible.Cldr.validate_locale(:"en-AU")
-iex> Plausible.Cldr.Locale.locale_from_host("a.b.com.tv")
-{:error,
- {Cldr.UnknownLocaleError, "No locale was identified for territory \"tv\""}}
+iex> Plausible.Cldr.Locale.locale_from_host("a.b.com.tv")
+{:error,
+ {Cldr.UnknownLocaleError, "No locale was identified for territory \"tv\""}}
-iex> Plausible.Cldr.Locale.locale_from_host("a.b.com")
-{:error,
- {Cldr.UnknownLocaleError, "No locale was identified for territory \"com\""}}
+iex> Plausible.Cldr.Locale.locale_from_host("a.b.com")
+{:error,
+ {Cldr.UnknownLocaleError, "No locale was identified for territory \"com\""}}
@@ -683,12 +683,12 @@ be a territory.Examples
-iex> Cldr.Locale.territory_from_host("a.b.com.au")
-{:ok, :AU}
+iex> Cldr.Locale.territory_from_host("a.b.com.au")
+{:ok, :AU}
-iex> Cldr.Locale.territory_from_host("a.b.com")
-{:error,
- {Cldr.UnknownLocaleError, "No locale was identified for territory \"com\""}}
+iex> Cldr.Locale.territory_from_host("a.b.com")
+{:error,
+ {Cldr.UnknownLocaleError, "No locale was identified for territory \"com\""}}
diff --git a/Plausible.Cldr.Number.Cardinal.html b/Plausible.Cldr.Number.Cardinal.html
index d7e982678..1895330ad 100644
--- a/Plausible.Cldr.Number.Cardinal.html
+++ b/Plausible.Cldr.Number.Cardinal.html
@@ -14,7 +14,7 @@
-
+
@@ -455,31 +455,31 @@ The valid substitution keys are :zero, Examples
-iex> Plausible.Cldr.Number.Cardinal.pluralize 1, "en", %{one: "one"}
+iex> Plausible.Cldr.Number.Cardinal.pluralize 1, "en", %{one: "one"}
"one"
-iex> Plausible.Cldr.Number.Cardinal.pluralize 2, "en", %{one: "one"}
+iex> Plausible.Cldr.Number.Cardinal.pluralize 2, "en", %{one: "one"}
nil
-iex> Plausible.Cldr.Number.Cardinal.pluralize 2, "en", %{one: "one", two: "two", other: "other"}
+iex> Plausible.Cldr.Number.Cardinal.pluralize 2, "en", %{one: "one", two: "two", other: "other"}
"other"
-iex> Plausible.Cldr.Number.Cardinal.pluralize 22, "en", %{one: "one", two: "two", other: "other"}
+iex> Plausible.Cldr.Number.Cardinal.pluralize 22, "en", %{one: "one", two: "two", other: "other"}
"other"
-iex> Plausible.Cldr.Number.Cardinal.pluralize Decimal.new(1), "en", %{one: "one"}
+iex> Plausible.Cldr.Number.Cardinal.pluralize Decimal.new(1), "en", %{one: "one"}
"one"
-iex> Plausible.Cldr.Number.Cardinal.pluralize Decimal.new(2), "en", %{one: "one"}
+iex> Plausible.Cldr.Number.Cardinal.pluralize Decimal.new(2), "en", %{one: "one"}
nil
-iex> Plausible.Cldr.Number.Cardinal.pluralize Decimal.new(2), "en", %{one: "one", two: "two"}
+iex> Plausible.Cldr.Number.Cardinal.pluralize Decimal.new(2), "en", %{one: "one", two: "two"}
nil
-iex> Plausible.Cldr.Number.Cardinal.pluralize 1..10, "ar", %{one: "one", few: "few", other: "other"}
+iex> Plausible.Cldr.Number.Cardinal.pluralize 1..10, "ar", %{one: "one", few: "few", other: "other"}
"few"
-iex> Plausible.Cldr.Number.Cardinal.pluralize 1..10, "en", %{one: "one", few: "few", other: "other"}
+iex> Plausible.Cldr.Number.Cardinal.pluralize 1..10, "en", %{one: "one", few: "few", other: "other"}
"other"
diff --git a/Plausible.Cldr.Number.Format.html b/Plausible.Cldr.Number.Format.html
index bef29a975..eed336c55 100644
--- a/Plausible.Cldr.Number.Format.html
+++ b/Plausible.Cldr.Number.Format.html
@@ -14,7 +14,7 @@
-
+
@@ -468,7 +468,7 @@ to precompile all the known formats at compile time.Example
#=> Plausible.Cldr.Number.Format.Format.decimal_format_list
-["#", "#,##,##0%",
+["#", "#,##,##0%",
"#,##,##0.###", "#,##,##0.00¤", "#,##,##0.00¤;(#,##,##0.00¤)",
"#,##,##0 %", "#,##0%", "#,##0.###", "#,##0.00 ¤",
"#,##0.00 ¤;(#,##0.00 ¤)", "#,##0.00¤", "#,##0.00¤;(#,##0.00¤)",
@@ -478,7 +478,7 @@ to precompile all the known formats at compile time."000 B ¤"
, "000 E ¤", "000 K ¤", "000 MRD ¤", "000 Md ¤", "000 Mio'.' ¤",
"000 Mio ¤", "000 Mld ¤", "000 Mln ¤", "000 Mn ¤", "000 Mrd'.' ¤",
"000 Mrd ¤", "000 Mr ¤", "000 M ¤", "000 NT ¤", "000 N ¤", "000 Tn ¤",
-"000 Tr ¤", ...]
+"000 Tr ¤", ...]
iex> Plausible.Cldr.Number.Format.decimal_format_list_for(:en)
-{:ok, ["#,##0%", "#,##0.###", "#,##0.00", "#,##0.00;(#,##0.00)","#E0",
+iex> Plausible.Cldr.Number.Format.decimal_format_list_for(:en)
+{:ok, ["#,##0%", "#,##0.###", "#,##0.00", "#,##0.00;(#,##0.00)","#E0",
"0 billion", "0 million", "0 thousand",
"0 trillion", "00 billion", "00 million", "00 thousand", "00 trillion",
"000 billion", "000 million", "000 thousand", "000 trillion", "000B", "000K",
@@ -535,7 +535,7 @@ the known formats at compile time. Its use is not otherwise recommended."¤#,##0.00", "¤#,##0.00;(¤#,##0.00)", "¤000B", "¤000K", "¤000M",
"¤000T", "¤00B", "¤00K", "¤00M", "¤00T", "¤0B", "¤0K", "¤0M", "¤0T",
"¤ #,##0.00", "¤ #,##0.00;(¤ #,##0.00)", "¤ 000B", "¤ 000K", "¤ 000M",
- "¤ 000T", "¤ 00B", "¤ 00K", "¤ 00M", "¤ 00T", "¤ 0B", "¤ 0K", "¤ 0M", "¤ 0T"]}
+ "¤ 000T", "¤ 00B", "¤ 00K", "¤ 00M", "¤ 00T", "¤ 0B", "¤ 0K", "¤ 0M", "¤ 0T"]}
Plausible.Cld
Examples
-iex> Plausible.Cldr.Number.Format.default_grouping_for(:en)
-{:ok, %{fraction: %{first: 0, rest: 0}, integer: %{first: 3, rest: 3}}}
+iex> Plausible.Cldr.Number.Format.default_grouping_for(:en)
+{:ok, %{fraction: %{first: 0, rest: 0}, integer: %{first: 3, rest: 3}}}
Plausible.Cld
Examples
-iex> Plausible.Cldr.Number.Format.default_grouping_for!(:en)
-%{fraction: %{first: 0, rest: 0}, integer: %{first: 3, rest: 3}}
+iex> Plausible.Cldr.Number.Format.default_grouping_for!(:en)
+%{fraction: %{first: 0, rest: 0}, integer: %{first: 3, rest: 3}}
percent: "#,##0 %",
scientific: "#E0",
standard: "#,##0.###"
- currency_short: [{"1000", [one: "0 k ¤", other: "0 k ¤"]},
- {"10000", [one: "00 k ¤", other: "00 k ¤"]},
- {"100000", [one: "000 k ¤", other: "000 k ¤"]},
- {"1000000", [one: "0 M ¤", other: "0 M ¤"]},
- {"10000000", [one: "00 M ¤", other: "00 M ¤"]},
- {"100000000", [one: "000 M ¤", other: "000 M ¤"]},
- {"1000000000", [one: "0 Md ¤", other: "0 Md ¤"]},
- {"10000000000", [one: "00 Md ¤", other: "00 Md ¤"]},
- {"100000000000", [one: "000 Md ¤", other: "000 Md ¤"]},
- {"1000000000000", [one: "0 Bn ¤", other: "0 Bn ¤"]},
- {"10000000000000", [one: "00 Bn ¤", other: "00 Bn ¤"]},
- {"100000000000000", [one: "000 Bn ¤", other: "000 Bn ¤"]}],
+ currency_short: [{"1000", [one: "0 k ¤", other: "0 k ¤"]},
+ {"10000", [one: "00 k ¤", other: "00 k ¤"]},
+ {"100000", [one: "000 k ¤", other: "000 k ¤"]},
+ {"1000000", [one: "0 M ¤", other: "0 M ¤"]},
+ {"10000000", [one: "00 M ¤", other: "00 M ¤"]},
+ {"100000000", [one: "000 M ¤", other: "000 M ¤"]},
+ {"1000000000", [one: "0 Md ¤", other: "0 Md ¤"]},
+ {"10000000000", [one: "00 Md ¤", other: "00 Md ¤"]},
+ {"100000000000", [one: "000 Md ¤", other: "000 Md ¤"]},
+ {"1000000000000", [one: "0 Bn ¤", other: "0 Bn ¤"]},
+ {"10000000000000", [one: "00 Bn ¤", other: "00 Bn ¤"]},
+ {"100000000000000", [one: "000 Bn ¤", other: "000 Bn ¤"]}],
...
}
Plausible.Cld
Examples
-iex> Plausible.Cldr.Number.Format.minimum_grouping_digits_for("en")
-{:ok, 1}
+iex> Plausible.Cldr.Number.Format.minimum_grouping_digits_for("en")
+{:ok, 1}
Plausible.Cld
Examples
-iex> Plausible.Cldr.Number.Format.minimum_grouping_digits_for!("en")
+iex> Plausible.Cldr.Number.Format.minimum_grouping_digits_for!("en")
1
:zero, Examples
-iex> Plausible.Cldr.Number.Ordinal.pluralize 1, :en, %{one: "one"}
+iex> Plausible.Cldr.Number.Ordinal.pluralize 1, :en, %{one: "one"}
"one"
-iex> Plausible.Cldr.Number.Ordinal.pluralize 2, :en, %{one: "one"}
+iex> Plausible.Cldr.Number.Ordinal.pluralize 2, :en, %{one: "one"}
nil
-iex> Plausible.Cldr.Number.Ordinal.pluralize 2, :en, %{one: "one", two: "two"}
+iex> Plausible.Cldr.Number.Ordinal.pluralize 2, :en, %{one: "one", two: "two"}
"two"
-iex> Plausible.Cldr.Number.Ordinal.pluralize 22, :en, %{one: "one", two: "two", other: "other"}
+iex> Plausible.Cldr.Number.Ordinal.pluralize 22, :en, %{one: "one", two: "two", other: "other"}
"two"
-iex> Plausible.Cldr.Number.Ordinal.pluralize Decimal.new(1), :en, %{one: "one"}
+iex> Plausible.Cldr.Number.Ordinal.pluralize Decimal.new(1), :en, %{one: "one"}
"one"
-iex> Plausible.Cldr.Number.Ordinal.pluralize Decimal.new(2), :en, %{one: "one"}
+iex> Plausible.Cldr.Number.Ordinal.pluralize Decimal.new(2), :en, %{one: "one"}
nil
-iex> Plausible.Cldr.Number.Ordinal.pluralize Decimal.new(2), :en, %{one: "one", two: "two"}
+iex> Plausible.Cldr.Number.Ordinal.pluralize Decimal.new(2), :en, %{one: "one", two: "two"}
"two"
-iex> Plausible.Cldr.Number.Ordinal.pluralize 1..10, "ar", %{one: "one", few: "few", other: "other"}
+iex> Plausible.Cldr.Number.Ordinal.pluralize 1..10, "ar", %{one: "one", few: "few", other: "other"}
"other"
-iex> Plausible.Cldr.Number.Ordinal.pluralize 1..10, "en", %{one: "one", few: "few", other: "other"}
+iex> Plausible.Cldr.Number.Ordinal.pluralize 1..10, "en", %{one: "one", few: "few", other: "other"}
"other"
diff --git a/Plausible.Cldr.Number.PluralRule.Range.html b/Plausible.Cldr.Number.PluralRule.Range.html
index 04144db3c..198262502 100644
--- a/Plausible.Cldr.Number.PluralRule.Range.html
+++ b/Plausible.Cldr.Number.PluralRule.Range.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Cldr.Number.Symbol.html b/Plausible.Cldr.Number.Symbol.html
index 55adedd66..e7e84de16 100644
--- a/Plausible.Cldr.Number.Symbol.html
+++ b/Plausible.Cldr.Number.Symbol.html
@@ -14,7 +14,7 @@
-
+
@@ -378,9 +378,9 @@ is Plausible.Cld
Example:
-iex> Plausible.Cldr.Number.Symbol.number_symbols_for(:th)
-{:ok, %{
- latn: %Cldr.Number.Symbol{
+iex> Plausible.Cldr.Number.Symbol.number_symbols_for(:th)
+{:ok, %{
+ latn: %Cldr.Number.Symbol{
decimal: ".",
exponential: "E",
group: ",",
@@ -393,8 +393,8 @@ is Plausible.Cld
plus_sign: "+",
superscripting_exponent: "×",
time_separator: ":"
- },
- thai: %Cldr.Number.Symbol{
+ },
+ thai: %Cldr.Number.Symbol{
decimal: ".",
exponential: "E",
group: ",",
@@ -407,8 +407,8 @@ is Plausible.Cld
plus_sign: "+",
superscripting_exponent: "×",
time_separator: ":"
- }
- }}
+ }
+ }}
diff --git a/Plausible.Cldr.Number.System.html b/Plausible.Cldr.Number.System.html
index 4a7201c38..513bba222 100644
--- a/Plausible.Cldr.Number.System.html
+++ b/Plausible.Cldr.Number.System.html
@@ -14,7 +14,7 @@
-
+
@@ -317,23 +317,23 @@ it is returned as is.Examples
iex> Plausible.Cldr.Number.System.number_system_for "th", :latn
-{:ok, %{digits: "0123456789", type: :numeric}}
+{:ok, %{digits: "0123456789", type: :numeric}}
iex> Plausible.Cldr.Number.System.number_system_for "en", :default
-{:ok, %{digits: "0123456789", type: :numeric}}
+{:ok, %{digits: "0123456789", type: :numeric}}
iex> Plausible.Cldr.Number.System.number_system_for "he", :traditional
-{:ok, %{rules: "hebrew", type: :algorithmic}}
+{:ok, %{rules: "hebrew", type: :algorithmic}}
iex> Plausible.Cldr.Number.System.number_system_for "en", :native
-{:ok, %{digits: "0123456789", type: :numeric}}
+{:ok, %{digits: "0123456789", type: :numeric}}
iex> Plausible.Cldr.Number.System.number_system_for "en", :finance
-{
+{
:error,
- {Cldr.UnknownNumberSystemError,
- "The number system :finance is unknown for the locale named :en. Valid number systems are %{default: :latn, native: :latn}"}
-}
+ {Cldr.UnknownNumberSystemError,
+ "The number system :finance is unknown for the locale named :en. Valid number systems are %{default: :latn, native: :latn}"}
+}
@@ -424,10 +424,10 @@ or a Examples
iex> Plausible.Cldr.Number.System.number_system_names_for "en"
-{:ok, [:latn]}
+{:ok, [:latn]}
iex> Plausible.Cldr.Number.System.number_system_names_for "zz"
-{:error, {Cldr.InvalidLanguageError, "The language \"zz\" is invalid"}}
+{:error, {Cldr.InvalidLanguageError, "The language \"zz\" is invalid"}}
@@ -509,13 +509,13 @@ or a Examples
iex> Plausible.Cldr.Number.System.number_systems_for "en"
-{:ok, %{default: :latn, native: :latn}}
+{:ok, %{default: :latn, native: :latn}}
iex> Plausible.Cldr.Number.System.number_systems_for "th"
-{:ok, %{default: :latn, native: :thai}}
+{:ok, %{default: :latn, native: :thai}}
iex> Plausible.Cldr.Number.System.number_systems_for "zz"
-{:error, {Cldr.InvalidLanguageError, "The language \"zz\" is invalid"}}
+{:error, {Cldr.InvalidLanguageError, "The language \"zz\" is invalid"}}
@@ -613,20 +613,20 @@ actual system name.Examples
-ex> Plausible.Cldr.Number.System.system_name_from(:default, "en")
-{:ok, :latn}
+ex> Plausible.Cldr.Number.System.system_name_from(:default, "en")
+{:ok, :latn}
-iex> Plausible.Cldr.Number.System.system_name_from("latn", "en")
-{:ok, :latn}
+iex> Plausible.Cldr.Number.System.system_name_from("latn", "en")
+{:ok, :latn}
-iex> Plausible.Cldr.Number.System.system_name_from(:native, "en")
-{:ok, :latn}
+iex> Plausible.Cldr.Number.System.system_name_from(:native, "en")
+{:ok, :latn}
-iex> Plausible.Cldr.Number.System.system_name_from(:nope, "en")
-{
+iex> Plausible.Cldr.Number.System.system_name_from(:nope, "en")
+{
:error,
- {Cldr.UnknownNumberSystemError, "The number system :nope is unknown"}
-}
Note that return value is not guaranteed to be a valid
+
{Cldr.UnknownNumberSystemError, "The number system :nope is unknown"}
+}
Note that return value is not guaranteed to be a valid
number system for the given locale as demonstrated in the third example.
@@ -673,16 +673,16 @@ is recommended.Examples
iex> Plausible.Cldr.Number.System.to_system 123456, :hebr
-{:ok, "קכ״ג׳תנ״ו"}
+{:ok, "קכ״ג׳תנ״ו"}
iex> Plausible.Cldr.Number.System.to_system 123, :hans
-{:ok, "一百二十三"}
+{:ok, "一百二十三"}
iex> Plausible.Cldr.Number.System.to_system 123, :hant
-{:ok, "一百二十三"}
+{:ok, "一百二十三"}
iex> Plausible.Cldr.Number.System.to_system 123, :hansfin
-{:ok, "壹佰贰拾叁"}
+{:ok, "壹佰贰拾叁"}
To configure these transliteration pairs, add the to the use Cldr configuration
-in a backend module:
defmodule MyApp.Cldr do
+in a backend module:defmodule MyApp.Cldr do
use Cldr,
- locale: ["en", "fr", "th"],
+ locale: ["en", "fr", "th"],
default_locale: "en",
- precompile_transliterations: [{:latn, :thai}, {:arab, :thai}]
-end
Where each tuple in the list configures one transliteration map. In this example, two maps are
+
precompile_transliterations: [{:latn, :thai}, {:arab, :thai}]
+endWhere each tuple in the list configures one transliteration map. In this example, two maps are
configured: from :latn to :thai and from :arab to :thai.
A list of configurable number systems is returned by Cldr.Number.System.numeric_systems/0.
If a transliteration is requested between two number pairs that have not been configured for precompilation, a warning is logged.
Examples
-iex> Plausible.Cldr.Number.Transliterate.transliterate("123556")
+iex> Plausible.Cldr.Number.Transliterate.transliterate("123556")
"123556"
-iex> Plausible.Cldr.Number.Transliterate.transliterate("123,556.000", "fr", :default)
+iex> Plausible.Cldr.Number.Transliterate.transliterate("123,556.000", "fr", :default)
"123 556,000"
-iex> Plausible.Cldr.Number.Transliterate.transliterate("123556", "th", :default)
+iex> Plausible.Cldr.Number.Transliterate.transliterate("123556", "th", :default)
"123556"
-iex> Plausible.Cldr.Number.Transliterate.transliterate("123556", "th", "thai")
+iex> Plausible.Cldr.Number.Transliterate.transliterate("123556", "th", "thai")
"๑๒๓๕๕๖"
-iex> Plausible.Cldr.Number.Transliterate.transliterate("123556", "th", :native)
+iex> Plausible.Cldr.Number.Transliterate.transliterate("123556", "th", :native)
"๑๒๓๕๕๖"
-iex> Plausible.Cldr.Number.Transliterate.transliterate("Some number is: 123556", "th", "thai")
+iex> Plausible.Cldr.Number.Transliterate.transliterate("Some number is: 123556", "th", "thai")
"Some number is: ๑๒๓๕๕๖"
diff --git a/Plausible.Cldr.Number.html b/Plausible.Cldr.Number.html
index a4e3afd49..ac7129a3e 100644
--- a/Plausible.Cldr.Number.html
+++ b/Plausible.Cldr.Number.html
@@ -14,7 +14,7 @@
-
+
@@ -441,19 +441,19 @@ using the Elixir standard library functions.
Examples
-iex> Plausible.Cldr.Number.parse("+1.000,34", locale: "de")
-{:ok, 1000.34}
+iex> Plausible.Cldr.Number.parse("+1.000,34", locale: "de")
+{:ok, 1000.34}
-iex> Plausible.Cldr.Number.parse("-1_000_000.34")
-{:ok, -1000000.34}
+iex> Plausible.Cldr.Number.parse("-1_000_000.34")
+{:ok, -1000000.34}
-iex> Plausible.Cldr.Number.parse("1.000", locale: "de", number: :integer)
-{:ok, 1000}
+iex> Plausible.Cldr.Number.parse("1.000", locale: "de", number: :integer)
+{:ok, 1000}
-iex> Plausible.Cldr.Number.parse("+1.000,34", locale: "de", number: :integer)
-{:error,
- {Cldr.Number.ParseError,
- "The string \"+1.000,34\" could not be parsed as a number"}}
+iex> Plausible.Cldr.Number.parse("+1.000,34", locale: "de", number: :integer)
+{:error,
+ {Cldr.Number.ParseError,
+ "The string \"+1.000,34\" could not be parsed as a number"}}
@@ -525,17 +525,17 @@ financial instruments.
Examples
-iex> Plausible.Cldr.Number.scan("100 US dollars")
+iex> Plausible.Cldr.Number.scan("100 US dollars")
...> |> Plausible.Cldr.Number.resolve_currencies
-[100, :USD]
+[100, :USD]
-iex> Plausible.Cldr.Number.scan("100 eurosports")
-...> |> Plausible.Cldr.Number.resolve_currencies(fuzzy: 0.75)
-[100, :EUR]
+iex> Plausible.Cldr.Number.scan("100 eurosports")
+...> |> Plausible.Cldr.Number.resolve_currencies(fuzzy: 0.75)
+[100, :EUR]
-iex> Plausible.Cldr.Number.scan("100 dollars des États-Unis")
-...> |> Plausible.Cldr.Number.resolve_currencies(locale: "fr")
-[100, :USD]
+iex> Plausible.Cldr.Number.scan("100 dollars des États-Unis")
+...> |> Plausible.Cldr.Number.resolve_currencies(locale: "fr")
+[100, :USD]
@@ -612,19 +612,19 @@ financial instruments.Examples
-iex> Plausible.Cldr.Number.resolve_currency("US dollars")
-[:USD]
+iex> Plausible.Cldr.Number.resolve_currency("US dollars")
+[:USD]
-iex> Plausible.Cldr.Number.resolve_currency("100 eurosports", fuzzy: 0.75)
-[:EUR]
+iex> Plausible.Cldr.Number.resolve_currency("100 eurosports", fuzzy: 0.75)
+[:EUR]
-iex> Plausible.Cldr.Number.resolve_currency("dollars des États-Unis", locale: "fr")
-[:USD]
+iex> Plausible.Cldr.Number.resolve_currency("dollars des États-Unis", locale: "fr")
+[:USD]
-iex> Plausible.Cldr.Number.resolve_currency("not a known currency", locale: "fr")
-{:error,
- {Cldr.UnknownCurrencyError,
- "The currency \"not a known currency\" is unknown or not supported"}}
+iex> Plausible.Cldr.Number.resolve_currency("not a known currency", locale: "fr")
+{:error,
+ {Cldr.UnknownCurrencyError,
+ "The currency \"not a known currency\" is unknown or not supported"}}
@@ -688,13 +688,13 @@ The default is options[:backend].get_locale()
Examples
iex> Plausible.Cldr.Number.resolve_per "11%"
-["11", :percent]
+["11", :percent]
iex> Plausible.Cldr.Number.resolve_per "% of linguists"
-[:percent, " of linguists"]
+[:percent, " of linguists"]
iex> Plausible.Cldr.Number.resolve_per "% of linguists %"
-[:percent, " of linguists ", :percent]
+[:percent, " of linguists ", :percent]
@@ -751,9 +751,9 @@ The default is options[:backend].get_locale()
Examples
-iex> Plausible.Cldr.Number.scan("100%")
-...> |> Plausible.Cldr.Number.resolve_pers()
-[100, :percent]
+iex> Plausible.Cldr.Number.scan("100%")
+...> |> Plausible.Cldr.Number.resolve_pers()
+[100, :percent]
iex> Plausible.Cldr.Number.scan("£1_000_000.34")
-["£", 1000000.34]
+iex> Plausible.Cldr.Number.scan("£1_000_000.34")
+["£", 1000000.34]
-iex> Plausible.Cldr.Number.scan("I want £1_000_000 dollars")
-["I want £", 1000000, " dollars"]
+iex> Plausible.Cldr.Number.scan("I want £1_000_000 dollars")
+["I want £", 1000000, " dollars"]
-iex> Plausible.Cldr.Number.scan("The prize is 23")
-["The prize is ", 23]
+iex> Plausible.Cldr.Number.scan("The prize is 23")
+["The prize is ", 23]
-iex> Plausible.Cldr.Number.scan("The lottery number is 23 for the next draw")
-["The lottery number is ", 23, " for the next draw"]
+iex> Plausible.Cldr.Number.scan("The lottery number is 23 for the next draw")
+["The lottery number is ", 23, " for the next draw"]
-iex> Plausible.Cldr.Number.scan("The loss is -1.000 euros", locale: "de", number: :integer)
-["The loss is ", -1000, " euros"]
+iex> Plausible.Cldr.Number.scan("The loss is -1.000 euros", locale: "de", number: :integer)
+["The loss is ", -1000, " euros"]
iex> Plausible.Cldr.Number.to_approx_string 1234
-{:ok, "~1,234"}
+{:ok, "~1,234"}
iex> Plausible.Cldr.Number.to_at_least_string 1234
-{:ok, "1,234+"}
+{:ok, "1,234+"}
iex> Plausible.Cldr.Number.to_at_most_string 1234
-{:ok, "≤1,234"}
+{:ok, "≤1,234"}
iex> Plausible.Cldr.Number.to_range_string 1234..5678
-{:ok, "1,234–5,678"}
+{:ok, "1,234–5,678"}
iex> Cldr.Number.to_string(100, format: :currency, currency: :USD, wrapper: fn
...> string, :currency_symbol -> "<span class=\"symbol\">" <> string <> "</span>"
...> string, :number -> "<span class=\"number\">" <> string <> "</span>"
...> string, :currency_space -> "<span>" <> string <> "</span>"
...> string, _other -> string
-...> end)
-{:ok, "<span class=\"symbol\">$</span><span class=\"number\">100.00</span>"}It is also possible and recommended to use the Phoenix.HTML.Tag.content_tag/3
+
It is also possible and recommended to use the Phoenix.HTML.Tag.content_tag/3
function if wrapping HTML tags since these will ensure HTML entities are
-correctly encoded. For example:
iex> Cldr.Number.to_string(100, format: :currency, currency: :USD, wrapper: fn
-...> string, :currency_symbol -> Phoenix.HTML.Tag.content_tag(:span, string, class: "symbol")
-...> string, :number -> Phoenix.HTML.Tag.content_tag(:span, string, class: "number")
-...> string, :currency_space -> Phoenix.HTML.Tag.content_tag(:span, string)
+correctly encoded. For example:iex> Cldr.Number.to_string(100, format: :currency, currency: :USD, wrapper: fn
+...> string, :currency_symbol -> Phoenix.HTML.Tag.content_tag(:span, string, class: "symbol")
+...> string, :number -> Phoenix.HTML.Tag.content_tag(:span, string, class: "number")
+...> string, :currency_space -> Phoenix.HTML.Tag.content_tag(:span, string)
...> string, _other -> string
-...> end)
-{:ok, "<span class=\"symbol\">$</span><span class=\"number\">100.00</span>"}
When formatting a number the format is parsed into format elements that might include
+
...> end)
+{:ok, "<span class=\"symbol\">$</span><span class=\"number\">100.00</span>"}When formatting a number the format is parsed into format elements that might include a currency symbol, a literal string, inserted text between a currency symbol and the currency amount, a percent sign, the number itself and several other elements. In some cases it is helpful to be apply specific formatting to each element. @@ -1168,80 +1168,80 @@ inserted in the final formatted number.
iex> Plausible.Cldr.Number.to_string 12345
-{:ok, "12,345"}
+{:ok, "12,345"}
iex> Plausible.Cldr.Number.to_string 12345, locale: "fr"
-{:ok, "12 345"}
+{:ok, "12 345"}
iex> Plausible.Cldr.Number.to_string 1345.32, currency: :EUR, locale: "es", minimum_grouping_digits: 1
-{:ok, "1.345,32 €"}
+{:ok, "1.345,32 €"}
iex> Plausible.Cldr.Number.to_string 1345.32, currency: :EUR, locale: "es"
-{:ok, "1345,32 €"}
+{:ok, "1345,32 €"}
iex> Plausible.Cldr.Number.to_string 12345, locale: "fr", currency: "USD"
-{:ok, "12 345,00 $US"}
+{:ok, "12 345,00 $US"}
iex> Plausible.Cldr.Number.to_string 12345, format: "#E0"
-{:ok, "1.2345E4"}
+{:ok, "1.2345E4"}
iex> Plausible.Cldr.Number.to_string 12345, format: :accounting, currency: "THB"
-{:ok, "THB 12,345.00"}
+{:ok, "THB 12,345.00"}
iex> Plausible.Cldr.Number.to_string -12345, format: :accounting, currency: "THB"
-{:ok, "(THB 12,345.00)"}
+{:ok, "(THB 12,345.00)"}
iex> Plausible.Cldr.Number.to_string 12345, format: :accounting, currency: "THB",
...> locale: "th"
-{:ok, "฿12,345.00"}
+{:ok, "฿12,345.00"}
iex> Plausible.Cldr.Number.to_string 12345, format: :accounting, currency: "THB",
...> locale: "th", number_system: :native
-{:ok, "฿๑๒,๓๔๕.๐๐"}
+{:ok, "฿๑๒,๓๔๕.๐๐"}
iex> Plausible.Cldr.Number.to_string 1244.30, format: :long
-{:ok, "1 thousand"}
+{:ok, "1 thousand"}
iex> Plausible.Cldr.Number.to_string 1244.30, format: :long, currency: "USD"
-{:ok, "1,244 US dollars"}
+{:ok, "1,244 US dollars"}
iex> Plausible.Cldr.Number.to_string 1244.30, format: :short
-{:ok, "1K"}
+{:ok, "1K"}
iex> Plausible.Cldr.Number.to_string 1244.30, format: :short, currency: "EUR"
-{:ok, "€1K"}
+{:ok, "€1K"}
iex> Plausible.Cldr.Number.to_string 1234, format: :spellout
-{:ok, "one thousand two hundred thirty-four"}
+{:ok, "one thousand two hundred thirty-four"}
iex> Plausible.Cldr.Number.to_string 1234, format: :spellout_verbose
-{:ok, "one thousand two hundred and thirty-four"}
+{:ok, "one thousand two hundred and thirty-four"}
iex> Plausible.Cldr.Number.to_string 1989, format: :spellout_year
-{:ok, "nineteen eighty-nine"}
+{:ok, "nineteen eighty-nine"}
iex> Plausible.Cldr.Number.to_string 123, format: :ordinal
-{:ok, "123rd"}
+{:ok, "123rd"}
iex> Plausible.Cldr.Number.to_string 123, format: :roman
-{:ok, "CXXIII"}
+{:ok, "CXXIII"}
iex> Plausible.Cldr.Number.to_string 123, locale: "th-u-nu-thai"
-{:ok, "๑๒๓"}An error tuple {:error, reason} will be returned if an error is detected.
-The two most likely causes of an error return are:
iex> Plausible.Cldr.Number.to_string(12345, format: "0#")
- {:error, {Cldr.FormatCompileError,
- "Decimal format compiler: syntax error before: \"#\""}}locale and
+The two most likely causes of an error return are: iex> Plausible.Cldr.Number.to_string(12345, format: "0#")
+ {:error, {Cldr.FormatCompileError,
+ "Decimal format compiler: syntax error before: \"#\""}}locale and
number_system. This happens typically when the number system is
:algorithmic rather than the more common :numeric. In this case the error
-return looks like: iex> Plausible.Cldr.Number.to_string(1234, locale: "he", number_system: "hebr", format: :percent)
- {:error, {Cldr.UnknownFormatError,
- "The locale :he with number system :hebr does not define a format :percent"}}
+return looks like: iex> Plausible.Cldr.Number.to_string(1234, locale: "he", number_system: "hebr", format: :percent)
+ {:error, {Cldr.UnknownFormatError,
+ "The locale :he with number system :hebr does not define a format :percent"}}
iex> Plausible.Cldr.Number.validate_number_system "en", :latn
-{:ok, :latn}
+{:ok, :latn}
iex> Plausible.Cldr.Number.validate_number_system "en", :default
-{:ok, :latn}
+{:ok, :latn}
iex> Plausible.Cldr.Number.validate_number_system "en", :unknown
-{:error,
- {Cldr.UnknownNumberSystemError, "The number system :unknown is unknown"}}
+{:error,
+ {Cldr.UnknownNumberSystemError, "The number system :unknown is unknown"}}
iex> Plausible.Cldr.Number.validate_number_system "zz", :default
-{:error, {Cldr.InvalidLanguageError, "The language \"zz\" is invalid"}}
+{:error, {Cldr.InvalidLanguageError, "The language \"zz\" is invalid"}}
Functions to implement the number system rule-based-number-format rules of CLDR.
These rules are defined only on the "und" locale and represent specialised number formatting.
The standard public API for RBNF is via the Cldr.Number.to_string/2 function.
The functions on this module are defined at compile time based upon the RBNF rules -defined in the Unicode CLDR data repository. Available rules are identified by:
iex> Plausible.Cldr.Rbnf.NumberSystem.rule_sets(:und)
-...> |> Enum.sort()
-[
+defined in the Unicode CLDR data repository. Available rules are identified by:iex> Plausible.Cldr.Rbnf.NumberSystem.rule_sets(:und)
+...> |> Enum.sort()
+[
:armenian_lower,
:armenian_upper,
:cyrillic_lower,
@@ -161,9 +161,9 @@ defined in the Unicode CLDR data repository. Available rules are identified by:
:roman_upper,
:tamil,
:zz_default
-]
A rule can then be invoked on an available rule_set. For example
iex> Plausible.Cldr.Rbnf.NumberSystem.roman_upper(123, :und)
-"CXXIII"
This particular call is equivalent to the call through the public API of:
iex> Plausible.Cldr.Number.to_string(123, format: :roman)
-{:ok, "CXXIII"}
+]A rule can then be invoked on an available rule_set. For example
iex> Plausible.Cldr.Rbnf.NumberSystem.roman_upper(123, :und)
+"CXXIII"This particular call is equivalent to the call through the public API of:
iex> Plausible.Cldr.Number.to_string(123, format: :roman)
+{:ok, "CXXIII"}
Functions to implement the ordinal rule-based-number-format rules of CLDR.
As CLDR notes, the data is incomplete or non-existent for many languages. It is considered complete for English however.
The standard public API for RBNF is via the Cldr.Number.to_string/2 function.
The functions on this module are defined at compile time based upon the RBNF rules -defined in the Unicode CLDR data repository. Available rules are identified by:
iex> Plausible.Cldr.Rbnf.Ordinal.rule_sets(:en)
-[:digits_ordinal]
+defined in the Unicode CLDR data repository. Available rules are identified by:iex> Plausible.Cldr.Rbnf.Ordinal.rule_sets(:en)
+[:digits_ordinal]
-iex> Plausible.Cldr.Rbnf.Ordinal.rule_sets("fr")
-...> |> Enum.sort()
-[
+iex> Plausible.Cldr.Rbnf.Ordinal.rule_sets("fr")
+...> |> Enum.sort()
+[
:digits_ordinal,
:digits_ordinal_feminine,
:digits_ordinal_feminine_plural,
:digits_ordinal_masculine,
:digits_ordinal_masculine_plural
-]
A rule can then be invoked on an available rule_set. For example
iex> Plausible.Cldr.Rbnf.Ordinal.digits_ordinal(123, :en)
-"123rd"
This call is equivalent to the call through the public API of:
iex> Plausible.Cldr.Number.to_string(123, format: :ordinal)
-{:ok, "123rd"}
+]A rule can then be invoked on an available rule_set. For example
iex> Plausible.Cldr.Rbnf.Ordinal.digits_ordinal(123, :en)
+"123rd"This call is equivalent to the call through the public API of:
iex> Plausible.Cldr.Number.to_string(123, format: :ordinal)
+{:ok, "123rd"}
Functions to implement the spellout rule-based-number-format rules of CLDR.
As CLDR notes, the data is incomplete or non-existent for many languages. It is considered complete for English however.
The standard public API for RBNF is via the Cldr.Number.to_string/2 function.
The functions on this module are defined at compile time based upon the RBNF rules -defined in the Unicode CLDR data repository. Available rules are identified by:
iex> Plausible.Cldr.Rbnf.Spellout.rule_sets("en")
-...> |> Enum.sort()
-[
+defined in the Unicode CLDR data repository. Available rules are identified by:iex> Plausible.Cldr.Rbnf.Spellout.rule_sets("en")
+...> |> Enum.sort()
+[
:spellout_cardinal,
:spellout_cardinal_verbose,
:spellout_numbering,
@@ -155,9 +155,9 @@ defined in the Unicode CLDR data repository. Available rules are identified by:
:spellout_numbering_year,
:spellout_ordinal,
:spellout_ordinal_verbose
-]
A rule can then be invoked on an available rule_set. For example:
iex> Plausible.Cldr.Rbnf.Spellout.spellout_ordinal(123, "en")
-"one hundred twenty-third"
This call is equivalent to the call through the public API of:
iex> Plausible.Cldr.Number.to_string(123, format: :spellout)
-{:ok, "one hundred twenty-three"}
+]A rule can then be invoked on an available rule_set. For example:
iex> Plausible.Cldr.Rbnf.Spellout.spellout_ordinal(123, "en")
+"one hundred twenty-third"This call is equivalent to the call through the public API of:
iex> Plausible.Cldr.Number.to_string(123, format: :spellout)
+{:ok, "one hundred twenty-three"}
iex> Plausible.Cldr.default_locale()
-%Cldr.LanguageTag{
+iex> Plausible.Cldr.default_locale()
+%Cldr.LanguageTag{
backend: Plausible.Cldr,
canonical_locale_name: "en-001",
cldr_locale_name: :"en-001",
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: "en",
language: "en",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :en,
requested_locale_name: "en-001",
script: :Latn,
territory: :"001",
- transform: %{},
- language_variants: []
-}
+ transform: %{},
+ language_variants: []
+}
iex> Plausible.Cldr.default_territory()
+iex> Plausible.Cldr.default_territory()
:"001"
iex> Plausible.Cldr.ellipsis("And furthermore")
+iex> Plausible.Cldr.ellipsis("And furthermore")
"And furthermore…"
-iex> Plausible.Cldr.ellipsis(["And furthermore", "there is much to be done"], locale: :ja)
+iex> Plausible.Cldr.ellipsis(["And furthermore", "there is much to be done"], locale: :ja)
"And furthermore…there is much to be done"
-iex> Plausible.Cldr.ellipsis("And furthermore", format: :word)
+iex> Plausible.Cldr.ellipsis("And furthermore", format: :word)
"And furthermore …"
-iex> Plausible.Cldr.ellipsis(["And furthermore", "there is much to be done"], locale: :ja, format: :word)
+iex> Plausible.Cldr.ellipsis(["And furthermore", "there is much to be done"], locale: :ja, format: :word)
"And furthermore … there is much to be done"
@@ -715,23 +715,23 @@ take an optional locale parameter for which a locale is not supplied.
Example
-iex> Plausible.Cldr.put_locale("pl")
-iex> Plausible.Cldr.get_locale()
-%Cldr.LanguageTag{
+iex> Plausible.Cldr.put_locale("pl")
+iex> Plausible.Cldr.get_locale()
+%Cldr.LanguageTag{
backend: Elixir.Plausible.Cldr,
canonical_locale_name: "pl",
cldr_locale_name: :pl,
- extensions: %{},
+ extensions: %{},
language: "pl",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :pl,
territory: :PL,
requested_locale_name: "pl",
script: :Latn,
- transform: %{},
- language_variants: []
- }
+ transform: %{},
+ language_variants: []
+ }
@@ -818,10 +818,10 @@ take an optional locale parameter for which a locale is not supplied.
Examples
-iex> Plausible.Cldr.known_gettext_locale_name("en")
+iex> Plausible.Cldr.known_gettext_locale_name("en")
"en"
-iex> Plausible.Cldr.known_gettext_locale_name("en-SA")
+iex> Plausible.Cldr.known_gettext_locale_name("en-SA")
false
@@ -864,10 +864,10 @@ name is configured and available in Gettext.Examples
-iex> Plausible.Cldr.known_gettext_locale_name?("en")
+iex> Plausible.Cldr.known_gettext_locale_name?("en")
true
-iex> Plausible.Cldr.known_gettext_locale_name?("!!")
+iex> Plausible.Cldr.known_gettext_locale_name?("!!")
false
@@ -941,10 +941,10 @@ to return the first known locale name from a list.Examples
-iex> Plausible.Cldr.known_locale_name(:"en-AU")
+iex> Plausible.Cldr.known_locale_name(:"en-AU")
:"en-AU"
-iex> Plausible.Cldr.known_locale_name(:"en-SA")
+iex> Plausible.Cldr.known_locale_name(:"en-SA")
false
@@ -986,10 +986,10 @@ name is configured and available in Cldr.Examples
-iex> Plausible.Cldr.known_locale_name?(:en)
+iex> Plausible.Cldr.known_locale_name?(:en)
true
-iex> Plausible.Cldr.known_locale_name?(:"!!")
+iex> Plausible.Cldr.known_locale_name?(:"!!")
false
@@ -1043,8 +1043,8 @@ in this module or in
Example
-iex> Plausible.Cldr.known_number_system_types()
-[:default, :finance, :native, :traditional]
+iex> Plausible.Cldr.known_number_system_types()
+[:default, :finance, :native, :traditional]
@@ -1109,10 +1109,10 @@ and has RBNF rules defined.
Examples
-iex> Plausible.Cldr.known_rbnf_locale_name(:en)
+iex> Plausible.Cldr.known_rbnf_locale_name(:en)
:en
-iex> Plausible.Cldr.known_rbnf_locale_name(:"en-SA")
+iex> Plausible.Cldr.known_rbnf_locale_name(:"en-SA")
false
@@ -1155,10 +1155,10 @@ rules based number formats (RBNF).Examples
-iex> Plausible.Cldr.known_rbnf_locale_name?(:en)
+iex> Plausible.Cldr.known_rbnf_locale_name?(:en)
true
-iex> Plausible.Cldr.known_rbnf_locale_name?(:"!!")
+iex> Plausible.Cldr.known_rbnf_locale_name?(:"!!")
false
@@ -1294,14 +1294,14 @@ CLDR backend defined by the t:Cldr.LanguageTag is se
Examples
iex> import Cldr.LanguageTag.Sigil
-iex> Plausible.Cldr.put_gettext_locale(~l"en")
-{:ok, "en"}
+iex> Plausible.Cldr.put_gettext_locale(~l"en")
+{:ok, "en"}
iex> import Cldr.LanguageTag.Sigil
-iex> Plausible.Cldr.put_gettext_locale(~l"de")
-{:error,
- {Cldr.UnknownLocaleError,
- "Locale #Cldr.LanguageTag<de [validated]> does not map to a known gettext locale name"}}
+iex> Plausible.Cldr.put_gettext_locale(~l"de")
+{:error,
+ {Cldr.UnknownLocaleError,
+ "Locale #Cldr.LanguageTag<de [validated]> does not map to a known gettext locale name"}}
@@ -1345,29 +1345,29 @@ of a language tag.
Examples
-iex> Plausible.Cldr.put_locale("en")
-{:ok,
- %Cldr.LanguageTag{
+iex> Plausible.Cldr.put_locale("en")
+{:ok,
+ %Cldr.LanguageTag{
backend: Plausible.Cldr,
canonical_locale_name: "en",
cldr_locale_name: :en,
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: "en",
language: "en",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :en,
requested_locale_name: "en",
script: :Latn,
territory: :US,
- transform: %{},
- language_variants: []
- }}
+ transform: %{},
+ language_variants: []
+ }}
-iex> Plausible.Cldr.put_locale("invalid-locale!")
-{:error, {Cldr.LanguageTag.ParseError,
- "Expected a BCP47 language tag. Could not parse the remaining \"!\" starting at position 15"}}
+iex> Plausible.Cldr.put_locale("invalid-locale!")
+{:error, {Cldr.LanguageTag.ParseError,
+ "Expected a BCP47 language tag. Could not parse the remaining \"!\" starting at position 15"}}
@@ -1416,10 +1416,10 @@ The default is Examples
-iex> Plausible.Cldr.quote("Quoted String")
+iex> Plausible.Cldr.quote("Quoted String")
"“Quoted String”"
-iex> Plausible.Cldr.quote("Quoted String", locale: :ja)
+iex> Plausible.Cldr.quote("Quoted String", locale: :ja)
"「Quoted String」"
@@ -1550,47 +1550,47 @@ of a language tag.Examples
-iex> Plausible.Cldr.validate_locale(:en)
-{:ok,
-%Cldr.LanguageTag{
+iex> Plausible.Cldr.validate_locale(:en)
+{:ok,
+%Cldr.LanguageTag{
backend: Plausible.Cldr,
canonical_locale_name: "en",
cldr_locale_name: :en,
- extensions: %{},
+ extensions: %{},
gettext_locale_name: "en",
language: "en",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :en,
requested_locale_name: "en",
script: :Latn,
territory: :US,
- transform: %{},
- language_variants: []
-}}
+ transform: %{},
+ language_variants: []
+}}
-iex> Plausible.Cldr.validate_locale Plausible.Cldr.default_locale()
-{:ok,
-%Cldr.LanguageTag{
+iex> Plausible.Cldr.validate_locale Plausible.Cldr.default_locale()
+{:ok,
+%Cldr.LanguageTag{
backend: Plausible.Cldr,
canonical_locale_name: "en-001",
cldr_locale_name: :"en-001",
- extensions: %{},
+ extensions: %{},
gettext_locale_name: "en",
language: "en",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :en,
requested_locale_name: "en-001",
script: :Latn,
territory: :"001",
- transform: %{},
- language_variants: []
-}}
+ transform: %{},
+ language_variants: []
+}}
-iex> Plausible.Cldr.validate_locale("zzz")
-{:error, {Cldr.InvalidLanguageError, "The language \"zzz\" is invalid"}}
+iex> Plausible.Cldr.validate_locale("zzz")
+{:error, {Cldr.InvalidLanguageError, "The language \"zzz\" is invalid"}}
@@ -1660,23 +1660,23 @@ of a language tag.Examples
-iex> Plausible.Cldr.validate_number_system_type(:default)
-{:ok, :default}
+iex> Plausible.Cldr.validate_number_system_type(:default)
+{:ok, :default}
-iex> Plausible.Cldr.validate_number_system_type(:traditional)
-{:ok, :traditional}
+iex> Plausible.Cldr.validate_number_system_type(:traditional)
+{:ok, :traditional}
-iex> Plausible.Cldr.validate_number_system_type(:latn)
-{
+iex> Plausible.Cldr.validate_number_system_type(:latn)
+{
:error,
- {Cldr.UnknownNumberSystemTypeError, "The number system type :latn is unknown"}
-}
+ {Cldr.UnknownNumberSystemTypeError, "The number system type :latn is unknown"}
+}
-iex> Plausible.Cldr.validate_number_system_type("bork")
-{
+iex> Plausible.Cldr.validate_number_system_type("bork")
+{
:error,
- {Cldr.UnknownNumberSystemTypeError, "The number system type \"bork\" is invalid"}
-}
+ {Cldr.UnknownNumberSystemTypeError, "The number system type \"bork\" is invalid"}
+}
diff --git a/Plausible.ClickhouseEventV2.html b/Plausible.ClickhouseEventV2.html
index b56d46919..732f3a4a3 100644
--- a/Plausible.ClickhouseEventV2.html
+++ b/Plausible.ClickhouseEventV2.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.ClickhouseRepo.html b/Plausible.ClickhouseRepo.html
index d3aba0ee5..00d845247 100644
--- a/Plausible.ClickhouseRepo.html
+++ b/Plausible.ClickhouseRepo.html
@@ -14,7 +14,7 @@
-
+
@@ -845,23 +845,23 @@ pool to disconnect within the given interval.
diff --git a/Plausible.ClickhouseSessionV2.BoolUInt8.html b/Plausible.ClickhouseSessionV2.BoolUInt8.html
index 881b87300..7ea526603 100644
--- a/Plausible.ClickhouseSessionV2.BoolUInt8.html
+++ b/Plausible.ClickhouseSessionV2.BoolUInt8.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.ClickhouseSessionV2.html b/Plausible.ClickhouseSessionV2.html
index ce8a19e7b..2b3f29525 100644
--- a/Plausible.ClickhouseSessionV2.html
+++ b/Plausible.ClickhouseSessionV2.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.ConfigHelpers.html b/Plausible.ConfigHelpers.html
index 45018943b..1cc68cb11 100644
--- a/Plausible.ConfigHelpers.html
+++ b/Plausible.ConfigHelpers.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.DataCase.html b/Plausible.DataCase.html
index cd5c40bc4..2036b4fba 100644
--- a/Plausible.DataCase.html
+++ b/Plausible.DataCase.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.DataMigration.NumericIDs.html b/Plausible.DataMigration.NumericIDs.html
index 6c0037ac1..1407d532b 100644
--- a/Plausible.DataMigration.NumericIDs.html
+++ b/Plausible.DataMigration.NumericIDs.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.DataMigration.PopulateEventSessionColumns.html b/Plausible.DataMigration.PopulateEventSessionColumns.html
index 99e2a152a..4a009f613 100644
--- a/Plausible.DataMigration.PopulateEventSessionColumns.html
+++ b/Plausible.DataMigration.PopulateEventSessionColumns.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.DataMigration.Repo.html b/Plausible.DataMigration.Repo.html
index 8834a111e..5a49b3bce 100644
--- a/Plausible.DataMigration.Repo.html
+++ b/Plausible.DataMigration.Repo.html
@@ -14,7 +14,7 @@
-
+
@@ -1152,23 +1152,23 @@ pool to disconnect within the given interval.See
-Similar to insert_all/2 but with the following differences:
- accepts rows as streams or lists
- sends rows as a chunked request
- doesn't autogenerate ids or does any other preprocessing
Example:
Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
+Similar to insert_all/2 but with the following differences:
- accepts rows as streams or lists
- sends rows as a chunked request
- doesn't autogenerate ids or does any other preprocessing
Example:
Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
-defmodule Demo do
+defmodule Demo do
use Ecto.Schema
@primary_key false
- schema "ecto_ch_demo" do
+ schema "ecto_ch_demo" do
field :a, Ch, type: "UInt64"
field :b, :string
- end
-end
+ end
+end
-rows = Stream.map(1..100_000, fn i -> %{a: i, b: to_string(i)} end)
-{100_000, nil} = Repo.insert_stream(Demo, rows)
+rows = Stream.map(1..100_000, fn i -> %{a: i, b: to_string(i)} end)
+{100_000, nil} = Repo.insert_stream(Demo, rows)
# schemaless
-{100_000, nil} = Repo.insert_stream("ecto_ch_demo", rows, types: [a: Ch.Types.u64(), b: :string])
+{100_000, nil} = Repo.insert_stream("ecto_ch_demo", rows, types: [a: Ch.Types.u64(), b: :string])
diff --git a/Plausible.DataMigration.VersionedSessions.html b/Plausible.DataMigration.VersionedSessions.html
index 138ef0693..0c544b055 100644
--- a/Plausible.DataMigration.VersionedSessions.html
+++ b/Plausible.DataMigration.VersionedSessions.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.DataMigration.html b/Plausible.DataMigration.html
index cb654d7ec..846b1078f 100644
--- a/Plausible.DataMigration.html
+++ b/Plausible.DataMigration.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.DebugReplayInfo.html b/Plausible.DebugReplayInfo.html
index c4aa49631..84ca22b04 100644
--- a/Plausible.DebugReplayInfo.html
+++ b/Plausible.DebugReplayInfo.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Ecto.EventName.html b/Plausible.Ecto.EventName.html
index 0f9710fce..035c532d1 100644
--- a/Plausible.Ecto.EventName.html
+++ b/Plausible.Ecto.EventName.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Exports.html b/Plausible.Exports.html
index dd05740ff..f427a5c0e 100644
--- a/Plausible.Exports.html
+++ b/Plausible.Exports.html
@@ -14,7 +14,7 @@
-
+
@@ -581,14 +581,14 @@ tables into the format of imported_* tables for a w
-Creates a streamable Zip archive from the provided (named) Ecto queries.
Example usage:
{:ok, pool} = Ch.start_link(pool_size: 1)
+Creates a streamable Zip archive from the provided (named) Ecto queries.
Example usage:
{:ok, pool} = Ch.start_link(pool_size: 1)
-DBConnection.run(pool, fn conn ->
+DBConnection.run(pool, fn conn ->
conn
- |> stream_archive(export_queries(_site_id = 1), format: "CSVWithNames")
- |> Stream.into(File.stream!("export.zip"))
- |> Stream.run()
-end)
+ |> stream_archive(export_queries(_site_id = 1), format: "CSVWithNames")
+ |> Stream.into(File.stream!("export.zip"))
+ |> Stream.run()
+end)
diff --git a/Plausible.Factory.html b/Plausible.Factory.html
index ddadccc6b..fc8c4926b 100644
--- a/Plausible.Factory.html
+++ b/Plausible.Factory.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Funnel.Const.html b/Plausible.Funnel.Const.html
index ed8c44813..5db27ac28 100644
--- a/Plausible.Funnel.Const.html
+++ b/Plausible.Funnel.Const.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Funnel.Step.html b/Plausible.Funnel.Step.html
index 2b0fe0cbd..9782382da 100644
--- a/Plausible.Funnel.Step.html
+++ b/Plausible.Funnel.Step.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Funnel.html b/Plausible.Funnel.html
index 7345461d5..6ff6dc263 100644
--- a/Plausible.Funnel.html
+++ b/Plausible.Funnel.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Funnels.html b/Plausible.Funnels.html
index f777addf9..e87038406 100644
--- a/Plausible.Funnels.html
+++ b/Plausible.Funnels.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Geo.html b/Plausible.Geo.html
index 56584b9e3..e18990968 100644
--- a/Plausible.Geo.html
+++ b/Plausible.Geo.html
@@ -14,7 +14,7 @@
-
+
@@ -260,8 +260,8 @@ and MaxMind license key.
Examples
- In the case of a DB-IP database:
iex> database_type()
-"DBIP-City-Lite"
In the case of a MaxMind database:
iex> database_type()
+ In the case of a DB-IP database:
iex> database_type()
+"DBIP-City-Lite"
In the case of a MaxMind database:
iex> database_type()
"GeoLite2-City"
@@ -302,8 +302,8 @@ asynchronously.
Examples
- Loading from a local file:
iex> load_db(path: "/etc/plausible/dbip-city.mmdb")
-:ok
Downloading a MaxMind DB (this license key is no longer active):
iex> load_db(license_key: "LNpsJCCKPis6XvBP", edition: "GeoLite2-City", async: true)
+ Loading from a local file:
iex> load_db(path: "/etc/plausible/dbip-city.mmdb")
+:ok
Downloading a MaxMind DB (this license key is no longer active):
iex> load_db(license_key: "LNpsJCCKPis6XvBP", edition: "GeoLite2-City", async: true)
:ok
@@ -332,21 +332,21 @@ asynchronously.
Examples
-iex> lookup("8.7.6.5")
-%{
- "city" => %{
+iex> lookup("8.7.6.5")
+%{
+ "city" => %{
"geoname_id" => 5349755,
- "names" => %{
+ "names" => %{
"de" => "Fontana",
"en" => "Fontana",
"ja" => "フォンタナ",
"ru" => "Фонтана"
- }
- },
- "continent" => %{
+ }
+ },
+ "continent" => %{
"code" => "NA",
"geoname_id" => 6255149,
- "names" => %{
+ "names" => %{
"de" => "Nordamerika",
"en" => "North America",
"es" => "Norteamérica",
@@ -355,12 +355,12 @@ asynchronously."pt-BR" => "América do Norte",
"ru" => "Северная Америка",
"zh-CN" => "北美洲"
- }
- },
- "country" => %{
+ }
+ },
+ "country" => %{
"geoname_id" => 6252001,
"iso_code" => "US",
- "names" => %{
+ "names" => %{
"de" => "Vereinigte Staaten",
"en" => "United States",
"es" => "Estados Unidos",
@@ -369,20 +369,20 @@ asynchronously."pt-BR" => "EUA",
"ru" => "США",
"zh-CN" => "美国"
- }
- },
- "location" => %{
+ }
+ },
+ "location" => %{
"accuracy_radius" => 50,
"latitude" => 34.1211,
"longitude" => -117.4362,
"metro_code" => 803,
"time_zone" => "America/Los_Angeles"
- },
- "postal" => %{"code" => "92336"},
- "registered_country" => %{
+ },
+ "postal" => %{"code" => "92336"},
+ "registered_country" => %{
"geoname_id" => 6252001,
"iso_code" => "US",
- "names" => %{
+ "names" => %{
"de" => "Vereinigte Staaten",
"en" => "United States",
"es" => "Estados Unidos",
@@ -391,13 +391,13 @@ asynchronously."pt-BR" => "EUA",
"ru" => "США",
"zh-CN" => "美国"
- }
- },
- "subdivisions" => [
- %{
+ }
+ },
+ "subdivisions" => [
+ %{
"geoname_id" => 5332921,
"iso_code" => "CA",
- "names" => %{
+ "names" => %{
"de" => "Kalifornien",
"en" => "California",
"es" => "California",
@@ -406,10 +406,10 @@ asynchronously."pt-BR" => "Califórnia",
"ru" => "Калифорния",
"zh-CN" => "加州"
- }
- }
- ]
-}
+ }
+ }
+ ]
+}
diff --git a/Plausible.Goal.Revenue.html b/Plausible.Goal.Revenue.html
index c5427b4a4..afc602167 100644
--- a/Plausible.Goal.Revenue.html
+++ b/Plausible.Goal.Revenue.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Goal.html b/Plausible.Goal.html
index dbd5e1e78..4328007ae 100644
--- a/Plausible.Goal.html
+++ b/Plausible.Goal.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Goals.html b/Plausible.Goals.html
index 06a64b596..faf86b7e2 100644
--- a/Plausible.Goals.html
+++ b/Plausible.Goals.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Google.API.Mock.html b/Plausible.Google.API.Mock.html
index fd84c334e..b1280415d 100644
--- a/Plausible.Google.API.Mock.html
+++ b/Plausible.Google.API.Mock.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Google.API.html b/Plausible.Google.API.html
index 9fc3bfa7a..9023aef1e 100644
--- a/Plausible.Google.API.html
+++ b/Plausible.Google.API.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Google.GA4.API.html b/Plausible.Google.GA4.API.html
index 8dd07bd4b..4ae477402 100644
--- a/Plausible.Google.GA4.API.html
+++ b/Plausible.Google.GA4.API.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Google.GA4.HTTP.html b/Plausible.Google.GA4.HTTP.html
index 34e488ff1..d9bed6ae4 100644
--- a/Plausible.Google.GA4.HTTP.html
+++ b/Plausible.Google.GA4.HTTP.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Google.GA4.ReportRequest.html b/Plausible.Google.GA4.ReportRequest.html
index 83ef4455d..5734ab30a 100644
--- a/Plausible.Google.GA4.ReportRequest.html
+++ b/Plausible.Google.GA4.ReportRequest.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Google.HTTP.html b/Plausible.Google.HTTP.html
index 66bdf17f2..858ae776e 100644
--- a/Plausible.Google.HTTP.html
+++ b/Plausible.Google.HTTP.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Google.UA.API.html b/Plausible.Google.UA.API.html
index a32548060..1b6136243 100644
--- a/Plausible.Google.UA.API.html
+++ b/Plausible.Google.UA.API.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Google.UA.HTTP.html b/Plausible.Google.UA.HTTP.html
index b7f46e658..f73cc1d75 100644
--- a/Plausible.Google.UA.HTTP.html
+++ b/Plausible.Google.UA.HTTP.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Google.UA.ReportRequest.html b/Plausible.Google.UA.ReportRequest.html
index 7dc0a5e2b..e8448d0c6 100644
--- a/Plausible.Google.UA.ReportRequest.html
+++ b/Plausible.Google.UA.ReportRequest.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.HTTPClient.Interface.html b/Plausible.HTTPClient.Interface.html
index 771dda17c..fda31fa7d 100644
--- a/Plausible.HTTPClient.Interface.html
+++ b/Plausible.HTTPClient.Interface.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.HTTPClient.Non200Error.html b/Plausible.HTTPClient.Non200Error.html
index cf912bb6e..75a1c46da 100644
--- a/Plausible.HTTPClient.Non200Error.html
+++ b/Plausible.HTTPClient.Non200Error.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.HTTPClient.html b/Plausible.HTTPClient.html
index 4223531ba..4ccc48097 100644
--- a/Plausible.HTTPClient.html
+++ b/Plausible.HTTPClient.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Helpers.JSON.html b/Plausible.Helpers.JSON.html
index 8475d7fe1..a5f0c8a11 100644
--- a/Plausible.Helpers.JSON.html
+++ b/Plausible.Helpers.JSON.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.ImportDeletionRepo.html b/Plausible.ImportDeletionRepo.html
index b938df508..3beca9389 100644
--- a/Plausible.ImportDeletionRepo.html
+++ b/Plausible.ImportDeletionRepo.html
@@ -14,7 +14,7 @@
-
+
@@ -1143,23 +1143,23 @@ pool to disconnect within the given interval.See
-Similar to insert_all/2 but with the following differences:
- accepts rows as streams or lists
- sends rows as a chunked request
- doesn't autogenerate ids or does any other preprocessing
Example:
Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
+Similar to insert_all/2 but with the following differences:
- accepts rows as streams or lists
- sends rows as a chunked request
- doesn't autogenerate ids or does any other preprocessing
Example:
Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
-defmodule Demo do
+defmodule Demo do
use Ecto.Schema
@primary_key false
- schema "ecto_ch_demo" do
+ schema "ecto_ch_demo" do
field :a, Ch, type: "UInt64"
field :b, :string
- end
-end
+ end
+end
-rows = Stream.map(1..100_000, fn i -> %{a: i, b: to_string(i)} end)
-{100_000, nil} = Repo.insert_stream(Demo, rows)
+rows = Stream.map(1..100_000, fn i -> %{a: i, b: to_string(i)} end)
+{100_000, nil} = Repo.insert_stream(Demo, rows)
# schemaless
-{100_000, nil} = Repo.insert_stream("ecto_ch_demo", rows, types: [a: Ch.Types.u64(), b: :string])
+{100_000, nil} = Repo.insert_stream("ecto_ch_demo", rows, types: [a: Ch.Types.u64(), b: :string])
diff --git a/Plausible.Imported.Buffer.html b/Plausible.Imported.Buffer.html
index 1c82e275c..9edef506a 100644
--- a/Plausible.Imported.Buffer.html
+++ b/Plausible.Imported.Buffer.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Imported.CSVImporter.html b/Plausible.Imported.CSVImporter.html
index c77c6f174..d04763512 100644
--- a/Plausible.Imported.CSVImporter.html
+++ b/Plausible.Imported.CSVImporter.html
@@ -14,7 +14,7 @@
-
+
@@ -159,6 +159,16 @@ Pages
Functions
+
+
+ date_range(uploads)
+
+
+
+ Extracts min/max date range from a list of uploads.
+
+
+
new_import(site, user, opts)
@@ -167,6 +177,16 @@ Pages
+
+
+
+ Extracts table name and min/max dates from the filename.
+
+
+
@@ -180,6 +200,42 @@ Pages
Functions
+
+
+
+
+
+
+
+
+ @spec date_range([String.t() | %{required(String.t()) => String.t()}, ...]) ::
+ Date.Range.t()
+
+
+
+Extracts min/max date range from a list of uploads.
Examples:
iex> date_range([
+...> %{"filename" => "imported_devices_20190101_20210101.csv"},
+...> "imported_pages_20200101_20220101.csv"
+...> ])
+Date.range(~D[2019-01-01], ~D[2022-01-01])
+
+iex> date_range([])
+** (ArgumentError) empty uploads
+
+
@@ -207,6 +263,39 @@ Pages
+
+
+
+
+
+
+
+
+
+
+ @spec parse_filename!(String.t()) ::
+ {table :: String.t(), start_date :: Date.t(), end_date :: Date.t()}
+
+
+
+Extracts table name and min/max dates from the filename.
Examples:
iex> parse_filename!("my_data.csv")
+** (ArgumentError) invalid filename
+
+iex> parse_filename!("imported_devices_00010101_20250101.csv")
+{"imported_devices", ~D[0001-01-01], ~D[2025-01-01]}
diff --git a/Plausible.Imported.GoogleAnalytics4.html b/Plausible.Imported.GoogleAnalytics4.html
index 966a42d7f..0d99b70ae 100644
--- a/Plausible.Imported.GoogleAnalytics4.html
+++ b/Plausible.Imported.GoogleAnalytics4.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Imported.ImportSources.html b/Plausible.Imported.ImportSources.html
index b2507623e..126a6cc58 100644
--- a/Plausible.Imported.ImportSources.html
+++ b/Plausible.Imported.ImportSources.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Imported.Importer.html b/Plausible.Imported.Importer.html
index 55c5a54ac..f62fbeb74 100644
--- a/Plausible.Imported.Importer.html
+++ b/Plausible.Imported.Importer.html
@@ -14,7 +14,7 @@
-
+
@@ -178,30 +178,30 @@ scope of importer logic and is expected to be implemented separately.
In case it's necessary to run the whole import job fully synchronously, the
Plausible.Workers.ImportAnalytics worker sends an Oban.Notifier message
-on completion, failure or transient failure of the import.
A basic usage scenario looks like this:
{:ok, job} = Plausible.Imported.NoopImporter.new_import(
+on completion, failure or transient failure of the import.A basic usage scenario looks like this:
{:ok, job} = Plausible.Imported.NoopImporter.new_import(
site,
user,
start_date: ~D[2005-01-01],
- end_date: Date.utc_today(),
+ end_date: Date.utc_today(),
# this option is necessary to setup the calling process as listener
listen?: true
-)
+)
-import_id = job.args[:import_id]
+import_id = job.args[:import_id]
-receive do
- {:notification, :analytics_imports_jobs, %{"complete" => ^import_id}} ->
- IO.puts("Job completed")
+receive do
+ {:notification, :analytics_imports_jobs, %{"complete" => ^import_id}} ->
+ IO.puts("Job completed")
- {:notification, :analytics_imports_jobs, %{"transient_fail" => ^import_id}} ->
- IO.puts("Job failed transiently")
+ {:notification, :analytics_imports_jobs, %{"transient_fail" => ^import_id}} ->
+ IO.puts("Job failed transiently")
- {:notification, :analytics_imports_jobs, %{"fail" => ^import_id}} ->
- IO.puts("Job failed permanently")
-after
+ {:notification, :analytics_imports_jobs, %{"fail" => ^import_id}} ->
+ IO.puts("Job failed permanently")
+after
15_000 ->
- IO.puts("Job didn't finish in 15 seconds")
-end
In a more realistic scenario, job scheduling will be done inside a GenServer process
+
IO.puts("Job didn't finish in 15 seconds")
+end
In a more realistic scenario, job scheduling will be done inside a GenServer process
like LiveView, where notifications can be listened for via handle_info/2.
diff --git a/Plausible.Imported.NoopImporter.html b/Plausible.Imported.NoopImporter.html
index acb45daa3..7adbaaa4a 100644
--- a/Plausible.Imported.NoopImporter.html
+++ b/Plausible.Imported.NoopImporter.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Imported.SiteImport.html b/Plausible.Imported.SiteImport.html
index 030db0ad8..2a7354143 100644
--- a/Plausible.Imported.SiteImport.html
+++ b/Plausible.Imported.SiteImport.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Imported.UniversalAnalytics.html b/Plausible.Imported.UniversalAnalytics.html
index b86470bae..0e833e14a 100644
--- a/Plausible.Imported.UniversalAnalytics.html
+++ b/Plausible.Imported.UniversalAnalytics.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Imported.html b/Plausible.Imported.html
index 77cea30cb..9879d02e2 100644
--- a/Plausible.Imported.html
+++ b/Plausible.Imported.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.IngestRepo.html b/Plausible.IngestRepo.html
index bbd22de6c..60e95cd05 100644
--- a/Plausible.IngestRepo.html
+++ b/Plausible.IngestRepo.html
@@ -14,7 +14,7 @@
-
+
@@ -1143,23 +1143,23 @@ pool to disconnect within the given interval.See
-Similar to insert_all/2 but with the following differences:
- accepts rows as streams or lists
- sends rows as a chunked request
- doesn't autogenerate ids or does any other preprocessing
Example:
Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
+Similar to insert_all/2 but with the following differences:
- accepts rows as streams or lists
- sends rows as a chunked request
- doesn't autogenerate ids or does any other preprocessing
Example:
Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
-defmodule Demo do
+defmodule Demo do
use Ecto.Schema
@primary_key false
- schema "ecto_ch_demo" do
+ schema "ecto_ch_demo" do
field :a, Ch, type: "UInt64"
field :b, :string
- end
-end
+ end
+end
-rows = Stream.map(1..100_000, fn i -> %{a: i, b: to_string(i)} end)
-{100_000, nil} = Repo.insert_stream(Demo, rows)
+rows = Stream.map(1..100_000, fn i -> %{a: i, b: to_string(i)} end)
+{100_000, nil} = Repo.insert_stream(Demo, rows)
# schemaless
-{100_000, nil} = Repo.insert_stream("ecto_ch_demo", rows, types: [a: Ch.Types.u64(), b: :string])
+{100_000, nil} = Repo.insert_stream("ecto_ch_demo", rows, types: [a: Ch.Types.u64(), b: :string])
diff --git a/Plausible.Ingestion.Counters.Buffer.html b/Plausible.Ingestion.Counters.Buffer.html
index 09eb640da..2f7f19737 100644
--- a/Plausible.Ingestion.Counters.Buffer.html
+++ b/Plausible.Ingestion.Counters.Buffer.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Ingestion.Counters.Record.html b/Plausible.Ingestion.Counters.Record.html
index 28ee81f9b..927c3470b 100644
--- a/Plausible.Ingestion.Counters.Record.html
+++ b/Plausible.Ingestion.Counters.Record.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Ingestion.Counters.TelemetryHandler.html b/Plausible.Ingestion.Counters.TelemetryHandler.html
index 13496d29d..a62f66e91 100644
--- a/Plausible.Ingestion.Counters.TelemetryHandler.html
+++ b/Plausible.Ingestion.Counters.TelemetryHandler.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Ingestion.Counters.html b/Plausible.Ingestion.Counters.html
index 621eee07d..aed6ab171 100644
--- a/Plausible.Ingestion.Counters.html
+++ b/Plausible.Ingestion.Counters.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Ingestion.Event.Revenue.html b/Plausible.Ingestion.Event.Revenue.html
index b17c95b40..d64078d78 100644
--- a/Plausible.Ingestion.Event.Revenue.html
+++ b/Plausible.Ingestion.Event.Revenue.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Ingestion.Event.html b/Plausible.Ingestion.Event.html
index aaaa7a216..aa0c79204 100644
--- a/Plausible.Ingestion.Event.html
+++ b/Plausible.Ingestion.Event.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Ingestion.Request.Revenue.html b/Plausible.Ingestion.Request.Revenue.html
index 9ddb8e425..baa1540a6 100644
--- a/Plausible.Ingestion.Request.Revenue.html
+++ b/Plausible.Ingestion.Request.Revenue.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Ingestion.Request.html b/Plausible.Ingestion.Request.html
index 10bee026e..4adf7259b 100644
--- a/Plausible.Ingestion.Request.html
+++ b/Plausible.Ingestion.Request.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.License.html b/Plausible.License.html
index 78c5ac1a0..efe5407eb 100644
--- a/Plausible.License.html
+++ b/Plausible.License.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Mailer.html b/Plausible.Mailer.html
index b508d4d3d..23a0e7a7b 100644
--- a/Plausible.Mailer.html
+++ b/Plausible.Mailer.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.MigrationUtils.html b/Plausible.MigrationUtils.html
index f8ec5fc6d..6b7d7b608 100644
--- a/Plausible.MigrationUtils.html
+++ b/Plausible.MigrationUtils.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.OpenTelemetry.Sampler.html b/Plausible.OpenTelemetry.Sampler.html
index 04ddd49f3..22eb5b0a0 100644
--- a/Plausible.OpenTelemetry.Sampler.html
+++ b/Plausible.OpenTelemetry.Sampler.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.PaddleApi.Mock.html b/Plausible.PaddleApi.Mock.html
index 23eb80fd1..afa155b9b 100644
--- a/Plausible.PaddleApi.Mock.html
+++ b/Plausible.PaddleApi.Mock.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Pagination.html b/Plausible.Pagination.html
index b6a83bb4d..958dc730d 100644
--- a/Plausible.Pagination.html
+++ b/Plausible.Pagination.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Plugins.API.Capabilities.html b/Plausible.Plugins.API.Capabilities.html
index fab14ad9a..f57db3d75 100644
--- a/Plausible.Plugins.API.Capabilities.html
+++ b/Plausible.Plugins.API.Capabilities.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Plugins.API.CustomProps.html b/Plausible.Plugins.API.CustomProps.html
index 80a30d4d1..63b7857ae 100644
--- a/Plausible.Plugins.API.CustomProps.html
+++ b/Plausible.Plugins.API.CustomProps.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Plugins.API.Goals.html b/Plausible.Plugins.API.Goals.html
index 648839a5d..ed9e41067 100644
--- a/Plausible.Plugins.API.Goals.html
+++ b/Plausible.Plugins.API.Goals.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Plugins.API.SharedLinks.html b/Plausible.Plugins.API.SharedLinks.html
index 4f845b6a6..50cf9a619 100644
--- a/Plausible.Plugins.API.SharedLinks.html
+++ b/Plausible.Plugins.API.SharedLinks.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Plugins.API.Token.html b/Plausible.Plugins.API.Token.html
index 54a07097c..0711d04da 100644
--- a/Plausible.Plugins.API.Token.html
+++ b/Plausible.Plugins.API.Token.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Plugins.API.Tokens.html b/Plausible.Plugins.API.Tokens.html
index 07b4709fd..3f16acc3c 100644
--- a/Plausible.Plugins.API.Tokens.html
+++ b/Plausible.Plugins.API.Tokens.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.PromEx.Plugins.PlausibleMetrics.html b/Plausible.PromEx.Plugins.PlausibleMetrics.html
index f191ca1cc..ca80c4fbf 100644
--- a/Plausible.PromEx.Plugins.PlausibleMetrics.html
+++ b/Plausible.PromEx.Plugins.PlausibleMetrics.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.PromEx.html b/Plausible.PromEx.html
index e1707e988..d337fbdc4 100644
--- a/Plausible.PromEx.html
+++ b/Plausible.PromEx.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Props.html b/Plausible.Props.html
index a06b8d849..ce5f903c3 100644
--- a/Plausible.Props.html
+++ b/Plausible.Props.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Purge.html b/Plausible.Purge.html
index ebb8c4f3d..d21781ff8 100644
--- a/Plausible.Purge.html
+++ b/Plausible.Purge.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.RateLimit.html b/Plausible.RateLimit.html
index 1ed0e48f8..6e52cfd86 100644
--- a/Plausible.RateLimit.html
+++ b/Plausible.RateLimit.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Release.html b/Plausible.Release.html
index 888ccff0e..4d4fbe982 100644
--- a/Plausible.Release.html
+++ b/Plausible.Release.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Repo.html b/Plausible.Repo.html
index 855c5048e..dac78d937 100644
--- a/Plausible.Repo.html
+++ b/Plausible.Repo.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.S3.html b/Plausible.S3.html
index 2348340be..93f6cd100 100644
--- a/Plausible.S3.html
+++ b/Plausible.S3.html
@@ -14,7 +14,7 @@
-
+
@@ -189,6 +189,26 @@ Pages
+
+
+
+ Presigns an upload for an imported file.
+
+
+
+
+
+ imports_bucket()
+
+
+
+ Returns the pre-configured S3 bucket for CSV imports.
+
+
+
@@ -213,7 +233,7 @@ Pages
export_upload_multipart(stream, s3_bucket, s3_path, config_overrides \\ [])
-
+
View Source
@@ -260,7 +280,7 @@ The URL expires in 24 hours.In the current implementation the bucket alwa
Returns the pre-configured S3 bucket for CSV exports.
config :plausible, Plausible.S3,
- exports_bucket: System.fetch_env!("S3_EXPORTS_BUCKET")
Example:
iex> exports_bucket()
+ exports_bucket: System.fetch_env!("S3_EXPORTS_BUCKET")
Example:
iex> exports_bucket()
"test-exports"
@@ -273,7 +293,7 @@ The URL expires in 24 hours.In the current implementation the bucket alwa
import_clickhouse_credentials()
-
+
View Source
@@ -292,7 +312,63 @@ The URL expires in 24 hours.In the current implementation the bucket alwa
-
Returns access_key_id and secret_access_key to be used by ClickHouse during imports from S3.
+Returns access_key_id and secret_access_key to be used by ClickHouse during imports from S3.
Example:
iex> import_clickhouse_credentials()
+%{access_key_id: "minioadmin", secret_access_key: "minioadmin"}
+
+
+
+
+
+
+
+ Link to this function
+
+ import_presign_upload(site_id, filename)
+
+
+
+ View Source
+
+
+
+
+
+
+
+Presigns an upload for an imported file.
In the current implementation the bucket always goes into the path component.
Example:
iex> %{
+...> s3_url: "http://localhost:10000/test-imports/123/imported_browsers.csv",
+...> presigned_url: "http://localhost:10000/test-imports/123/imported_browsers.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minioadmin" <> _
+...> } = import_presign_upload(_site_id = 123, _filename = "imported_browsers.csv")
+
+
+
+
+
+
+
+
+
+
+ @spec imports_bucket() :: String.t()
+
+
+
+Returns the pre-configured S3 bucket for CSV imports.
config :plausible, Plausible.S3,
+ imports_bucket: System.fetch_env!("S3_IMPORTS_BUCKET")
Example:
iex> imports_bucket()
+"test-imports"
diff --git a/Plausible.Sentry.Client.html b/Plausible.Sentry.Client.html
index 2c4277e00..fd2ec354a 100644
--- a/Plausible.Sentry.Client.html
+++ b/Plausible.Sentry.Client.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.SentryFilter.html b/Plausible.SentryFilter.html
index 04f8e71ed..730e4e717 100644
--- a/Plausible.SentryFilter.html
+++ b/Plausible.SentryFilter.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Session.CacheStore.html b/Plausible.Session.CacheStore.html
index 516acb3f4..a1c0355fa 100644
--- a/Plausible.Session.CacheStore.html
+++ b/Plausible.Session.CacheStore.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Session.Salts.html b/Plausible.Session.Salts.html
index a2a21530f..3f38dcb0c 100644
--- a/Plausible.Session.Salts.html
+++ b/Plausible.Session.Salts.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Shield.CountryRule.html b/Plausible.Shield.CountryRule.html
index 693fc5eaa..857076367 100644
--- a/Plausible.Shield.CountryRule.html
+++ b/Plausible.Shield.CountryRule.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Shield.CountryRuleCache.html b/Plausible.Shield.CountryRuleCache.html
index baf4ef4bf..c44db6c67 100644
--- a/Plausible.Shield.CountryRuleCache.html
+++ b/Plausible.Shield.CountryRuleCache.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Shield.IPRule.html b/Plausible.Shield.IPRule.html
index b65dce1f7..d83ec4ea8 100644
--- a/Plausible.Shield.IPRule.html
+++ b/Plausible.Shield.IPRule.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Shield.IPRuleCache.html b/Plausible.Shield.IPRuleCache.html
index 112a8cb54..b044917b8 100644
--- a/Plausible.Shield.IPRuleCache.html
+++ b/Plausible.Shield.IPRuleCache.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Shields.html b/Plausible.Shields.html
index bff146a58..9dc4ccc31 100644
--- a/Plausible.Shields.html
+++ b/Plausible.Shields.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Site.Cache.html b/Plausible.Site.Cache.html
index fbae977ac..c819550bb 100644
--- a/Plausible.Site.Cache.html
+++ b/Plausible.Site.Cache.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Site.Domain.html b/Plausible.Site.Domain.html
index f0dae5c60..54b7113e0 100644
--- a/Plausible.Site.Domain.html
+++ b/Plausible.Site.Domain.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Site.GateKeeper.html b/Plausible.Site.GateKeeper.html
index 639b78e51..d856ce523 100644
--- a/Plausible.Site.GateKeeper.html
+++ b/Plausible.Site.GateKeeper.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Site.GoogleAuth.html b/Plausible.Site.GoogleAuth.html
index bb4df0917..396e33a6c 100644
--- a/Plausible.Site.GoogleAuth.html
+++ b/Plausible.Site.GoogleAuth.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Site.ImportedData.html b/Plausible.Site.ImportedData.html
index a2ba7d8ac..dce05304e 100644
--- a/Plausible.Site.ImportedData.html
+++ b/Plausible.Site.ImportedData.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Site.Membership.html b/Plausible.Site.Membership.html
index c2206466a..e6d15cf96 100644
--- a/Plausible.Site.Membership.html
+++ b/Plausible.Site.Membership.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Site.Memberships.AcceptInvitation.html b/Plausible.Site.Memberships.AcceptInvitation.html
index 6dadc8747..621f76a2e 100644
--- a/Plausible.Site.Memberships.AcceptInvitation.html
+++ b/Plausible.Site.Memberships.AcceptInvitation.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Site.Memberships.CreateInvitation.html b/Plausible.Site.Memberships.CreateInvitation.html
index fc2b94584..051d1196e 100644
--- a/Plausible.Site.Memberships.CreateInvitation.html
+++ b/Plausible.Site.Memberships.CreateInvitation.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Site.Memberships.RejectInvitation.html b/Plausible.Site.Memberships.RejectInvitation.html
index 2be4663e8..39d07958a 100644
--- a/Plausible.Site.Memberships.RejectInvitation.html
+++ b/Plausible.Site.Memberships.RejectInvitation.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Site.Memberships.RemoveInvitation.html b/Plausible.Site.Memberships.RemoveInvitation.html
index f4a9542d2..a2c018ed7 100644
--- a/Plausible.Site.Memberships.RemoveInvitation.html
+++ b/Plausible.Site.Memberships.RemoveInvitation.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Site.Memberships.html b/Plausible.Site.Memberships.html
index 6c4c1e257..7665dc9ce 100644
--- a/Plausible.Site.Memberships.html
+++ b/Plausible.Site.Memberships.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Site.MonthlyReport.html b/Plausible.Site.MonthlyReport.html
index 0aa683f80..daeb849b9 100644
--- a/Plausible.Site.MonthlyReport.html
+++ b/Plausible.Site.MonthlyReport.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Site.Removal.html b/Plausible.Site.Removal.html
index a3188734d..65e0b1a7d 100644
--- a/Plausible.Site.Removal.html
+++ b/Plausible.Site.Removal.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Site.SharedLink.html b/Plausible.Site.SharedLink.html
index f4bd1598c..de495063e 100644
--- a/Plausible.Site.SharedLink.html
+++ b/Plausible.Site.SharedLink.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Site.SpikeNotification.html b/Plausible.Site.SpikeNotification.html
index 4ce622403..97db3eac8 100644
--- a/Plausible.Site.SpikeNotification.html
+++ b/Plausible.Site.SpikeNotification.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Site.UserPreference.html b/Plausible.Site.UserPreference.html
index d55dc0c4a..726d2a82e 100644
--- a/Plausible.Site.UserPreference.html
+++ b/Plausible.Site.UserPreference.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Site.WeeklyReport.html b/Plausible.Site.WeeklyReport.html
index c256d987a..93423638a 100644
--- a/Plausible.Site.WeeklyReport.html
+++ b/Plausible.Site.WeeklyReport.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Site.html b/Plausible.Site.html
index 6afb617cd..fdb28db0e 100644
--- a/Plausible.Site.html
+++ b/Plausible.Site.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.SiteAdmin.html b/Plausible.SiteAdmin.html
index e9544b0f2..331d8f99f 100644
--- a/Plausible.SiteAdmin.html
+++ b/Plausible.SiteAdmin.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Sites.html b/Plausible.Sites.html
index 80e3c6a70..8fac2b089 100644
--- a/Plausible.Sites.html
+++ b/Plausible.Sites.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.Aggregate.html b/Plausible.Stats.Aggregate.html
index 3acda04eb..38d6d1830 100644
--- a/Plausible.Stats.Aggregate.html
+++ b/Plausible.Stats.Aggregate.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.Base.html b/Plausible.Stats.Base.html
index c88f18358..74f07b3c1 100644
--- a/Plausible.Stats.Base.html
+++ b/Plausible.Stats.Base.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.Breakdown.html b/Plausible.Stats.Breakdown.html
index 7faab63c1..4787a1caf 100644
--- a/Plausible.Stats.Breakdown.html
+++ b/Plausible.Stats.Breakdown.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.Clickhouse.html b/Plausible.Stats.Clickhouse.html
index f90c4cc8f..ccf9a18dd 100644
--- a/Plausible.Stats.Clickhouse.html
+++ b/Plausible.Stats.Clickhouse.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.Compare.html b/Plausible.Stats.Compare.html
index d62e32e34..e7afcaf13 100644
--- a/Plausible.Stats.Compare.html
+++ b/Plausible.Stats.Compare.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.Comparisons.html b/Plausible.Stats.Comparisons.html
index 7b41e1ce8..62a249474 100644
--- a/Plausible.Stats.Comparisons.html
+++ b/Plausible.Stats.Comparisons.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.CurrentVisitors.html b/Plausible.Stats.CurrentVisitors.html
index 8a0c3ba44..e73484867 100644
--- a/Plausible.Stats.CurrentVisitors.html
+++ b/Plausible.Stats.CurrentVisitors.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.CustomProps.html b/Plausible.Stats.CustomProps.html
index 557c16a91..c8f2bbe06 100644
--- a/Plausible.Stats.CustomProps.html
+++ b/Plausible.Stats.CustomProps.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.EmailReport.html b/Plausible.Stats.EmailReport.html
index b440ea8a3..7ffa4b92c 100644
--- a/Plausible.Stats.EmailReport.html
+++ b/Plausible.Stats.EmailReport.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.FilterSuggestions.html b/Plausible.Stats.FilterSuggestions.html
index ff1d58234..37f7d995d 100644
--- a/Plausible.Stats.FilterSuggestions.html
+++ b/Plausible.Stats.FilterSuggestions.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.Filters.Utils.html b/Plausible.Stats.Filters.Utils.html
index b80048b2a..2b218d80d 100644
--- a/Plausible.Stats.Filters.Utils.html
+++ b/Plausible.Stats.Filters.Utils.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.Filters.html b/Plausible.Stats.Filters.html
index 28e79b1e7..51eefb1c3 100644
--- a/Plausible.Stats.Filters.html
+++ b/Plausible.Stats.Filters.html
@@ -14,7 +14,7 @@
-
+
@@ -253,14 +253,14 @@ Pages
Examples:
-iex> Filters.parse("{\"page\":\"/blog/**\"}")
-%{"event:page" => {:matches, "/blog/**"}}
+iex> Filters.parse("{\"page\":\"/blog/**\"}")
+%{"event:page" => {:matches, "/blog/**"}}
-iex> Filters.parse("visit:browser!=Chrome")
-%{"visit:browser" => {:is_not, "Chrome"}}
+iex> Filters.parse("visit:browser!=Chrome")
+%{"visit:browser" => {:is_not, "Chrome"}}
-iex> Filters.parse(nil)
-%{}
+iex> Filters.parse(nil)
+%{}
diff --git a/Plausible.Stats.Fragments.html b/Plausible.Stats.Fragments.html
index 61e185122..2c2ce3c73 100644
--- a/Plausible.Stats.Fragments.html
+++ b/Plausible.Stats.Fragments.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.Funnel.html b/Plausible.Stats.Funnel.html
index e01996564..e56d39a21 100644
--- a/Plausible.Stats.Funnel.html
+++ b/Plausible.Stats.Funnel.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.Goal.Revenue.html b/Plausible.Stats.Goal.Revenue.html
index eee321901..476b65006 100644
--- a/Plausible.Stats.Goal.Revenue.html
+++ b/Plausible.Stats.Goal.Revenue.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.Imported.html b/Plausible.Stats.Imported.html
index 1dc6c07ed..c677e453e 100644
--- a/Plausible.Stats.Imported.html
+++ b/Plausible.Stats.Imported.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.Interval.html b/Plausible.Stats.Interval.html
index 1c8da61a2..ef55efdd4 100644
--- a/Plausible.Stats.Interval.html
+++ b/Plausible.Stats.Interval.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.Props.html b/Plausible.Stats.Props.html
index 6995c76e6..1419ac3a1 100644
--- a/Plausible.Stats.Props.html
+++ b/Plausible.Stats.Props.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.Query.html b/Plausible.Stats.Query.html
index de1b05e53..cab9e6428 100644
--- a/Plausible.Stats.Query.html
+++ b/Plausible.Stats.Query.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.Sampling.html b/Plausible.Stats.Sampling.html
index 200fc173b..e3b075325 100644
--- a/Plausible.Stats.Sampling.html
+++ b/Plausible.Stats.Sampling.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.Timeseries.html b/Plausible.Stats.Timeseries.html
index e3844a87b..555614e8b 100644
--- a/Plausible.Stats.Timeseries.html
+++ b/Plausible.Stats.Timeseries.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.Util.html b/Plausible.Stats.Util.html
index eb35663d2..891104f0d 100644
--- a/Plausible.Stats.Util.html
+++ b/Plausible.Stats.Util.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Stats.html b/Plausible.Stats.html
index 35166e81c..d801aba09 100644
--- a/Plausible.Stats.html
+++ b/Plausible.Stats.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Test.Support.HTML.html b/Plausible.Test.Support.HTML.html
index 590cb9d64..ed79f8f4d 100644
--- a/Plausible.Test.Support.HTML.html
+++ b/Plausible.Test.Support.HTML.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Test.Support.HTTPMocker.html b/Plausible.Test.Support.HTTPMocker.html
index c215cd992..04b85e154 100644
--- a/Plausible.Test.Support.HTTPMocker.html
+++ b/Plausible.Test.Support.HTTPMocker.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.TestUtils.html b/Plausible.TestUtils.html
index 769d46175..75707a361 100644
--- a/Plausible.TestUtils.html
+++ b/Plausible.TestUtils.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Themes.html b/Plausible.Themes.html
index 011df258d..38f07ff1a 100644
--- a/Plausible.Themes.html
+++ b/Plausible.Themes.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Timezones.html b/Plausible.Timezones.html
index 233029898..c9e20f817 100644
--- a/Plausible.Timezones.html
+++ b/Plausible.Timezones.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Users.html b/Plausible.Users.html
index d6dabdcf0..d4ad78837 100644
--- a/Plausible.Users.html
+++ b/Plausible.Users.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Workers.AcceptTrafficUntil.html b/Plausible.Workers.AcceptTrafficUntil.html
index 936fd36b0..6338b0f2b 100644
--- a/Plausible.Workers.AcceptTrafficUntil.html
+++ b/Plausible.Workers.AcceptTrafficUntil.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Workers.CheckUsage.html b/Plausible.Workers.CheckUsage.html
index 843570214..ad59789c6 100644
--- a/Plausible.Workers.CheckUsage.html
+++ b/Plausible.Workers.CheckUsage.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Workers.CleanInvitations.html b/Plausible.Workers.CleanInvitations.html
index ba50d3733..510fb0b30 100644
--- a/Plausible.Workers.CleanInvitations.html
+++ b/Plausible.Workers.CleanInvitations.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Workers.ExpireDomainChangeTransitions.html b/Plausible.Workers.ExpireDomainChangeTransitions.html
index 48c062b43..18cdb3c82 100644
--- a/Plausible.Workers.ExpireDomainChangeTransitions.html
+++ b/Plausible.Workers.ExpireDomainChangeTransitions.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Workers.ExportCSV.html b/Plausible.Workers.ExportCSV.html
index 716dfd30d..119a43057 100644
--- a/Plausible.Workers.ExportCSV.html
+++ b/Plausible.Workers.ExportCSV.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Workers.ImportAnalytics.html b/Plausible.Workers.ImportAnalytics.html
index 8075ec0f7..d6a1b8385 100644
--- a/Plausible.Workers.ImportAnalytics.html
+++ b/Plausible.Workers.ImportAnalytics.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Workers.LockSites.html b/Plausible.Workers.LockSites.html
index 88f2d48aa..ee76a4a70 100644
--- a/Plausible.Workers.LockSites.html
+++ b/Plausible.Workers.LockSites.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Workers.NotifyAnnualRenewal.html b/Plausible.Workers.NotifyAnnualRenewal.html
index 94226e0a5..57b25e201 100644
--- a/Plausible.Workers.NotifyAnnualRenewal.html
+++ b/Plausible.Workers.NotifyAnnualRenewal.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Workers.RotateSalts.html b/Plausible.Workers.RotateSalts.html
index f82a58b5e..db09e382d 100644
--- a/Plausible.Workers.RotateSalts.html
+++ b/Plausible.Workers.RotateSalts.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Workers.ScheduleEmailReports.html b/Plausible.Workers.ScheduleEmailReports.html
index 86cbbd96e..2c12c0ce1 100644
--- a/Plausible.Workers.ScheduleEmailReports.html
+++ b/Plausible.Workers.ScheduleEmailReports.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Workers.SendCheckStatsEmails.html b/Plausible.Workers.SendCheckStatsEmails.html
index 4f544c943..3696fa66a 100644
--- a/Plausible.Workers.SendCheckStatsEmails.html
+++ b/Plausible.Workers.SendCheckStatsEmails.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Workers.SendEmailReport.html b/Plausible.Workers.SendEmailReport.html
index 3e8a66db9..932aa84e4 100644
--- a/Plausible.Workers.SendEmailReport.html
+++ b/Plausible.Workers.SendEmailReport.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Workers.SendSiteSetupEmails.html b/Plausible.Workers.SendSiteSetupEmails.html
index 6cdc11fdc..1b13f35d6 100644
--- a/Plausible.Workers.SendSiteSetupEmails.html
+++ b/Plausible.Workers.SendSiteSetupEmails.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Workers.SendTrialNotifications.html b/Plausible.Workers.SendTrialNotifications.html
index 5e944e67b..9bcb747b8 100644
--- a/Plausible.Workers.SendTrialNotifications.html
+++ b/Plausible.Workers.SendTrialNotifications.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.Workers.SpikeNotifier.html b/Plausible.Workers.SpikeNotifier.html
index 14d14e6dd..9198a6efc 100644
--- a/Plausible.Workers.SpikeNotifier.html
+++ b/Plausible.Workers.SpikeNotifier.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Plausible.epub b/Plausible.epub
index 65e550a8f841b9e6d3dabc06000c3126520cc06b..0d85b780fdf3e79a16968e8715cc95722acb6500 100644
GIT binary patch
delta 135445
zcmYhCbyQSew8y7FhVGP|0nxCN{v2O=Aj
zDRBvbNI0+@N|f3shTquBd58-{Hr9&~K!C``UMVRk6lvgP5cEk3M4XDHNC%r2CXPP-
z%OU=C>GX->JR|ma!CdizW2q(daP%PWL!u0o;pGo4!iW1GLga)tjgxF;CSju-ok?S-
z$+qaUW?E|!VeJ0Q??QOugYg(g$l>n`9$kE?Om1jju|(vKzit4GRoe2M!;QA@Sp!2t
za7Bhwd9~l~2qf|pa;o1Ex&4Llr93**tzs8%L7xbod!^rlb)FE(sB~|Gd^d3Vv%Zth
zoyuTl^A;)|F4#BKk0ubNa}^O_C{({Bxacv{QEk$uICQQ-i>GAaIr+nj`!=FHR`3^B
z;Xu}VPn)y@s$RoSeaGB9VPf}3>c-Gj24>2hGqPc-;-r(9oF&X`llNTlBbHih^F>VM
zi5pLeO+tS`xm_TduJ{Zoj5E+#hTnKJK{5T1wrTE*u%l~6buy?&YgYL8w~*-HUx`MF
z^@3cRToMyjj%L+crQxUdxr0N0EN51F#4ZEu_Iv2H0%=w}k
z`x;4|wluhJ+m7`0VfFq*T)hcNvl
zvFr}txJ0HX<c|vM`gcnH3;WCay0v`}fOkd7kpipf{t=vhc)^&(WG4
zy?oDFeMt^=$={XyY%P)$lX;r>EkO}-0$a_?oe)uo`RH`qld(*}{H6uZvYS=(L4
zj<{b5J3H6-bGeaOb@f=*bcIaM!zhZ$q!bh9y4rQ^LO7}XdZ#NohRawty{bi`=N?lz
zWuY~aCb5jgp(RJly34_ax$e!K`sJwz*MG&|3=BjzN(OPE8sCJiqLgYB*ApPJ@ooGV7>I;-e})n@nteFO
z03zW8RZt?heH{cZRk|3hF)*tL6Nqf2Db~dXA{)KyK=?ppqhA*`%2ed{CKN=59Z(hv
zM@Lb@)aa}p3QUV)C|It%{O6_?O4Qi$Ckup&T8(^V7S0vH0KgU|+=2o~4Ogp!
z(lzF8YNKvA+0g|7k&UnR>rm?I=;+^Kce09_&%lK?$}QFHzu6r;o}#0mt6x`^n4
z0+&(zgbN%80+9%Je4sx{?-BzYQPidYnxoiA4U9ukk^vYA`8S-T?>YMv5CA|Q7fz4{
zWP-ah05RYnnxQ0cJy#$B;u#B&5OsqP2QU;x1P{;-MH&I10tASJuOXmBh(KW=C8{x9
z9O#Q8whYh<#ZY;m4~mzHzz`ID)PS)lK5G4EEL0z;hte~~z#J64EPxp(V%h==QLJ_Z
znxTm83N%GI)9i#2A%Z>sGy2!}zp0tN1v;TR4Z{ALvP>k93#Hv+fRF!}08B#%A`y@@
z;7^pE$OL{vF*y&|hoW8~5RQ6F_1#b+_>3e34}o6_>;wamh|vll9X1e&IQ{|*L-q7%
z1InV<^c5J7qD(JP2E~X0;42h=4F5NMnQ@>iO4m*OH(k*=;1$Z=^Ce(3s=aj$n1JHz
zt^cOIz6aDqX~AP448<>hfmkSZUjf&i{Ci2MBMc*wsFy?z*L(>ffx8buF%e^rKx0%l
z4hTpW#V`!e{SzP(0mBFJq5+ZcjZXlPyy|4+NC4|+&TLb2^Vi0W{V(3T3X{zJda{;!Z%$J$r3d?tlXkHeMw5}@
z{Mj+Y*Oz2S>zWUf(=*@k4HFrfgHlSa9_IP4+6z(tt<>_oDHX4n6?Y?!=07L222oNC
zVi@K>3e!N5dTZ*>OL8GL-(nW?qU_h+5QwaSIl@Wn&iU~*G`ToFF={#JG@QF3YHh3_
zWAB}A(BB4isK@J0+`!qIc3S!Xeo8d}}klUjf
zzuIrXBt~;;^-An|PKA{l8XJehGuu)Rx3|YVkMt_<2f5-T#^^|WK5*$hUrLVDj-qe|
zV`O$^;v1Dod?Ls=V(~ye19+!sN_t)9!aq1LN9pPfHf??Q(RU1cv%aFFuVUk1q1pfH
zuoj!LCobh>SY-uChO?FdmZJT06FJ*>LN~9{qu0=ofhC(Q9TDnHVuFxf#1gzV@HK)jJ>dp&EVF&A9+hKZ$oBtxT7AII?M
zaGd1%XN%^oXfnOU-tZALRoB!8%6kSp(Y0{;?Kb@0N1LQ^U1rT%CmvlySsUMAL>H&D
zFH@IR^R_^VT~tQM5gC#?!N4mC5hk^}e
zUL)F)v?(ECJ*bd_Jq;MNixsQMe*VQcZiUw4{;73OH(qJaSC6%U{)MYs**)VaBp(I7
zuLxCL%K;UPCpbk*HKHoThayueAkgFV;B4>gY*(K5@A~7Fk<#6)>!!BAgCrkwhFa{C
z_PL@Jr;1NGa_FTrAY(RHcj?KZDp;k5v6b`=)@JizB1}GH``Pt9+UYIsnwb2qM%;kx
z?UVo>3o^!%ZJ8r3zz`4emat(PJm~xN{B0wJcEB2Jz?skEIJ3Wb-%m2+xh6bi2%TAw
zQI4B@#i&<4a3SR*%1b6Cnf(cF<`SSfAsvP8%e_uBs
zGIdf)OKDy0QYgY&fq#^IrElu#`ykyIql!DjOJt6tYVWq*laY-JcTgrfXv<@X4&$}qhLiKFA>kL
z0-+bIo?_k(4}wef{?8J9^4_HZ-zcj^F}*A$coH0Lo+#PUiMRyDhN_;2-g*RuxqOIb
z@t>7obK5z}kF{DL`Do~|;^Lu8?`(;r>6-~!lCFsT3txq-Z^(SJ1%V@O^PaYKI?`WZ
z!?@%{UfV|B{i467xDD>qIx%+16;vj$e0}`X7lx)}Sv8Hw2-2n=m`YJdf1e#8B&UN`
zJwsn_L*AyRpZ}Ch{(B;8f_+!p);rGWC-@X4tZ3N|j?spjeBA=QY#b}6F1>)JFe+v&
zH`BPCS1CSRMx?{;VrW}@{8K8ua_m%Pv#>l{!6dTW1gahUM7z9-E@9_rT#%uDgL|Zj
z?Zit1v;Bb|*5q$XD(ZmQsVU@{2TJZ8bTpZq!(DaBec|?J?`&5ENw|hH28lM%cqUlR
zjxJ<&(ICD2v&UsuUNnC<+^v
zhzHA2L0q5{gQ5P!3U7H5x9}{Qtb>JXSeFCjZ*r$9UrGC##d-LkP02LkUDfa5@s=@c
zp3oe*k1RJ-80`25iMnWkc-EOra(dV^yi@hK#Az8L0j8+O4P#_t;+@4@%dvlD)KeRpZhL$>t|XdJ&Qq(U+~wPK7a_9n%vBIort
z7^4k@eW!iNHGV%XuP-V@LzrROzO>DM0rZ!x!P`Nfs_7NuWYwC?tP<}1R-QYC%qgT3
zt7ECBGG35fHqKwh2Txr{et$Sy^36=>`ie7sh%4WRZ~xgQLzL6#58m<0m>n%k>R8e!
z%faJhYHx2B(kNQY3ElpL;P&bz!y&iGZT!8$r9Txta{qGYo!n%>W{L#NRNHdO!+prS
zPU@>I(YHmyp4|<~=p|OOpYEdHA688DC|jPx+o=*(7v?Qf_Zel(8DoRDK{Co8mO+yT
zgetP^*=HYbTov?L#}4_z-I_@P^V5mtsg_=N7GW`B
zS?V0)>ngF^2x5Jglgo{Tad|GOo%8H3lThR{>|I@xx_n)A_YddtGh=;*XmQ
zVY)2_{-?wmakF2S4LOB#R5q9?btld)`x+bmLcYhjW*}>pWA3FY2cllb+07q*e@Mhv
z5^DNpy%Y!H%PJhn-fN+UX9x1f$1})!S+U~dZZN>4xc#pH?n~Q4Q-iX(>?K=&M<%s-
zU+Dx)Hr~ZWc~k_zI_EB4NnmC