<commit_before>= rptman

This tool includes code and a suite of rake tasks for uploading SSRS
reports to a server. The tool can also generate project files for
the "SQL Server Business Intelligence Development Studio". 

== Installation

The extension is packaged as a jruby gem named "rptman", consult the ruby
gems installation steps but typically it is

  jgem install rptman

== Basic Overview

Reports are stored in sub-directories of a <report-dir>. The filename
of the report must end with ".rdl". The directory hierarchy on the local
file system is mirrored on the SSRS server during an upload. So if a file
exists with the name

  <report-dir>/IRIS/Coordination/Tour Of Duty Report.rdl

It will be uploaded to the SSRS server with the path

  /IRIS/Coordination/Tour Of Duty Report

Every top level directory on the local filesystem that includes a report
file is deleted when it during the upload process. So in the above scenario
the /IRIS directory on SSRS server is delted prior to uploading the
directory. It is assumed that every report in a particular hierarhcy is
stored in one location.

The tool can also create data source definitions and these are placed in a
directory named "/DataSources".

The gem supports prefixing all paths with when uploading to the SSRS server.
It is possible to prefix all reports managed by this tool with /Auto so as
to distinguish them from reports uploaded through other means. If multiple
people are working of the same SSRS instance it is also possible to decorate
the prefix with a username or environment. (i.e. /Auto/PD42/DEV)

The configuration data for determing which SSRS instance and prefix to use
is in a yaml file with a format described below. The easiest way to use the
tool is to create a ruby script such as the following;

  gem 'rptman'

  # The configuration file
  SSRS::Config.config_filename = "database.yml"

  # The directory in which the reports are stored
  SSRS::Config.reports_dir = "reports"

  # Define a data source named IRIS_CENTRAL that has
  # configration data stored under the key 'central'
  SSRS::Config.define_datasource('IRIS_CENTRAL','central')

  # actually run the tool
  SSRS::Shell.run

The script can then be run with a -h parameter to see the various options. 

== Configuration Format

The configuration is stored in a yaml file. The configuration file format
allows for multiple "environments" (a.k.a. configuration) in one file. Most<commit_msg>Update example to do a require after gem command to ensure SSRS is loaded<commit_after>= rptman

This tool includes code and a suite of rake tasks for uploading SSRS
reports to a server. The tool can also generate project files for
the "SQL Server Business Intelligence Development Studio". 

== Installation

The extension is packaged as a jruby gem named "rptman", consult the ruby
gems installation steps but typically it is

  jgem install rptman

== Basic Overview

Reports are stored in sub-directories of a <report-dir>. The filename
of the report must end with ".rdl". The directory hierarchy on the local
file system is mirrored on the SSRS server during an upload. So if a file
exists with the name

  <report-dir>/IRIS/Coordination/Tour Of Duty Report.rdl

It will be uploaded to the SSRS server with the path

  /IRIS/Coordination/Tour Of Duty Report

Every top level directory on the local filesystem that includes a report
file is deleted when it during the upload process. So in the above scenario
the /IRIS directory on SSRS server is delted prior to uploading the
directory. It is assumed that every report in a particular hierarhcy is
stored in one location.

The tool can also create data source definitions and these are placed in a
directory named "/DataSources".

The gem supports prefixing all paths with when uploading to the SSRS server.
It is possible to prefix all reports managed by this tool with /Auto so as
to distinguish them from reports uploaded through other means. If multiple
people are working of the same SSRS instance it is also possible to decorate
the prefix with a username or environment. (i.e. /Auto/PD42/DEV)

The configuration data for determing which SSRS instance and prefix to use
is in a yaml file with a format described below. The easiest way to use the
tool is to create a ruby script such as the following;

  gem 'rptman'

  require 'rptman'

  # The configuration file
  SSRS::Config.config_filename = "database.yml"

  # The directory in which the reports are stored
  SSRS::Config.reports_dir = "reports"

  # Define a data source named IRIS_CENTRAL that has
  # configration data stored under the key 'central'
  SSRS::Config.define_datasource('IRIS_CENTRAL','central')

  # actually run the tool
  SSRS::Shell.run

The script can then be run with a -h parameter to see the various options. 

== Configuration Format

The configuration is stored in a yaml file. The configuration file format
allows for multiple "environments" (a.k.a. configuration) in one file. Most
{'fraction_non_alphanumeric': 0.04221954161640531, 'fraction_numerical': 0.0008041817450743868, 'mean_word_length': 4.166147455867082, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1394913', 'n_tokens_mistral': 1359, 'n_tokens_neox': 1256, 'n_words': 754}