Liking cljdoc? Tell your friends :D

io.randomseed.bankster.util.importer


countries-loadclj

(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.
sourceraw docstring

currencies-loadclj

(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.
sourceraw docstring

currency->mapclj

(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.
sourceraw docstring

default-countries-csvclj

Default CSV file with countries database.

Default CSV file with countries database.
sourceraw docstring

default-currencies-csvclj

Default CSV file with currencies database.

Default CSV file with currencies database.
sourceraw docstring

default-data-reader-filenameclj

Default data reader filename (pure data).

Default data reader filename (pure data).
sourceraw docstring

default-dump-filenameclj

Default EDN dump file.

Default EDN dump file.
sourceraw docstring

default-export-filenameclj

Default EDN export file.

Default EDN export file.
sourceraw docstring

default-handlers-namespaceclj

Default namespace of a reader handlers.

Default namespace of a reader handlers.
sourceraw docstring

default-handlers-pathnameclj

Default pathname of a reader handlers file.

Default pathname of a reader handlers file.
sourceraw docstring

default-reader-filenamesclj

Default data reader filenames (Clojure code).

Default data reader filenames (Clojure code).
sourceraw docstring

default-resource-must-exist-fileclj

Filename in a default resource container that must exist.

Filename in a default resource container that must exist.
sourceraw docstring

default-resource-nameclj

Name of a default resource container.

Name of a default resource container.
sourceraw docstring

dumpclj

(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).
sourceraw docstring

exportclj

(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).
sourceraw docstring

handler-genclj

(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.
sourceraw docstring

joda->bankster-dumpclj

(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.
sourceraw docstring

joda->bankster-exportclj

(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.
sourceraw docstring

joda-importclj

(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.
sourceraw docstring

localized->mapclj

(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.
sourceraw docstring

readers-exportclj

(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:

  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.

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.
sourceraw docstring

registry->mapclj

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close