(countries-load)
(countries-load pathname)
Reads CSV file in a format compliant with Joda Money and returns a map with currency to countries associations where countries are as sets. The pathname should be relative to resources directory.
Reads CSV file in a format compliant with Joda Money and returns a map with currency to countries associations where countries are as sets. The pathname should be relative to resources directory.
(currencies-load)
(currencies-load pathname)
Reads CSV file compliant with Joda Money and returns a map with currency ID (keyword) as a key and currency data as its value (vector). The pathname should be relative to resources directory.
Reads CSV file compliant with Joda Money and returns a map with currency ID (keyword) as a key and currency data as its value (vector). The pathname should be relative to resources directory.
(currency->map {:keys [:numeric :scale :kind :weight]})
Takes a currency and returns a map suitable for putting into a configuration file. Extensions fields are ignored.
Takes a currency and returns a map suitable for putting into a configuration file. Extensions fields are ignored.
Default CSV file with countries database.
Default CSV file with countries database.
Default CSV file with currencies database.
Default CSV file with currencies database.
Default data reader filename (pure data).
Default data reader filename (pure data).
Default namespace of a reader handlers.
Default namespace of a reader handlers.
Default pathname of a reader handlers file.
Default pathname of a reader handlers file.
Default data reader filenames (Clojure code).
Default data reader filenames (Clojure code).
Filename in a default resource container that must exist.
Filename in a default resource container that must exist.
Name of a default resource container.
Name of a default resource container.
(dump)
(dump registry)
(dump filename registry)
For the given filename (defaults to default-dump-filename) and a registry (defaults to a global registry) creates a dump in EDN format.
Filename will be placed in the default directory of resources (the same that which config.edn).
For the given filename (defaults to default-dump-filename) and a registry (defaults to a global registry) creates a dump in EDN format. Filename will be placed in the default directory of resources (the same that which config.edn).
(export)
(export registry)
(export filename registry)
For the given filename (defaults to default-dump-filename) and a registry (defaults to a global registry) creates a configuration file in EDN format.
Filename will be placed in the default directory of resources (the same which holds config.edn).
For the given filename (defaults to default-dump-filename) and a registry (defaults to a global registry) creates a configuration file in EDN format. Filename will be placed in the default directory of resources (the same which holds config.edn).
(handler-gen names)
Generates handler functions for tagged literals for each namespaced currency. Each function will have a prefixed name.
Generates handler functions for tagged literals for each namespaced currency. Each function will have a prefixed name.
(joda->bankster-dump)
Reads Joda Money CSV files and creates a registry dump named resources/io/randomseed/bankster/registry-dump.edn.
Reads Joda Money CSV files and creates a registry dump named resources/io/randomseed/bankster/registry-dump.edn.
(joda->bankster-export)
Reads Joda Money CSV files and creates a configuration file named resources/io/randomseed/bankster/registry-export.edn.
Reads Joda Money CSV files and creates a configuration file named resources/io/randomseed/bankster/registry-export.edn.
(joda-import)
(joda-import countries-pathname currencies-pathname)
Reads CSV files with countries and currencies definitions (Joda Money format) and returns a registry.
Reads CSV files with countries and currencies definitions (Joda Money format) and returns a registry.
(localized->map m)
Takes a localized map entry (1st level) and returns a map suitable for putting into a configuration file.
Takes a localized map entry (1st level) and returns a map suitable for putting into a configuration file.
(readers-export)
(readers-export registry)
(readers-export registry filenames)
(readers-export registry filenames data-filename)
(readers-export registry
filenames
data-filename
handlers-pathname
handlers-namespace)
Creates clojure source code files with reader functions for tagged literals handling on a basis of registry information and data reader map files referring to the created handlers.
The purpose of generation is primary to create handlers for literals in forms of #money/NS[…], where NS is a namespace that corresponds to a namespace of a currency. Possible namespaces are taken from a registry (a map from its field .cur-id->cur).
The function takes a registry (defaults to a global registry if not given), a sequence of reader filenames (defaults to default-reader-filenames), default handlers pathname (defaults to default-handlers-pathname) and default handlers namespace (defaults to default-handlers-namespace).
Default namespace is a namespace in which money handlers will be defined. These handlers will be written to a file which pathname is constructed using the following tactic:
Obtain the directory of the first filename from the given filenames list using Java's resource lookup. The assumption is it should be src directory of a project.
Append the file path passed as the handlers-pathname.
As for data reader map files, their directory name is also based on the lookup of the first filename. Each filename will be populated with the same content which is a map associating tagged literal with a function.
Creates clojure source code files with reader functions for tagged literals handling on a basis of registry information and data reader map files referring to the created handlers. The purpose of generation is primary to create handlers for literals in forms of #money/NS[…], where NS is a namespace that corresponds to a namespace of a currency. Possible namespaces are taken from a registry (a map from its field .cur-id->cur). The function takes a registry (defaults to a global registry if not given), a sequence of reader filenames (defaults to default-reader-filenames), default handlers pathname (defaults to default-handlers-pathname) and default handlers namespace (defaults to default-handlers-namespace). Default namespace is a namespace in which money handlers will be defined. These handlers will be written to a file which pathname is constructed using the following tactic: 1. Obtain the directory of the first filename from the given filenames list using Java's resource lookup. The assumption is it should be src directory of a project. 2. Append the file path passed as the handlers-pathname. As for data reader map files, their directory name is also based on the lookup of the first filename. Each filename will be populated with the same content which is a map associating tagged literal with a function.
(registry->map)
(registry->map registry)
Takes a registry and returns a map suitable for putting into a configuration file. Extensions fields are ignored. When registry is not given it uses the global one. Extension fields are ignored.
Takes a registry and returns a map suitable for putting into a configuration file. Extensions fields are ignored. When registry is not given it uses the global one. Extension fields are ignored.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close