Command Line Operation

Batch operation is possible with installed applications and from Python source code.
Run as follows:
  • Python source code:
python arelleCmdLine.py arguments
  • Windows x64 or 32 bit:
"c:\Program Files\arelleCmdLine.exe" arguments
  • MacOS App:
/Applications/Arelle.app/contents/MacOS/arelleCmdLine arguments
  • Linux/Unix:
./arelleCmdLine arguments
(for Sparc/Solaris or otherwise as needed may need to set .so  loading path:
LD_LIBRARY_PATH=`pwd` ./arelleCmdLine arguments  ...)
where arguments are:
  • -h or –help for the arguments supported by the running version of the program
  • -a or –about for the compile date version, copyright, and license information
Specifying input files
  • -f or –file followed by file name (entry point to be loaded, instance, schema, linkbase, inline XBRL instance, testcase file, or testcase index file).  File may be local or a URL to a web-located file.  (If packages are loaded and enabled, remapping of URLs into package files is effective.) File may be a JSON structure of one or more files and applicable parameters based on plugin consumption: –file ‘[{“file”: “foo.xml”},{“file”:”bar.xml”}]’
  • –username followed by username if needed (with password) for web file retrieval
  • –password if needed (with username) for web file retrieval
  • -i or –import followed by a list of files to import to the DTS, such as additional formula or label linkbases.  Multiple file names are separated by the “|” character.
  • -d or –diff followed by file name for a second DTS to be compared for versioning report generation.  In this case the -f file is the fromDTS and the -d file is the toDTS.
    • -r or –report, followed by the file name into which to save a versioning report (companion to -d or –diff).
Validations
  • -v or –validate: perform validation according to the file type.  If an XBRL file, it is validated according to XBRL validation 2.1, calculation linkbase validation if either –calcDecimals or –calcPrecision are specified, and disclosure system validation (as selected). If a test suite or testcase, the test case variations are individually so validated.  If formulae are present they will be validated and run unless –formula=none is specified.
  • –calc: select calculation linkbase validation
    • none or parameter absent – no calculations validation
    • c10 or xbrl21 – Calc 1.0 (XBRL 2.1) calculations
    • c10d or xbrl21-dedup – Calc 1.0 (XBRL 2.1) calculations with de-duplication
    • c11r or round-to-nearest – Calc 1.1 round-to-nearest mode
    • c11t or truncation – Calc 1.1 truncation mode
  • –disclosureSystem followed by system code (such as ‘efm’), for disclosure system rules validation.  Enter –disclosureSystem=help for a list of names, or help-verbose for a list of names and descriptions.  (Replaces –efm and –gfm, which are deprecated.)
  • –utr: select validation with respect to the Unit Types Registry.  (Some disclosure systems validations activate utr validation or provide specific utr files, so this entry would not be needed, such as U.S. SEC.)
    • –utrUrl followed by URL overrides the systems Unit Type Registry (with a URL or local file path) (not needed with a –disclosureSystem argument).
  • –infoset specifies validation with respect to test case infosets (which are part of some test case suites).
  • –labelLang provides an xml:lang language code to override the system language settings for labels output by the following file options, e.g., –labelLang=en-US
  • –labelRole overrides the standard XBRL 2.1 label role for the labels output by the following file options, e.g., –labelRole=http://www.xbrl.org/2003/role/terseLabel
The following file options determine the type of file saved by the extension of the file name, the extension may be any of: “.html”, “.htm”, “.xhtml”, “.json” or “.csv”.  The prior options named –csv* are deprecated but still work.
  • –DTS followed by file name: write the DTS tree into the specified file
  • –facts followed by file name: write the fact list into the specified file
    • –factListCols followed by a list of columns for a –facts list, the columns are comma separated and can be any of these: Label, Name, contextRef, unitRef, Dec, Prec, Lang, Value, EntityScheme, EntityIdentifier, Period, or Dimensions. The default columns list is “Label contextRef unitRef Dec Prec Lang Value“.
  • –factTable followed by file name: write the fact table into the specified file
  • –concepts followed by file name: write the concepts (elements) list into the specified file
  • –pre followed by file name: store the presentation linkbase in specified file
  • –cal followed by file name: store the calculation linkbase in specified file
  • –dim followed by file name: store the dimensions in definition linkbase in specified file
  • –anch followed by file name: store anchoring relationships in specified file
    • The wider-narrower hierarchy is shown in a tree view.
    • For each anchored concept, if there are multiple parent (wider) concepts, the others are shown in a second column, “wider”.
    • To additionally show name, documentation and references on this view, specify one or all of –relationshipCols “Name,Documentation,References”
    • –formulae followed by file name: store the formula-related resources tree in specified file
  • –viewArcrole followed by an arcrole: store relationships for the arcrole in the file specified by –viewFile
    • –viewFile specifies the file to store –viewArcrole relationships
  • –roleTypes followed by file name: store defined role types in specified file
  • –arcroleTypes followed by file name: store defined arcrole types in specified file
  • –testReport followed by file name: write a test report of validation (of test cases) in specified file
    • –testReportCols followed by a list of columns for a –testReport, the columns are comma separated and can be any of these: Index, Testcase, ID, Name, Reference, ReadMeFirst, Status, Expected, Actual“.
  • –rssReport followed by file name: write a test report of RSS feed processing in specified file
    • –rssReportCols followed by a list of columns for a –testReport, the columns are comma separated and can be any of these: Company Name, Accession Number, Form, Filing Date, CIK, Status, Period, Yr End, Results”.
Logging options:
  • logFile: write log messages into file, otherwise they go to standard output. If file ends in .xml it is xml-formatted, otherwise it is text.  XML log files contain significant additional details not provided in the text files.  The file names logToPrint, logToStdOut.xml and logToStdError provide output on standard output and standard error streams.
    • –logFormat: specify the Python logger format for the text description of messages, if absent the default is [%(messageCode)s] %(message)s – %(file)s.
    • –logLevel: Minimum level for messages capture, otherwise the message is ignored.  Current order of levels are debug, info, info-semantic, warning, warning-semantic, warning, assertion-satisfied, inconsistency, error-semantic, assertion-not-satisfied, and error.
    • –logLevelFilter: Regular expression filter for logLevel. (E.g., to not match *-semantic levels, –logLevelFilter=(?!^.*-semantic$)(.+).
    • –logCodeFilter: Regular expression filter for log message code
  • –collectProfileStats: Collect profile statistics, such as timing of validation activities and formulae.
Validation and formula options:
  • –parameters specifies parameters for formula and validation (name=value[,name=value]).
    • –parameterSeparator: Specify parameters separator string (if other than comma, may be a multi-character separator).
  • –formula: Specify formula action, If this option is not specified, -v or –validate will validate and run formulas if present:
    • validate – validate only, without running;
    • run – validate and run, or
    • none – prevent formula validation or running when also specifying -v or –validate.
  • –formulaParamExprResult: formula tracing option
  • –formulaParamInputValue: formula tracing option
  • –formulaCallExprSource: formula tracing option
  • –formulaCallExprCode: formula tracing option
  • –formulaCallExprEval: formula tracing option
  • –formulaCallExprResult: formula tracing option
  • –formulaVarSetExprEval: formula tracing option
  • –formulaVarSetExprResult: formula tracing option
  • –formulaVarSetTiming: show times of variable set evaluation
  • –formulaAsserResultCounts: formula tracing option
  • –formulaFormulaRules: formula tracing option
  • –formulaVarsOrder: formula tracing option
  • –formulaVarExpressionSource: formula tracing option
  • –formulaVarExpressionCode: formula tracing option
  • –formulaVarExpressionEvaluation: formula tracing option
  • –formulaVarExpressionResult: formula tracing option
  • –formulaVarFiltersResult: formula tracing option
  • –formulaVarFiltersWinnowing: shows winnowing process of successive application of formulas, helpful in debugging to find out which filter affects the facts that pass a filtering step
  • –formulaVarFiltersResult: shows result of filters
Configuration options
  • –uiLang: Language for user interface (override system settings, such as program messages).  Does not save setting.  Does not affect labels language of above reports (see –labelLang).
  • –proxy: Modify and re-save proxy settings configuration. Enter system to use system proxy setting, none to use no proxy, a specific prlxy in the format http://[user[:password]@]host[:port] (e.g., http://192.168.1.253, http://example.com:8080, http://joe:secret@example.com:8080), or show to show current (saved)setting.
  • –internetConnectivity: Specify internet connectivity: online or offline.
  • –internetTimeout: Specify internet connection timeout in seconds (0 (zero) means unlimited).
  • –internetRecheck:  Specify frequency of rechecking web file’s time stamps to cached file copy and determine if newer file to be reloaded: weekly (default), daily or never.
  • –noCertificateCheck: Skip https SSL certificate checking.
  • –internetLogDownloads:  Log an info message for downloads to the web cache.
  • –xdgConfigHome: Specify non-standard location for configuration and cache files (overrides environment parameter XDG_CONFIG_HOME, if also provided).
  • –plugin[s]: specify plugins to load (no longer saved or shared with GUI):
    • Module urls are ‘|’ separated. Standard plugin modules do not need “.py” specified.
      • relative URLs are relative to installation plug-in directory
    • Packaged plug-in urls are their directory’s url.
  • –packages:  Modify taxonomy packages configuration. (not saved or shared with GUI)
    • Package urls are ‘|’ separated:
    • URLs are full absolute paths.
  • –abortOnMajorError: Abort process on major error, such as when load is unable to find an entry or discovered file.
  • –webserver: Start web server on host:port[:server] for REST and web access, e.g., –webserver locahost:8080, or specify nondefault a server name, such as cherrypy, –webserver locahost:8080:cherrypy.
  • (It is possible to specify options to be defaults for the web server, such as disclosureSystem and validations, but not including file names.)

Plug in Options

Many of the plug-ins add command line (in addition to GUI menu) options.  For additional detail see the plug-in documentation.  A summary of standard plug options is provided here:

inlineDocumentSet

Specify an inline XBRL document set by JSON parameter: –file ‘[{“ixDocumentSet”:[{“file”:file1},{“file”:file2}…]}]’
–save-instance: provides a file name into which to save an XBRL instance document derived from a loaded manifest (Japan FSA) of a document set of inline documents, or loaded single inline document.  (Currently supports one target instance document only.)

loadFromExcel

(no command line options, but the -f and –file options can specify an Excel document which represents a DTS.)

profileCmdLine

–save-profiler-report: specifies file into which to save a Python profiler report of the timings of Arelle Python methods and routines for the operations performed by the other command line functions.  Useful to determine if a long running function is spending excessive time in a function that needs implementation attention.

saveDTS (produces TaxonomyPackage)

–package-DTS: specifies a file into which to save a Taxonomy Package representing the loaded DTS

saveHtmlEBAtables (EBA Table Sets)

–save-EBA-tablesets: specifies an index file (usually index.html) to represent an html page that holds a table of contents to the EBA tables generated for all loaded EBA Table Linkbase tables in the DTS.

saveLoadableExcel

–save-loadable-excel:  Saves an Excel workbook representing the DTS (which can be subsequently loaded by loadFromExcel.py plugin.

saveSKOS

–save-skos: saves a SKOS (OMG standard OWL file) representing a semantic view of a DTS based on presentation linkbase entries (for US-GAAP, IFRS, and EDInet style taxonomies).

validateSecTagging

–save-sec-tag-dts-matches: adds to disclosure system SEC validation checks for SEC non negatives based on an algorithmic and weighted approach
sphinx (subpackage, features including generating formula linkbase have not been sufficiently tested)
–import-sphinx: Import sphinx files to the DTS for validation.  Multiple file names are separated by a ‘|’ character.
–generate-sphinx-formula-linkbase:  Generate an XBRL formula linkbase from sphinx files.  Multiple file names are separated by a ‘|’ character. Files may be xrb archives, xsr source files, or directories of same.
–generated-sphinx-formulas-directory:  Generated XBRL formula linkbases directory.  (If absent, formula linkbases save in sphinx files directory.)

xbrlDB

–store-to-XBRL-DB:  Store into XBRL DB.  Provides connection string: host,[port], user, password, database, [timeout], technology:
postgres – XBRL-US Postgres SQL
mssqlSemantic – Semantic MSSQL SQL
mysqlSemantic – Semantic MySQL SQL
orclSemantic – Semantic Oracle SQL
pgSemantic – Semantic Postgres SQL
rexster – Rexter (Titan Cassandra)
rdfDB – RDF (Turtle, NanoSparqlServer)
json – JSON (JSON, MongoDB)
For rdfDB if hostname is rdfTurtleFile or rdfXmlFile, then database specifies a local file system pathname to store a file.  For json, if hostname is jsonFile then database specifies a local file system path name to store into a file.
Examples:
Store into postgres database using XBRL-US schema:
arelleCmdLine -f c:\temp\test.rss -v –disclosureSystem efm-pragmatic-all-years –store-to-XBRL-DB “myhost.com,8084,pgUserId,pgPassword,test_db,90,postgres”
Store into local MSSQL database using SQLEXPRESS instance:
arelleCmdLine -f c:\temp\test.rss -v –disclosureSystem efm-pragmatic-all-years –store-to-XBRL-DB “localhost\SQLEXPRESS,,sqlLogin,sqlPassword,,90,mssqlSemantic”

Disclosure System Selections

The disclosure systems are documented in the config directory file disclosuresystems.xml.  These are current entries:
  • fsa: Japan FSA
Japan FSA example entry
Default language Japanese
EDInet identifier patterns
Allowed references TBD
  • ifrs: IFRS-Example
IFRS Example
Default language English
EDInet identifier patterns
Allowed references TBD
  • sbr-nl: SBR-NL
SBR Netherlands
Default language Dutch
EDInet identifier patterns
Allowed references TBD
  • hmrc: UK HMRC (Joint Filing Validation Checks)
UK HMRC Joint Filing Common Validation Checks
Default language en-UK
Disallowed references are processed
  • efm-strict: US SEC (Edgar Filing Manual, Strict)
US SEC Edgar Filing Manual, 2013
Default language en-US (en allowed in some cases per EFM)
CIK identifier patterns
Allowed references https://www.sec.gov/info/edgar/edgartaxonomies.shtml
Disallowed references are processed
Includes content (semantic) tests
  • efm-pragmatic: US SEC (Edgar Filing Manual, Pragmatic)
US SEC Edgar Filing Manual, 2013
Default language en-US (en allowed in some cases per EFM)
CIK identifier patterns
Allowed references https://www.sec.gov/info/edgar/edgartaxonomies.shtml
Disallowed references are blocked and not loaded (same as SEC production s
ystem)
No content (semantic) tests are reported
  • efm-strict-all-years: US SEC (Edgar Filing Manual, Strict, all years)
US SEC Edgar Filing Manual, 2012
Default language en-US (en allowed in some cases per EFM)
CIK identifier patterns
Allowed references https://www.sec.gov/info/edgar/edgartaxonomies.shtml
Disallowed references are processed
Includes content (semantic) tests
  • efm-pragmatic-all-years: US SEC (Edgar Filing Manual, Pragmatic, all years)
US SEC Edgar Filing Manual, 2012
Default language en-US (en allowed in some cases per EFM)
CIK identifier patterns
Allowed references https://www.sec.gov/info/edgar/edgartaxonomies.shtml
Disallowed references are blocked and not loaded (same as SEC production system)
No content (semantic) tests are reported
  • gfm-us: US SEC (Global Filing Manual)
US SEC interpretation of Global Filing Manual
Default language en
CIK identifier patterns
Allowed references https://www.sec.gov/info/edgar/edgartaxonomies.shtml
Disallowed references are processed

Batch Script Files

A set of batch script files are provided for convenience of running repetitive things.  Contributors are encouraged to improve them and make them suitable for Mac and Linux (originally just Windows):
  • runEFMTests.bat:  Runs all of the EFM tests in the indicated source tree of test files.  Outputs log with error messages, and an Excel-compatible file (.csv for the moment) with the same appearance as the tests tree grid GUI view.
  • runUS-GFMTests.bat:  Same, but runs tests in the Global Filer Manual, instead of Edgar, mode.  Just for experimentation at this moment.
  • runXDTTests.bat:  Runs the XDT conformance suite, and outputs messages log and Excel report.
  • runGenerateVersioningTestcases.bat:  Generates a versioning creation/consumption test suite from the excel index file, such as 1000-2000-index.xml.
  • runVersioningConsumptionTests.bat:  Executes versioning consumption testcases from the index file noted in the settings.
 

Comments are closed.