Name: illiad-history
Owner: Stanford University Digital Library
Description: Connects to the ILLiad database to query transactions, notify users, and update the database
Created: 2017-10-04 23:52:33.0
Updated: 2018-02-04 18:36:16.0
Pushed: 2017-11-10 00:42:19.0
Homepage: null
Size: 10088
Language: Java
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Connects to the ILLiad database to query transactions, notify users, and update the database.
Retrieves user email addresses from the ILLiad Users database and sends out a notification about upcoming service changes.
You must set the mailer host and user as environment variables on the box where this program will run, e.g.:
rt SMTP_HOST="smtp.stanford.edu"
rt SMTP_USER="user@stanford.edu"
Imports a spreadsheet of transactions numbers and call numbers and updates the Transactions table with new information about the call numbers associated with the transactions. Takes three arguments, the first is the CSV file. The second is the column that contains the Transaction Number and the third is the column with the Call Number.
Running this package disassociates User Names from Transactions, and assigns the Transactions to the generic pseudo-user
that matches the OCLC code of the ILL Unit (e.g. “BrokenUserST2”). Provide the code as an argument in order to scrub the users associated
with that ILL unit. Use the argument ill
to create a backup table that joins Transactions and Users before disassociating
the original tables. Pay attention to the comments in the addUserTransactions.sql
file as there are modifications needed when
creting the table for the first time.
You can run these packages on a local machine, or on a server. Either way, you must first install the JAR files by running the Maven command:
clean install
This will create the JAR files in the lib/
directory. Then you run the packages:
Output the usage arguments:
-jar lib/EmailUsers-jar-with-dependencies.jar
R ILLiadEmailUsers - Usage: ILLiadEmailUsers [ no-history | with-history | {nvtgc} ]
Sends emails to all selected users (from selectEmails.sql
) using emailTextWithHistory.txt
as the email body
and appends the user's request history to the email:
-jar lib/EmailUsers-jar-with-dependencies.jar with-history
Sends emails to all selected users (from selectEmails.sql
) using emailText.txt
as the email body
without appending the user's request history to the email:
-jar lib/EmailUsers-jar-with-dependencies.jar no-history
Sends a message to a Staff Member (defined in emailUserTransactionsTo.txt
) with statistical and User request information
for the provided NVTGC (e.g. ST2):
-jar lib/EmailUsers-jar-with-dependencies.jar st2
Creates or updated the ILLTransactionData.dbo.UserTransactions
table (refer to addUserTransactions.sql
) with the latest
requests. This should be run every year BEFORE scrubbing actual users:
-jar lib/ScrubUsers-jar-with-dependencies.jar ill
Scrubs the users for a given NVTGC, meaning that the Users will no longer be associated with their transactions and all transactions for the year will furthermore belong to e.g. ““BrokenUserST2” for ST2:
-jar lib/ScrubUsers-jar-with-dependencies.jar st2
-jar lib/CallNumbers-jar-with-dependencies.jar addCallNumbersFile.csv TransactionNumber CallNumber1
Deploys are done using Capistrano. You can deploy the project to the development server with cap dev deploy deploy:jars
and to the production server with cap prod deploy deploy:jars
. The project will be copied to the /s/SUL/ILLiad
directory
on those machines. The dev and prod hostnames are defined in config/deploy/dev.rb
and config/deploy/prod.rb
. You will
also need to get the ILLiad server details from “shared_configs” and follow the instructions to copy the details to the
deployed shared directory. Make sure that you install the packages (with Maven as described above) either locally or on
the server before trying to run any of the modules. The deployment will upload the JAR files to the lib/
directory on
the server.