SlideShare uma empresa Scribd logo
1 de 44
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 1 WRLC & George Washington University
Michael Cummings
The George Washington University
James O. Austin
Washington Research Library Consortium
From Voyager to your website
Using Linux Shell scripts and Oracle SQL*Plus to generate web pages
ELUNA 2012 Salt Lake City, UT
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 2 WRLC & George Washington University
• About WRLC and GWU
• WRLC services / reports
• ExLibris MS Access reports
• Oracle SQL*Plus
• GWU New Books List
• Steps to creating the List
• Setup at Your Library
Install SQL*Plus on Linux
Get the newbooks scripts
Code Walk Through
• Questions?
Agenda
Agenda
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 3 WRLC & George Washington University
Georgetown
University
American
University
Catholic
University
Gallaudet
University
About WRLC and GWU
Voyager 8
9.6 million bibliographic records
10.5 million holdings
5.8 million items
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 4 WRLC & George Washington University
“Canned Reports”
WRLC provides technical services, including reports
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 5 WRLC & George Washington University
Microsoft Access reports from ExLibris are often utilized
Reports.mdb
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 6 WRLC & George Washington University
Linux
Alternative to MS Access: Oracle SQL*Plus (for Linux)
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 7 WRLC & George Washington University
George Washington University Libraries New Books List one example
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 8 WRLC & George Washington University
George Washington University Libraries New Books List Updated weekly
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 9 WRLC & George Washington University
George Washington University Libraries New Books List Call Number Guide
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 10 WRLC & George Washington University
George Washington University Libraries New Books List RSS Menu
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 11 WRLC & George Washington University
George Washington University Libraries New Books List RSS feed
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 12 WRLC & George Washington University
George Washington University New Titles, Media another example
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 13 WRLC & George Washington University
George Washington University New Titles, Media
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 14 WRLC & George Washington University
Steps to creating the New Book Shelf web page Pick and Scan
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 15 WRLC & George Washington University
<1> Connect to the web server
via SSH.
Oracle SQL*Plus
Shell / Perl
you could
use a cron
task instead
Shell scripts and SQL*Plus
<2> Run the newbookshelf shell script.
Steps to creating the New Book Shelf web page
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 16 WRLC & George Washington University
Setup at your library
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 17 WRLC & George Washington University
Install SQL*Plus on Linux
• These instructions have been validated using
Ubuntu 10.04 LTS in both i686 and x64 desktop
and server editions.
• In order to download files from Oracle, you will
need to register for a free account at
Oracle.com
• We presume in these instructions that you are
using the BASH shell.
• The person performing the setup needs root
user sudo rights, or root account.
Assumptions
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 18 WRLC & George Washington University
Install SQL*Plus on Linux Get files from Oracle
• To obtain the required installable packages, navigate to
http://www.oracle.com/technetwork/indexes/downloads/index.html
Instant Client Package - Basic
Instant Client Package - SQL*Plus
• Scroll down to the Database category and choose Instant Client.
• Choose the appropriate Operating System.
• Check the box indicating you accept the licensing agreement.
• Download the two client packages listed below in .rpm format.
We recommend 10.2.0.4
• Transfer the two files to the Linux server if you downloaded them
somewhere else first.
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 19 WRLC & George Washington University
Install SQL*Plus on Linux Install files from Oracle
The next steps are completed in a terminal window.
Convert the .rpm packages to .deb to install them in Ubuntu.
Do this by using an application called 'alien'.
If it is not already installed, you can do so by typing:
sudo apt-get install alien
Next, navigate to where you saved the .rpm packages and type:
sudo alien -k oracle-instantclient*.rpm
The .deb packages are ready to be installed. Do so by typing:
sudo dpkg -i oracle-instantclient*basic*.deb
sudo dpkg -i oracle-instantclient*sqlplus*.deb
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 20 WRLC & George Washington University
Install SQL*Plus on Linux
The library files are installed but we must create an environment variables
called LD_LIBRARY_PATH and SQLPATH in order for SQL*Plus to locate
them. We'll do this by typing:
gedit ~/.bashrc and pasting into it:
export LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.4/client64/lib
export SQLPATH=/usr/lib/oracle/10.2.0.4/client64/lib
Note: The path to ../10.2.0.4/client64/lib will be different depending on which version of SQL*Plus you
installed and which architecture your platform runs on. Change '10.2.0.4' and 'client64' part of the
path accordingly. If you are installing on a server platform use vi or nano instead of gedit.
We need to fix one more dependency, so do: sudo apt-get install libaio1
You may now go ahead and delete the .rpm files downloaded and subsequent
.deb that were created.
Install files from Oracle
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 21 WRLC & George Washington University
Oracle SQL*Plus is now installed and configured. Create a blank
tnsnames.ora file in your home directory by typing:
touch ~/tnsnames.ora
Create an environment variable so SQL*Plus can reference this tnsnames.ora
file we created.
Type: gedit ~/.bashrc and paste into it: export TNS_ADMIN=~
Logout of your account and then log back in to apply the changes to your
shell.
Note: use sqlplus or sqlplus64 as appropriate and change your USERNAME, PASSWORD, HOSTNAME, PORT and
SID as applicable.
You can test your installation by typing on one line:
sqlplus
USERNAME/PASSWORD@'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(
HOST=HOSTNAME)(PORT=1521)))(CONNECT_DATA=(SID=VGER)))‘
Install SQL*Plus on Linux
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 22 WRLC & George Washington University
You can put the appropriate information in your tnsnames.ora file using
the following as a template:
IDENTIFIER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host=HOSTNAME)(Port= 1521))
(CONNECT_DATA = (SID = VGER))
)
You will then be able to connect with the following command:
sqlplus USERNAME/PASSWORD@IDENTIFIER
Install SQL*Plus on Linux
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 23 WRLC & George Washington University
Download the files from https://github.com/cummingsm/VoyagerELUNA2012
Get the newbooks scripts, install instructions, this slide file
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 24 WRLC & George Washington University
pageHeader.template
lcguideHeaderpt1.out
lcguideHeaderpt2.out
lcguideFactory.out
authorsectionHeader.template
callnumbersectionFactory.out
authorsectionFactory.out
titlesectionHeader.template
titlesectionFactory.out
pagefooterFactory.out
Sections of newlibrarybooks.html
The completed web page is a
combination of several sections, some
are boilerplate templates, others are
rows of information output produced by
the script having parsed and
reformatted the SQL results.
• Page header
• The LC Call Number and RSS guide
• List sorted by Call Number
• List sorted by Author
• List sorted by Title
• Page footer
We also generate separate RSS pages.
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 25 WRLC & George Washington University
newbookshelf.sh
This Shell script calls the other shell and Perl scripts,
and the SQLplus query. (Snippet shown on next slide)
sqlplusQuery.sh
Reads several parameters from the configuration file config.cnf
(Oracle username, password, port, host, etc) and generates
tempQuery.sh. It saves a SQL statement in newbook.sql.
Then it runs tempQuery.sh which saves output in
a tab-delimited file named tbl_newbooklocation.tab
config.cnf
This is the local configuration setting file.
Example: ORACLEPORT=1521
You must edit it.
Code walk-through pg 1 of 17
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 26 WRLC & George Washington University
log=/tmp/newlibrarybooks.log
echo "newbookshelf.sh " > $log
date >> $log
# run the SQLPlus query
echo "calling sqlplusQuery.sh" >> $log
sh sqlplusQuery.sh;
echo -n ':::::::::: Processing the new libray books query output :';
#
echo 'Step 1: calling doPrelim.sh to save previous file' >> $log
sh doPrelim.sh
echo -n ':'
echo 'Step 2: calling sortCallNumbers.sh (and sortLC.pl) ' >> $log
sh sortCallNumbers.sh;
.
. s n i p
.
echo 'DONE!'
echo 'Copy newlibrarybooks.html file to web site directory; copy /rss
directory and files to a directory below the one containing
newlibrarybooks.html.'
newbookshelf.shCode walk-through pg 2 of 17
User runs
this script.
newbookshelf.sh calls the other scripts and creates the log file.
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 27 WRLC & George Washington University
#
ORACLEUSER =`grep ORACLEUSER config.cnf | cut -f2 -d'='`
ORACLEPWD =`grep ORACLEPWD config.cnf | cut -f2 -d'='`
ORACLEHOST =`grep ORACLEHOST config.cnf | cut -f2 -d'='`
ORACLEPORT =`grep ORACLEPORT config.cnf | cut -f2 -d'='`
ORACLESID =`grep ORACLESID config.cnf | cut -f2 -d'='`
ORACLEPATH =`grep ORACLEPATH config.cnf | cut -f2 -d'='`
myTEMPLOC =`grep TEMPLOC config.cnf | cut -f2 -d'='`
#
LD_LIBRARY_PATH=$ORACLEPATH
SQLPATH=$ORACLEPATH
#
# Generate the complete sql file by merging templates with values from the config file
#
cat sqlplus_newbooktop.template > newbook.sql
echo "item.temp_location='$myTEMPLOC'" >> newbook.sql
cat sqlplus_newbookbottom.template >> newbook.sql
sqlplusQuery.shCode walk-through pg 3 of 17
Read config
file. Make
SQL from
template.
sqlplusQuery.sh generates the SQL command and query statement
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 28 WRLC & George Washington University
# Output commands,parameters to shell script
cmdstring_exec=$SQLPATH/sqlplus
cmdstring_acct=$ORACLEUSER/$ORACLEPWD@
cmdstring_desc="'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)
(HOST=$ORACLEHOST)(PORT=$ORACLEPORT)))(CONNECT_DATA=(SID=$ORACLESID)))'"
cmdstring_file="< newbook.sql"
echo 'LD_LIBRARY_PATH='$ORACLEPATH > tempQuery.sh
echo 'SQL_PATH='$ORACLEPATH >> tempQuery.sh
echo 'export LD_LIBRARY_PATH' >> tempQuery.sh
echo 'export SQLPATH' >> tempQuery.sh
echo $cmdstring_exec $cmdstring_acct$cmdstring_desc $cmdstring_file >>
tempQuery.sh
#
# run the script
#
sh tempQuery.sh
sqlplusQuery.sh
Generate
a command
line; run it
sqlplusQuery.sh executes the query
Code walk-through pg 4 of 17
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 29 WRLC & George Washington University
set ECHO OFF
set COLSEP ' '
set LINESIZE 3000
set PAGESIZE 500
set WRAP OFF
set HEADING OFF
set FEEDBACK OFF
set SCAN OFF
set ESCAPE 
column callnum Format A30
column callnumgroup Format A1
column title Format A255
column bib Format 99999999
SPOOL tbl_newbooklocation.tab
http://ss64.com/ora/syntax-sqlplus-set.html
SQL*PLUS set statements
Optional
formatting
newbook.sql
Code walk-through pg 5 of 17
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 30 WRLC & George Washington University
select
bib_vw.call_no as callnum,
bib_vw.call_no as callnumgroup,
bib_item.bib_id as bib,
bib_text.title,
bib_text.author || '&nbsp;' as author_td,
publisher || ' ' || pub_place || ' ' || publisher_date as pub
from
bib_vw,
bib_item,
bib_text,
item
SQL Query
Author
always has
the string
&nbsp;
Code walk-through pg 6 of 17
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 31 WRLC & George Washington University
SQL Query
where
item.temp_location='$myTEMPLOC'
and
bib_vw.bib_id=bib_text.bib_id
and
bib_text.bib_id=bib_item.bib_id
and
bib_item.item_id=item.item_id
and
bib_vw.call_no NOT LIKE 'GW%'
and
…etc
bib_vw.call_no NOT LIKE '9%' and bib_vw.call_no
is not NULL
order by bib_vw.call_no
/
SPOOL OFF
We filter
certain
callnums
Temp loc
from the
config file
Code walk-through pg 7 of 17
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 32 WRLC & George Washington University
sortCallNumbers.sh
Removes the query statement from the query output and then
passes the output to a Perl script (sortLC.pl) for better
sorting by LC Class call number. Result is sortedfile.tab
callNumberFactory.sh
This script and others with “Factory” in the name produce a
file with snippets of HTML code.
Using awk, read sortedfile.tab and generate the HTML section
listing the titles sorted by call number.
doPrelim.sh
Removes problem characters from tbl_newbooklocation.tab
Saves a backup copy of the previous html and sql output files
Code walk-through pg 8 of 17
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 33 WRLC & George Washington University
callNumberFactory.sh generates callnumberFactory.out
callnumberFactory.out contains rows for an HTML table.
The lines will look like this in a browser:
callNumberFactory.shCode walk-through pg 9 of 17
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 34 WRLC & George Washington University
# Initialize flag to indicate if a row was printed.
# This flag determines whether to print a shaded row or not
rowprint=0;
#
max=`wc -l sortedfile.tab | cut -c1-3`
for ((i=1; i<=$max; i++))
do
#
# Grab one line of data from the file and save it temporarily in a file
#
awk NR==$i sortedfile.tab> htmlfactory.tmp
# Get contents of fields from the temporary file into table data elements
td1=`cat htmlfactory.tmp | cut -f1`
td2=`cat htmlfactory.tmp | cut -f2`
td3=`cat htmlfactory.tmp | cut -f3`
td4=`cat htmlfactory.tmp | cut -f4`
td5=`cat htmlfactory.tmp | cut -f5`
td6=`cat htmlfactory.tmp | cut -f6`
callNumberFactory.sh
tab is the
default
delimiter
callNumberFactory.sh reads the fields in the SQL output file
Code walk-through pg 10 of 17
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 35 WRLC & George Washington University
# Set the background color of each row.
if [ "$rowprint" == "0" ]; then
rowcolor=FFFFFF; rowprint=1;
else
rowcolor=E4DFE6; rowprint=0;
fi
# Generate HTML tags around the retrieved data
NEWROW="<TR BGCOLOR=#"$rowcolor" valign=TOP><TD grp="$td2">
&nbsp; &nbsp; &nbsp; &nbsp; "
CALLNUMBER="<A HREF="http://"$myOPAC"/cgi-bin/Pwebrecon.cgi?BBID=
"$td3"">"$td1"</A></TD>";
TITLE="<TD>"$td4"</TD>";
AUTHOR="<TD>"$td5" </TD>";
PUBLISHER="<TD>"$td6"</TD></TR>";
#
# Append each generated HTML line to the output file
echo $NEWROW $CALLNUMBER $TITLE $AUTHOR $PUBLISHER >> callnumberFactory.out
done
callNumberFactory.sh
callNumberFactory.sh outputs HTML with field values
Code walk-through pg 11 of 17
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 36 WRLC & George Washington University
callNumberSectionFactory.sh
callNumberSectionFactory.sh prints headings and inserts relevant lines
from callnumberFactory.out after the heading.
callNumberSectionFactory.sh generates callnumbersectionFactory.out
Now the output will look like this:
Code walk-through pg 12 of 17
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 37 WRLC & George Washington University
lcguideFactory.sh
lcguideFactory.sh generates lcguideFactory.out
The RSS pages generated by this script are the .xml files in the rss directory
The RSS icon displayed on the page is feed.png
rsspageFactory.sh and makeRSS.pl generate multiple .xml files
Code walk-through pg 13 of 17
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 38 WRLC & George Washington University
authorSectionFactory.sh & titleSectionFactory.sh
authorSectionFactory.sh generates authorsectionFactory.out
titleSectionFactory.sh generates titlesectionFactory.out
Code walk-through pg 14 of 17
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 39 WRLC & George Washington University
webPageMergeFactory.sh
WEB=webpagemergeFactory.out
echo ''> $WEB
# Static HTML text page header with date stamp
cat pageHeader.template >> $WEB
cat lcguideHeaderpt1.template >> $WEB
date >> $WEB
cat lcguideHeaderpt2.template >> $WEB
cat lcguideFactory.out >> $WEB
# call number section
cat callnumbersectionFactory.out >> $WEB
# Heading for the author section
cat authorsectionHeader.template >> $WEB
webPageMergeFactory.sh generates webpagemergeFactory.out
Continues
next page…
Code walk-through pg 15 of 17
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 40 WRLC & George Washington University
# Rows of titles by author
cat authorsectionFactory.out >> $WEB
#
# Heading for the title section
cat titlesectionHeader.template >> $WEB
#
# Rows of titles
cat titlesectionFactory.out >> $WEB
#
# Static HTML text footer
cat pagefooterFactory.out >> $WEB
#
cp $WEB $HOME/public_html/newlibrarybooks.html
#
webPageMergeFactory.sh
pageHeader.template
lcguideHeaderpt1.out
lcguideHeaderpt2.out
lcguideFactory.out
authorsectionHeader.template
callnumbersectionFactory.out
authorsectionFactory.out
titlesectionHeader.template
titlesectionFactory.out
pagefooterFactory.out
Sections of newlibrarybooks.html
Code walk-through pg 16 of 17
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 41 WRLC & George Washington University
The XML files for RSS pages are saved in the directory named “rss”.
There is one file per LC Class heading.
RSS files
newlibrarybooksB.xml
newlibrarybooksC.xml
newlibrarybooksD.xml
newlibrarybooksH.xml
.
.
.
newlibrarybooksR.xml
newlibrarybooksT.xml
/rss
Code walk-through pg 17 of 17
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 42 WRLC & George Washington University
The last steps are publishing the HTML and RSS files
1. Copy $HOME/public_html/newlibrarybooks.html to the directory
where your web server will display the page. (Copy rssnb.png too)
2. Copy the directory rss, and the .xml files it contains, to a directory
named rss located under the directory where you have placed
newlibrarybooks.html
• At GWU we perform the above steps with commands placed at
the end of the webpagemergeFactory.sh file
Publish the files
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 43 WRLC & George Washington University
You may want to customize further
• Add steps to the end of webPageMergeFactory.sh
that copy the files to your web directory
• Customize the page header template with your
own library branding
• You may trigger the process automatically
with a cron task.
• Edit the SQL template for your own needs.
• If you prefer CSS formatting, convert the script from
HTML <table> to CSS <div> statements
From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages.
ExLibris ELUNA 2012 Salt Lake City, UT 44 WRLC & George Washington University
QUESTIONS
In this presentation you learned how to:
• install SQL*Plus on Linux
• download GWU’s new books scripts
• edit GWU’s scripts
We hope you can adapt these scripts
for use at your own library.
Questions?

Mais conteúdo relacionado

Mais procurados

Elastic{ON} 2016 Review - 김종민 님
Elastic{ON} 2016 Review - 김종민 님Elastic{ON} 2016 Review - 김종민 님
Elastic{ON} 2016 Review - 김종민 님NAVER D2
 
Open Source Logging and Monitoring Tools
Open Source Logging and Monitoring ToolsOpen Source Logging and Monitoring Tools
Open Source Logging and Monitoring ToolsPhase2
 
Scala Frameworks for Web Application 2016
Scala Frameworks for Web Application 2016Scala Frameworks for Web Application 2016
Scala Frameworks for Web Application 2016takezoe
 
Elastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & KibanaElastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & KibanaSpringPeople
 
A gentle intro of Apache zeppelin
A gentle intro of Apache zeppelinA gentle intro of Apache zeppelin
A gentle intro of Apache zeppelinAhyoung Ryu
 
Integrate ManifoldCF with Solr
Integrate ManifoldCF with SolrIntegrate ManifoldCF with Solr
Integrate ManifoldCF with Solrfrancelabs
 
Dcm#8 elastic search
Dcm#8  elastic searchDcm#8  elastic search
Dcm#8 elastic searchIvan Wallarm
 
Shipping & Visualize Your Data With ELK
Shipping  & Visualize Your Data With ELKShipping  & Visualize Your Data With ELK
Shipping & Visualize Your Data With ELKAdam Chen
 
ELK, a real case study
ELK,  a real case studyELK,  a real case study
ELK, a real case studyPaolo Tonin
 
Apache zeppelin, the missing component for the big data ecosystem
Apache zeppelin, the missing component for the big data ecosystemApache zeppelin, the missing component for the big data ecosystem
Apache zeppelin, the missing component for the big data ecosystemDuyhai Doan
 
Take a Groovy REST
Take a Groovy RESTTake a Groovy REST
Take a Groovy RESTRestlet
 
Seven perilous pitfalls to avoid with Java | DevNation Tech Talk
Seven perilous pitfalls to avoid with Java | DevNation Tech TalkSeven perilous pitfalls to avoid with Java | DevNation Tech Talk
Seven perilous pitfalls to avoid with Java | DevNation Tech TalkRed Hat Developers
 
Coding with Riak (from Velocity 2015)
Coding with Riak (from Velocity 2015)Coding with Riak (from Velocity 2015)
Coding with Riak (from Velocity 2015)Basho Technologies
 
How To Write Middleware In Ruby
How To Write Middleware In RubyHow To Write Middleware In Ruby
How To Write Middleware In RubySATOSHI TAGOMORI
 
OSMC 2013 | Log- und Eventmanagement by Bernd Erk
OSMC 2013 |  Log- und Eventmanagement by Bernd ErkOSMC 2013 |  Log- und Eventmanagement by Bernd Erk
OSMC 2013 | Log- und Eventmanagement by Bernd ErkNETWAYS
 
Real-time data analysis using ELK
Real-time data analysis using ELKReal-time data analysis using ELK
Real-time data analysis using ELKJettro Coenradie
 
Oak, the architecture of Apache Jackrabbit 3
Oak, the architecture of Apache Jackrabbit 3Oak, the architecture of Apache Jackrabbit 3
Oak, the architecture of Apache Jackrabbit 3Jukka Zitting
 
Apache Sling - Distributed Eventing, Discovery, and Jobs (adaptTo 2013)
Apache Sling - Distributed Eventing, Discovery, and Jobs (adaptTo 2013)Apache Sling - Distributed Eventing, Discovery, and Jobs (adaptTo 2013)
Apache Sling - Distributed Eventing, Discovery, and Jobs (adaptTo 2013)Carsten Ziegeler
 

Mais procurados (20)

Elastic{ON} 2016 Review - 김종민 님
Elastic{ON} 2016 Review - 김종민 님Elastic{ON} 2016 Review - 김종민 님
Elastic{ON} 2016 Review - 김종민 님
 
Open Source Logging and Monitoring Tools
Open Source Logging and Monitoring ToolsOpen Source Logging and Monitoring Tools
Open Source Logging and Monitoring Tools
 
Scala Frameworks for Web Application 2016
Scala Frameworks for Web Application 2016Scala Frameworks for Web Application 2016
Scala Frameworks for Web Application 2016
 
Elastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & KibanaElastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & Kibana
 
A gentle intro of Apache zeppelin
A gentle intro of Apache zeppelinA gentle intro of Apache zeppelin
A gentle intro of Apache zeppelin
 
Integrate ManifoldCF with Solr
Integrate ManifoldCF with SolrIntegrate ManifoldCF with Solr
Integrate ManifoldCF with Solr
 
Dcm#8 elastic search
Dcm#8  elastic searchDcm#8  elastic search
Dcm#8 elastic search
 
Shipping & Visualize Your Data With ELK
Shipping  & Visualize Your Data With ELKShipping  & Visualize Your Data With ELK
Shipping & Visualize Your Data With ELK
 
ELK, a real case study
ELK,  a real case studyELK,  a real case study
ELK, a real case study
 
Os riak1-pdf
Os riak1-pdfOs riak1-pdf
Os riak1-pdf
 
Apache zeppelin, the missing component for the big data ecosystem
Apache zeppelin, the missing component for the big data ecosystemApache zeppelin, the missing component for the big data ecosystem
Apache zeppelin, the missing component for the big data ecosystem
 
Full Stack Scala
Full Stack ScalaFull Stack Scala
Full Stack Scala
 
Take a Groovy REST
Take a Groovy RESTTake a Groovy REST
Take a Groovy REST
 
Seven perilous pitfalls to avoid with Java | DevNation Tech Talk
Seven perilous pitfalls to avoid with Java | DevNation Tech TalkSeven perilous pitfalls to avoid with Java | DevNation Tech Talk
Seven perilous pitfalls to avoid with Java | DevNation Tech Talk
 
Coding with Riak (from Velocity 2015)
Coding with Riak (from Velocity 2015)Coding with Riak (from Velocity 2015)
Coding with Riak (from Velocity 2015)
 
How To Write Middleware In Ruby
How To Write Middleware In RubyHow To Write Middleware In Ruby
How To Write Middleware In Ruby
 
OSMC 2013 | Log- und Eventmanagement by Bernd Erk
OSMC 2013 |  Log- und Eventmanagement by Bernd ErkOSMC 2013 |  Log- und Eventmanagement by Bernd Erk
OSMC 2013 | Log- und Eventmanagement by Bernd Erk
 
Real-time data analysis using ELK
Real-time data analysis using ELKReal-time data analysis using ELK
Real-time data analysis using ELK
 
Oak, the architecture of Apache Jackrabbit 3
Oak, the architecture of Apache Jackrabbit 3Oak, the architecture of Apache Jackrabbit 3
Oak, the architecture of Apache Jackrabbit 3
 
Apache Sling - Distributed Eventing, Discovery, and Jobs (adaptTo 2013)
Apache Sling - Distributed Eventing, Discovery, and Jobs (adaptTo 2013)Apache Sling - Distributed Eventing, Discovery, and Jobs (adaptTo 2013)
Apache Sling - Distributed Eventing, Discovery, and Jobs (adaptTo 2013)
 

Semelhante a Cummingsdceluna2012

Python And The MySQL X DevAPI - PyCaribbean 2019
Python And The MySQL X DevAPI - PyCaribbean 2019Python And The MySQL X DevAPI - PyCaribbean 2019
Python And The MySQL X DevAPI - PyCaribbean 2019Dave Stokes
 
Introduction to Apache Roller
Introduction to Apache RollerIntroduction to Apache Roller
Introduction to Apache RollerMatt Raible
 
Usage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxUsage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxWilliam Lee
 
DataDrivenMtl 20170906 - SQL Server 2017 on Linux
DataDrivenMtl 20170906 - SQL Server 2017 on LinuxDataDrivenMtl 20170906 - SQL Server 2017 on Linux
DataDrivenMtl 20170906 - SQL Server 2017 on LinuxMichael Albo, MSc IT, MBA
 
Ultimate Free SQL Server Toolkit
Ultimate Free SQL Server ToolkitUltimate Free SQL Server Toolkit
Ultimate Free SQL Server ToolkitKevin Kline
 
Learn Electron for Web Developers
Learn Electron for Web DevelopersLearn Electron for Web Developers
Learn Electron for Web DevelopersKyle Cearley
 
Oracle WebLogic Server 12c with Docker
Oracle WebLogic Server 12c with DockerOracle WebLogic Server 12c with Docker
Oracle WebLogic Server 12c with DockerGuatemala User Group
 
RethinkDB - the open-source database for the realtime web
RethinkDB - the open-source database for the realtime webRethinkDB - the open-source database for the realtime web
RethinkDB - the open-source database for the realtime webAlex Ivanov
 
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!Hi! Ho! Hi! Ho! SQL Server on Linux We Go!
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!SolarWinds
 
configuring+oracle+rds+with+glasfish+server
configuring+oracle+rds+with+glasfish+serverconfiguring+oracle+rds+with+glasfish+server
configuring+oracle+rds+with+glasfish+serverhunghtc83
 
UDF/UDAF: the extensibility framework for KSQL (Hojjat Jafapour, Confluent) K...
UDF/UDAF: the extensibility framework for KSQL (Hojjat Jafapour, Confluent) K...UDF/UDAF: the extensibility framework for KSQL (Hojjat Jafapour, Confluent) K...
UDF/UDAF: the extensibility framework for KSQL (Hojjat Jafapour, Confluent) K...confluent
 
Deploying and Operating KSQL
Deploying and Operating KSQLDeploying and Operating KSQL
Deploying and Operating KSQLconfluent
 
Oracle WebLogic Server_OL7_Sovann
Oracle WebLogic Server_OL7_SovannOracle WebLogic Server_OL7_Sovann
Oracle WebLogic Server_OL7_SovannVoeurng Sovann
 
Tackle Containerization Advisor (TCA) for Legacy Applications
Tackle Containerization Advisor (TCA) for Legacy ApplicationsTackle Containerization Advisor (TCA) for Legacy Applications
Tackle Containerization Advisor (TCA) for Legacy ApplicationsKonveyor Community
 
58615764 net-and-j2 ee-web-services
58615764 net-and-j2 ee-web-services58615764 net-and-j2 ee-web-services
58615764 net-and-j2 ee-web-serviceshomeworkping3
 
AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - Custom Application Develo...
AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - Custom Application Develo...AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - Custom Application Develo...
AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - Custom Application Develo...Lucas Jellema
 

Semelhante a Cummingsdceluna2012 (20)

Python And The MySQL X DevAPI - PyCaribbean 2019
Python And The MySQL X DevAPI - PyCaribbean 2019Python And The MySQL X DevAPI - PyCaribbean 2019
Python And The MySQL X DevAPI - PyCaribbean 2019
 
Introduction to Apache Roller
Introduction to Apache RollerIntroduction to Apache Roller
Introduction to Apache Roller
 
Usage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxUsage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on Linux
 
DataDrivenMtl 20170906 - SQL Server 2017 on Linux
DataDrivenMtl 20170906 - SQL Server 2017 on LinuxDataDrivenMtl 20170906 - SQL Server 2017 on Linux
DataDrivenMtl 20170906 - SQL Server 2017 on Linux
 
Ultimate Free SQL Server Toolkit
Ultimate Free SQL Server ToolkitUltimate Free SQL Server Toolkit
Ultimate Free SQL Server Toolkit
 
Linq To XML Overview
Linq To XML OverviewLinq To XML Overview
Linq To XML Overview
 
Learn Electron for Web Developers
Learn Electron for Web DevelopersLearn Electron for Web Developers
Learn Electron for Web Developers
 
NoSQL Introduction
NoSQL IntroductionNoSQL Introduction
NoSQL Introduction
 
NoSQL Introduction
NoSQL IntroductionNoSQL Introduction
NoSQL Introduction
 
Oracle WebLogic Server 12c with Docker
Oracle WebLogic Server 12c with DockerOracle WebLogic Server 12c with Docker
Oracle WebLogic Server 12c with Docker
 
RethinkDB - the open-source database for the realtime web
RethinkDB - the open-source database for the realtime webRethinkDB - the open-source database for the realtime web
RethinkDB - the open-source database for the realtime web
 
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!Hi! Ho! Hi! Ho! SQL Server on Linux We Go!
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!
 
configuring+oracle+rds+with+glasfish+server
configuring+oracle+rds+with+glasfish+serverconfiguring+oracle+rds+with+glasfish+server
configuring+oracle+rds+with+glasfish+server
 
UDF/UDAF: the extensibility framework for KSQL (Hojjat Jafapour, Confluent) K...
UDF/UDAF: the extensibility framework for KSQL (Hojjat Jafapour, Confluent) K...UDF/UDAF: the extensibility framework for KSQL (Hojjat Jafapour, Confluent) K...
UDF/UDAF: the extensibility framework for KSQL (Hojjat Jafapour, Confluent) K...
 
Deploying and Operating KSQL
Deploying and Operating KSQLDeploying and Operating KSQL
Deploying and Operating KSQL
 
Oracle WebLogic Server_OL7_Sovann
Oracle WebLogic Server_OL7_SovannOracle WebLogic Server_OL7_Sovann
Oracle WebLogic Server_OL7_Sovann
 
Tackle Containerization Advisor (TCA) for Legacy Applications
Tackle Containerization Advisor (TCA) for Legacy ApplicationsTackle Containerization Advisor (TCA) for Legacy Applications
Tackle Containerization Advisor (TCA) for Legacy Applications
 
58615764 net-and-j2 ee-web-services
58615764 net-and-j2 ee-web-services58615764 net-and-j2 ee-web-services
58615764 net-and-j2 ee-web-services
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...
 
AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - Custom Application Develo...
AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - Custom Application Develo...AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - Custom Application Develo...
AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - Custom Application Develo...
 

Mais de Michael Cummings

General introduction to APIs
General introduction to APIsGeneral introduction to APIs
General introduction to APIsMichael Cummings
 
Archivists toolkit SQL - a tutorial
Archivists toolkit SQL - a tutorialArchivists toolkit SQL - a tutorial
Archivists toolkit SQL - a tutorialMichael Cummings
 
Enhancing a library OPAC with linked data
Enhancing a library OPAC with linked dataEnhancing a library OPAC with linked data
Enhancing a library OPAC with linked dataMichael Cummings
 
Emerging technologies in academic libraries
Emerging technologies in academic librariesEmerging technologies in academic libraries
Emerging technologies in academic librariesMichael Cummings
 
ELUNA 2015 Data Visualization
ELUNA 2015 Data VisualizationELUNA 2015 Data Visualization
ELUNA 2015 Data VisualizationMichael Cummings
 
Data Visualization: Analyzing your library data
Data Visualization: Analyzing your library dataData Visualization: Analyzing your library data
Data Visualization: Analyzing your library dataMichael Cummings
 
ELUNA2013:Providing Voyager catalog data in a custom, open source web applica...
ELUNA2013:Providing Voyager catalog data in a custom, open source web applica...ELUNA2013:Providing Voyager catalog data in a custom, open source web applica...
ELUNA2013:Providing Voyager catalog data in a custom, open source web applica...Michael Cummings
 

Mais de Michael Cummings (9)

General introduction to APIs
General introduction to APIsGeneral introduction to APIs
General introduction to APIs
 
Archivists toolkit SQL - a tutorial
Archivists toolkit SQL - a tutorialArchivists toolkit SQL - a tutorial
Archivists toolkit SQL - a tutorial
 
Enhancing a library OPAC with linked data
Enhancing a library OPAC with linked dataEnhancing a library OPAC with linked data
Enhancing a library OPAC with linked data
 
Linked data for Libraries
Linked data for LibrariesLinked data for Libraries
Linked data for Libraries
 
Voyager : Query Basic
Voyager : Query BasicVoyager : Query Basic
Voyager : Query Basic
 
Emerging technologies in academic libraries
Emerging technologies in academic librariesEmerging technologies in academic libraries
Emerging technologies in academic libraries
 
ELUNA 2015 Data Visualization
ELUNA 2015 Data VisualizationELUNA 2015 Data Visualization
ELUNA 2015 Data Visualization
 
Data Visualization: Analyzing your library data
Data Visualization: Analyzing your library dataData Visualization: Analyzing your library data
Data Visualization: Analyzing your library data
 
ELUNA2013:Providing Voyager catalog data in a custom, open source web applica...
ELUNA2013:Providing Voyager catalog data in a custom, open source web applica...ELUNA2013:Providing Voyager catalog data in a custom, open source web applica...
ELUNA2013:Providing Voyager catalog data in a custom, open source web applica...
 

Último

MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 

Último (20)

MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 

Cummingsdceluna2012

  • 1. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 1 WRLC & George Washington University Michael Cummings The George Washington University James O. Austin Washington Research Library Consortium From Voyager to your website Using Linux Shell scripts and Oracle SQL*Plus to generate web pages ELUNA 2012 Salt Lake City, UT
  • 2. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 2 WRLC & George Washington University • About WRLC and GWU • WRLC services / reports • ExLibris MS Access reports • Oracle SQL*Plus • GWU New Books List • Steps to creating the List • Setup at Your Library Install SQL*Plus on Linux Get the newbooks scripts Code Walk Through • Questions? Agenda Agenda
  • 3. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 3 WRLC & George Washington University Georgetown University American University Catholic University Gallaudet University About WRLC and GWU Voyager 8 9.6 million bibliographic records 10.5 million holdings 5.8 million items
  • 4. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 4 WRLC & George Washington University “Canned Reports” WRLC provides technical services, including reports
  • 5. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 5 WRLC & George Washington University Microsoft Access reports from ExLibris are often utilized Reports.mdb
  • 6. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 6 WRLC & George Washington University Linux Alternative to MS Access: Oracle SQL*Plus (for Linux)
  • 7. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 7 WRLC & George Washington University George Washington University Libraries New Books List one example
  • 8. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 8 WRLC & George Washington University George Washington University Libraries New Books List Updated weekly
  • 9. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 9 WRLC & George Washington University George Washington University Libraries New Books List Call Number Guide
  • 10. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 10 WRLC & George Washington University George Washington University Libraries New Books List RSS Menu
  • 11. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 11 WRLC & George Washington University George Washington University Libraries New Books List RSS feed
  • 12. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 12 WRLC & George Washington University George Washington University New Titles, Media another example
  • 13. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 13 WRLC & George Washington University George Washington University New Titles, Media
  • 14. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 14 WRLC & George Washington University Steps to creating the New Book Shelf web page Pick and Scan
  • 15. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 15 WRLC & George Washington University <1> Connect to the web server via SSH. Oracle SQL*Plus Shell / Perl you could use a cron task instead Shell scripts and SQL*Plus <2> Run the newbookshelf shell script. Steps to creating the New Book Shelf web page
  • 16. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 16 WRLC & George Washington University Setup at your library
  • 17. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 17 WRLC & George Washington University Install SQL*Plus on Linux • These instructions have been validated using Ubuntu 10.04 LTS in both i686 and x64 desktop and server editions. • In order to download files from Oracle, you will need to register for a free account at Oracle.com • We presume in these instructions that you are using the BASH shell. • The person performing the setup needs root user sudo rights, or root account. Assumptions
  • 18. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 18 WRLC & George Washington University Install SQL*Plus on Linux Get files from Oracle • To obtain the required installable packages, navigate to http://www.oracle.com/technetwork/indexes/downloads/index.html Instant Client Package - Basic Instant Client Package - SQL*Plus • Scroll down to the Database category and choose Instant Client. • Choose the appropriate Operating System. • Check the box indicating you accept the licensing agreement. • Download the two client packages listed below in .rpm format. We recommend 10.2.0.4 • Transfer the two files to the Linux server if you downloaded them somewhere else first.
  • 19. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 19 WRLC & George Washington University Install SQL*Plus on Linux Install files from Oracle The next steps are completed in a terminal window. Convert the .rpm packages to .deb to install them in Ubuntu. Do this by using an application called 'alien'. If it is not already installed, you can do so by typing: sudo apt-get install alien Next, navigate to where you saved the .rpm packages and type: sudo alien -k oracle-instantclient*.rpm The .deb packages are ready to be installed. Do so by typing: sudo dpkg -i oracle-instantclient*basic*.deb sudo dpkg -i oracle-instantclient*sqlplus*.deb
  • 20. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 20 WRLC & George Washington University Install SQL*Plus on Linux The library files are installed but we must create an environment variables called LD_LIBRARY_PATH and SQLPATH in order for SQL*Plus to locate them. We'll do this by typing: gedit ~/.bashrc and pasting into it: export LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.4/client64/lib export SQLPATH=/usr/lib/oracle/10.2.0.4/client64/lib Note: The path to ../10.2.0.4/client64/lib will be different depending on which version of SQL*Plus you installed and which architecture your platform runs on. Change '10.2.0.4' and 'client64' part of the path accordingly. If you are installing on a server platform use vi or nano instead of gedit. We need to fix one more dependency, so do: sudo apt-get install libaio1 You may now go ahead and delete the .rpm files downloaded and subsequent .deb that were created. Install files from Oracle
  • 21. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 21 WRLC & George Washington University Oracle SQL*Plus is now installed and configured. Create a blank tnsnames.ora file in your home directory by typing: touch ~/tnsnames.ora Create an environment variable so SQL*Plus can reference this tnsnames.ora file we created. Type: gedit ~/.bashrc and paste into it: export TNS_ADMIN=~ Logout of your account and then log back in to apply the changes to your shell. Note: use sqlplus or sqlplus64 as appropriate and change your USERNAME, PASSWORD, HOSTNAME, PORT and SID as applicable. You can test your installation by typing on one line: sqlplus USERNAME/PASSWORD@'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)( HOST=HOSTNAME)(PORT=1521)))(CONNECT_DATA=(SID=VGER)))‘ Install SQL*Plus on Linux
  • 22. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 22 WRLC & George Washington University You can put the appropriate information in your tnsnames.ora file using the following as a template: IDENTIFIER = (DESCRIPTION = (ADDRESS = (PROTOCOL= TCP)(Host=HOSTNAME)(Port= 1521)) (CONNECT_DATA = (SID = VGER)) ) You will then be able to connect with the following command: sqlplus USERNAME/PASSWORD@IDENTIFIER Install SQL*Plus on Linux
  • 23. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 23 WRLC & George Washington University Download the files from https://github.com/cummingsm/VoyagerELUNA2012 Get the newbooks scripts, install instructions, this slide file
  • 24. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 24 WRLC & George Washington University pageHeader.template lcguideHeaderpt1.out lcguideHeaderpt2.out lcguideFactory.out authorsectionHeader.template callnumbersectionFactory.out authorsectionFactory.out titlesectionHeader.template titlesectionFactory.out pagefooterFactory.out Sections of newlibrarybooks.html The completed web page is a combination of several sections, some are boilerplate templates, others are rows of information output produced by the script having parsed and reformatted the SQL results. • Page header • The LC Call Number and RSS guide • List sorted by Call Number • List sorted by Author • List sorted by Title • Page footer We also generate separate RSS pages.
  • 25. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 25 WRLC & George Washington University newbookshelf.sh This Shell script calls the other shell and Perl scripts, and the SQLplus query. (Snippet shown on next slide) sqlplusQuery.sh Reads several parameters from the configuration file config.cnf (Oracle username, password, port, host, etc) and generates tempQuery.sh. It saves a SQL statement in newbook.sql. Then it runs tempQuery.sh which saves output in a tab-delimited file named tbl_newbooklocation.tab config.cnf This is the local configuration setting file. Example: ORACLEPORT=1521 You must edit it. Code walk-through pg 1 of 17
  • 26. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 26 WRLC & George Washington University log=/tmp/newlibrarybooks.log echo "newbookshelf.sh " > $log date >> $log # run the SQLPlus query echo "calling sqlplusQuery.sh" >> $log sh sqlplusQuery.sh; echo -n ':::::::::: Processing the new libray books query output :'; # echo 'Step 1: calling doPrelim.sh to save previous file' >> $log sh doPrelim.sh echo -n ':' echo 'Step 2: calling sortCallNumbers.sh (and sortLC.pl) ' >> $log sh sortCallNumbers.sh; . . s n i p . echo 'DONE!' echo 'Copy newlibrarybooks.html file to web site directory; copy /rss directory and files to a directory below the one containing newlibrarybooks.html.' newbookshelf.shCode walk-through pg 2 of 17 User runs this script. newbookshelf.sh calls the other scripts and creates the log file.
  • 27. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 27 WRLC & George Washington University # ORACLEUSER =`grep ORACLEUSER config.cnf | cut -f2 -d'='` ORACLEPWD =`grep ORACLEPWD config.cnf | cut -f2 -d'='` ORACLEHOST =`grep ORACLEHOST config.cnf | cut -f2 -d'='` ORACLEPORT =`grep ORACLEPORT config.cnf | cut -f2 -d'='` ORACLESID =`grep ORACLESID config.cnf | cut -f2 -d'='` ORACLEPATH =`grep ORACLEPATH config.cnf | cut -f2 -d'='` myTEMPLOC =`grep TEMPLOC config.cnf | cut -f2 -d'='` # LD_LIBRARY_PATH=$ORACLEPATH SQLPATH=$ORACLEPATH # # Generate the complete sql file by merging templates with values from the config file # cat sqlplus_newbooktop.template > newbook.sql echo "item.temp_location='$myTEMPLOC'" >> newbook.sql cat sqlplus_newbookbottom.template >> newbook.sql sqlplusQuery.shCode walk-through pg 3 of 17 Read config file. Make SQL from template. sqlplusQuery.sh generates the SQL command and query statement
  • 28. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 28 WRLC & George Washington University # Output commands,parameters to shell script cmdstring_exec=$SQLPATH/sqlplus cmdstring_acct=$ORACLEUSER/$ORACLEPWD@ cmdstring_desc="'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP) (HOST=$ORACLEHOST)(PORT=$ORACLEPORT)))(CONNECT_DATA=(SID=$ORACLESID)))'" cmdstring_file="< newbook.sql" echo 'LD_LIBRARY_PATH='$ORACLEPATH > tempQuery.sh echo 'SQL_PATH='$ORACLEPATH >> tempQuery.sh echo 'export LD_LIBRARY_PATH' >> tempQuery.sh echo 'export SQLPATH' >> tempQuery.sh echo $cmdstring_exec $cmdstring_acct$cmdstring_desc $cmdstring_file >> tempQuery.sh # # run the script # sh tempQuery.sh sqlplusQuery.sh Generate a command line; run it sqlplusQuery.sh executes the query Code walk-through pg 4 of 17
  • 29. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 29 WRLC & George Washington University set ECHO OFF set COLSEP ' ' set LINESIZE 3000 set PAGESIZE 500 set WRAP OFF set HEADING OFF set FEEDBACK OFF set SCAN OFF set ESCAPE column callnum Format A30 column callnumgroup Format A1 column title Format A255 column bib Format 99999999 SPOOL tbl_newbooklocation.tab http://ss64.com/ora/syntax-sqlplus-set.html SQL*PLUS set statements Optional formatting newbook.sql Code walk-through pg 5 of 17
  • 30. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 30 WRLC & George Washington University select bib_vw.call_no as callnum, bib_vw.call_no as callnumgroup, bib_item.bib_id as bib, bib_text.title, bib_text.author || '&nbsp;' as author_td, publisher || ' ' || pub_place || ' ' || publisher_date as pub from bib_vw, bib_item, bib_text, item SQL Query Author always has the string &nbsp; Code walk-through pg 6 of 17
  • 31. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 31 WRLC & George Washington University SQL Query where item.temp_location='$myTEMPLOC' and bib_vw.bib_id=bib_text.bib_id and bib_text.bib_id=bib_item.bib_id and bib_item.item_id=item.item_id and bib_vw.call_no NOT LIKE 'GW%' and …etc bib_vw.call_no NOT LIKE '9%' and bib_vw.call_no is not NULL order by bib_vw.call_no / SPOOL OFF We filter certain callnums Temp loc from the config file Code walk-through pg 7 of 17
  • 32. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 32 WRLC & George Washington University sortCallNumbers.sh Removes the query statement from the query output and then passes the output to a Perl script (sortLC.pl) for better sorting by LC Class call number. Result is sortedfile.tab callNumberFactory.sh This script and others with “Factory” in the name produce a file with snippets of HTML code. Using awk, read sortedfile.tab and generate the HTML section listing the titles sorted by call number. doPrelim.sh Removes problem characters from tbl_newbooklocation.tab Saves a backup copy of the previous html and sql output files Code walk-through pg 8 of 17
  • 33. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 33 WRLC & George Washington University callNumberFactory.sh generates callnumberFactory.out callnumberFactory.out contains rows for an HTML table. The lines will look like this in a browser: callNumberFactory.shCode walk-through pg 9 of 17
  • 34. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 34 WRLC & George Washington University # Initialize flag to indicate if a row was printed. # This flag determines whether to print a shaded row or not rowprint=0; # max=`wc -l sortedfile.tab | cut -c1-3` for ((i=1; i<=$max; i++)) do # # Grab one line of data from the file and save it temporarily in a file # awk NR==$i sortedfile.tab> htmlfactory.tmp # Get contents of fields from the temporary file into table data elements td1=`cat htmlfactory.tmp | cut -f1` td2=`cat htmlfactory.tmp | cut -f2` td3=`cat htmlfactory.tmp | cut -f3` td4=`cat htmlfactory.tmp | cut -f4` td5=`cat htmlfactory.tmp | cut -f5` td6=`cat htmlfactory.tmp | cut -f6` callNumberFactory.sh tab is the default delimiter callNumberFactory.sh reads the fields in the SQL output file Code walk-through pg 10 of 17
  • 35. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 35 WRLC & George Washington University # Set the background color of each row. if [ "$rowprint" == "0" ]; then rowcolor=FFFFFF; rowprint=1; else rowcolor=E4DFE6; rowprint=0; fi # Generate HTML tags around the retrieved data NEWROW="<TR BGCOLOR=#"$rowcolor" valign=TOP><TD grp="$td2"> &nbsp; &nbsp; &nbsp; &nbsp; " CALLNUMBER="<A HREF="http://"$myOPAC"/cgi-bin/Pwebrecon.cgi?BBID= "$td3"">"$td1"</A></TD>"; TITLE="<TD>"$td4"</TD>"; AUTHOR="<TD>"$td5" </TD>"; PUBLISHER="<TD>"$td6"</TD></TR>"; # # Append each generated HTML line to the output file echo $NEWROW $CALLNUMBER $TITLE $AUTHOR $PUBLISHER >> callnumberFactory.out done callNumberFactory.sh callNumberFactory.sh outputs HTML with field values Code walk-through pg 11 of 17
  • 36. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 36 WRLC & George Washington University callNumberSectionFactory.sh callNumberSectionFactory.sh prints headings and inserts relevant lines from callnumberFactory.out after the heading. callNumberSectionFactory.sh generates callnumbersectionFactory.out Now the output will look like this: Code walk-through pg 12 of 17
  • 37. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 37 WRLC & George Washington University lcguideFactory.sh lcguideFactory.sh generates lcguideFactory.out The RSS pages generated by this script are the .xml files in the rss directory The RSS icon displayed on the page is feed.png rsspageFactory.sh and makeRSS.pl generate multiple .xml files Code walk-through pg 13 of 17
  • 38. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 38 WRLC & George Washington University authorSectionFactory.sh & titleSectionFactory.sh authorSectionFactory.sh generates authorsectionFactory.out titleSectionFactory.sh generates titlesectionFactory.out Code walk-through pg 14 of 17
  • 39. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 39 WRLC & George Washington University webPageMergeFactory.sh WEB=webpagemergeFactory.out echo ''> $WEB # Static HTML text page header with date stamp cat pageHeader.template >> $WEB cat lcguideHeaderpt1.template >> $WEB date >> $WEB cat lcguideHeaderpt2.template >> $WEB cat lcguideFactory.out >> $WEB # call number section cat callnumbersectionFactory.out >> $WEB # Heading for the author section cat authorsectionHeader.template >> $WEB webPageMergeFactory.sh generates webpagemergeFactory.out Continues next page… Code walk-through pg 15 of 17
  • 40. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 40 WRLC & George Washington University # Rows of titles by author cat authorsectionFactory.out >> $WEB # # Heading for the title section cat titlesectionHeader.template >> $WEB # # Rows of titles cat titlesectionFactory.out >> $WEB # # Static HTML text footer cat pagefooterFactory.out >> $WEB # cp $WEB $HOME/public_html/newlibrarybooks.html # webPageMergeFactory.sh pageHeader.template lcguideHeaderpt1.out lcguideHeaderpt2.out lcguideFactory.out authorsectionHeader.template callnumbersectionFactory.out authorsectionFactory.out titlesectionHeader.template titlesectionFactory.out pagefooterFactory.out Sections of newlibrarybooks.html Code walk-through pg 16 of 17
  • 41. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 41 WRLC & George Washington University The XML files for RSS pages are saved in the directory named “rss”. There is one file per LC Class heading. RSS files newlibrarybooksB.xml newlibrarybooksC.xml newlibrarybooksD.xml newlibrarybooksH.xml . . . newlibrarybooksR.xml newlibrarybooksT.xml /rss Code walk-through pg 17 of 17
  • 42. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 42 WRLC & George Washington University The last steps are publishing the HTML and RSS files 1. Copy $HOME/public_html/newlibrarybooks.html to the directory where your web server will display the page. (Copy rssnb.png too) 2. Copy the directory rss, and the .xml files it contains, to a directory named rss located under the directory where you have placed newlibrarybooks.html • At GWU we perform the above steps with commands placed at the end of the webpagemergeFactory.sh file Publish the files
  • 43. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 43 WRLC & George Washington University You may want to customize further • Add steps to the end of webPageMergeFactory.sh that copy the files to your web directory • Customize the page header template with your own library branding • You may trigger the process automatically with a cron task. • Edit the SQL template for your own needs. • If you prefer CSS formatting, convert the script from HTML <table> to CSS <div> statements
  • 44. From Voyager to your website: Using Linux Shell scripts and Oracle SQL*Plus to generate web pages. ExLibris ELUNA 2012 Salt Lake City, UT 44 WRLC & George Washington University QUESTIONS In this presentation you learned how to: • install SQL*Plus on Linux • download GWU’s new books scripts • edit GWU’s scripts We hope you can adapt these scripts for use at your own library. Questions?