home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.misc
- From: jim@nestmoi.rain.com (Jim Chorn)
- Subject: v36i021: jobs - misc.jobs Employment Search toolkit, Part02/02
- Message-ID: <1993Mar19.200623.9677@sparky.imd.sterling.com>
- X-Md4-Signature: ea28314bdd4b4fdbcfedf99e3308a443
- Date: Fri, 19 Mar 1993 20:06:23 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: jim@nestmoi.rain.com (Jim Chorn)
- Posting-number: Volume 36, Issue 21
- Archive-name: jobs/part02
- Environment: news, sh
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # Contents: Comments Help Readme install joblists
- # Wrapped by kent@sparky on Fri Mar 19 13:59:43 1993
- PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 2 (of 2)."'
- if test -f 'Comments' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Comments'\"
- else
- echo shar: Extracting \"'Comments'\" \(338 characters\)
- sed "s/^X//" >'Comments' <<'END_OF_FILE'
- X
- XThis job listing was provided by an automated tool which collect
- Xand organizes Usenet Articles from misc.jobs news groups, updated
- Xweekly.
- X
- XAny comments should be directed to jobs@nestmoi.rain.com via e-mail.
- X
- XThe usual disclaimers apply.... Good Hunting!
- X________________________________________________________________________________
- END_OF_FILE
- if test 338 -ne `wc -c <'Comments'`; then
- echo shar: \"'Comments'\" unpacked with wrong size!
- fi
- # end of 'Comments'
- fi
- if test -f 'Help' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Help'\"
- else
- echo shar: Extracting \"'Help'\" \(1373 characters\)
- sed "s/^X//" >'Help' <<'END_OF_FILE'
- X---------------------------------
- XAreas: A pattern to search for, case insensitive.
- XExtendedArea: A Subject line pattern case sensitive, auto-includes Areas.
- X These patterns group into the bulk of the first summary in the listing.
- X Area patterns which are not in the Subject line, group into the body of
- X the second Summary in the listing.
- XNeverSee: A pattern you *never* want to allow case *sensitive*
- XOtherDisregard: A pattern which is not in the ExtendedArea that will cause the
- X article to be removed from the second Summary in the listing.
- XDisregard: A special three field pattern which will cause articles to only be
- X summarized in the second Summary of the listing if 'WhoPat' is detected
- X in an article, the summary line presented is "SummaryPat' '".
- X This Summary is followed by Contact_info.
- XSpooledNewsDir: Top Level directory of the articles.
- XPostedGroups: A list of all news groups to be searched.
- X---------------------------------
- XTo insert a space into a pattern, use ^[ or <ESC>
- XThe single quote character is handled, all other sh special characters may
- X not be. In particular, the asterisk is not handled for Area
- X or ExtendedArea. Try using \\Char. There are up to three levels of
- X shell to be escaped so you may need six or more backslashs depending
- X on your version of sh.
- X-----Pattern Commands: A-Add D-Delete C-Clearall General: Q-Quit S-Show H-Help
- END_OF_FILE
- if test 1373 -ne `wc -c <'Help'`; then
- echo shar: \"'Help'\" unpacked with wrong size!
- fi
- # end of 'Help'
- fi
- if test -f 'Readme' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Readme'\"
- else
- echo shar: Extracting \"'Readme'\" \(13475 characters\)
- sed "s/^X//" >'Readme' <<'END_OF_FILE'
- XCopyRight 1993 James Chorn All Rights Reserved.
- XThis work is wholely owned by James Chorn.
- XPermission is given to use and copy the tools described and included
- Xherein with the following proviso:
- XProviso: You will not litigate against James Chorn for misuse, destruction
- X of property informational or otherwise, and you give James Chorn
- X credit for producing these tools by always including this copyright
- X notice prominently in all copies and distributions.
- XNo Warrantee is implied or Expressed and this software is provided 'as is'.
- XJames Chorn will not be held accountable for any problem associated with the
- Xuse of this software.
- X
- XThis work was done in support of a support group which is locally organized
- Xby under-employed high tech workers here in Portland, OR.
- X
- XAdministrative Note:
- X The intent of the use of these tools is to provide people
- X which don't have access to the internet a way to receive
- X job information. Please limit using the E-mail feature to
- X people or groups which don't have access to the Internet
- X news services who will distribute the reports generated to
- X people seeking employment. Ask your system administrator.
- X This tool is not meant as a news reader replacement utility.
- X Every effort was made to make these tools passive in nature,
- X namely the use of rm is limited to temporary files.
- X
- XInternet job article report and maintenance tool.
- X Use of this tool requires an Internet net news feed.
- X
- XInstallation:
- X ./install [/installdir]
- X
- XFeatures:
- X Provides a way to collect and summarize Internet job related articles.
- X Is customizable to capture job information for a local area(s).
- X Report style job listings that produce well organized article lists.
- X Flexible configuration, reconfiguration and setup.
- X Flexible and easy filtering of unwanted articles.
- X Easy summation of redundant information.
- X Reports can be printed or Emailed automatically via 'at' or 'cron'.
- X Customizably Final Comment feature allowing other admin info sharing.
- X 80 Column ASCII Report style suitable for laser printing.
- X Optional saving of past listings by simple creation of a directory.
- X Portable.
- X
- XNon-features:
- X It ain't fast ;-) Typical run times have been observed at
- X between 10 and 20 minutes depending on the number
- X of articles needed to be processed (some maybe longer).
- X Does not provide a news article feed. You must be receiving
- X net news in order to use this tool.
- X Does not provide a 'no' maintenance solution to article classification.
- X Does not provide an easy way to remove articles using multiple
- X word patterns which span lines. eg "I am\n seeking"
- X Does not currently provide a way to handle summarizing lines that
- X have no key's (See Disregard section).
- X
- XOperational comments:
- X I've been using this tool to send posts via email to the High Tech
- X Resources Group in Portland, OR (a local job hunting support group).
- X The person receiving the email simply prints it out and
- X brings it to the group meetings each week. Some editing has been
- X done on the reports during trial runs but this is next to nothing
- X compared with the time I was spending doing these same functions
- X manually. The editing time is virtually non-existent with this
- X release so it's time to share. I should also note that most of the
- X editing usually concerns bogus postings which get captured
- X in the last part of the report. Removing these postings was a matter
- X of saving paper and reading time. I currently monitor the reports
- X by running two passes. The first pass sends me 90% of the report
- X that will be sent the next day. I look it over and if needed add
- X filtering information to the setup file which generates the report
- X that goes to the HTRG. I see the report sunday night and early monday
- X morning the reports are sent out. So far, the tools works pretty well
- X and doesn't miss many articles. Typically, the articles that are
- X dropped, have terse location information, but if your desperate,
- X just put some very general Area in like OR as you will get every
- X job article with the word 'or' in it. Another for instance, in the
- X setup.newyork file, notice that NY is not part of Area. That's
- X because 'any' matches 'ny'. So it's an ExtendedArea, but I'm
- X getting ahead of myself. You will need to check on the postings
- X and adjust the filters which means a 2 minute scan of a posting
- X and maybe using maintjobs to add a filter on some of the articles
- X that you don't want to see. Just remember that the more Areas
- X you have to search for, the longer it will take.
- X
- X To save previous listings simply make the directory LastSaved
- X in the listing directory and your cron job will do it automatically.
- X See the joblists script for details.
- X
- X The setup files contain character sequences '^' '[' which is normal.
- X
- X This tool was built in a 4.3BSD Unix environment and may
- X not function in other environments without some modifications.
- X Namely, these scripts will probably require modification
- X for SysV to handle grep case insensitivity (pre V.4) and probably
- X others. I would appreciate feedback on these. See listjobs
- X shell script.
- X
- XThis directory includes:
- X listjobs [setupfile] - A shell script to collect job info.
- X maintjobs setupfile - A shell script to maintain setup files.
- X joblists - A cron script for auto run of listjobs.
- X setup.default - The default setup file.
- X setup.example - A second example of a setup file.
- X setup.newyork - A functional NY/NJ setup file.
- X Comments - Initial Final Comment file.
- X Help - Initial Help file, customizable to site.
- X install [/installdir] - An install script, default /usr/local/jobs.
- X Readme - This file.
- X
- XRequired Unix(tm) commands:
- X /bin/date /bin/ed sh test chmod awk
- X mv rm echo cat touch sort
- X cmp tr sed grep egrep uniq
- X Non-standard commands:
- X fmt head tail wc
- X
- XAssumptions:
- X Comments in all setup and final comment files consist of an
- X occurrence of '#' at the beginning of a line and go until
- X the end of that line.
- X
- X All scripts assume to be located in /usr/local/jobs. You
- X must explicitly modify a variable in each script to install
- X them in another place.
- X
- X All scripts assume that the news is collected in a /usr/spool/news
- X subdirectory. You must explicitly modify a variable in each
- X script to have them look in another place for the top level
- X news directory. The scripts are flexible enough to handle
- X most subdirectory variations but you may need to use more
- X than one setup file.
- X
- XAbstractions and other comments on the comments:
- X Most of the concept is very straight forward, however, the way
- X it is presented could be improved. I'm open to suggestions on
- X constructive modifications of the comments in the scripts and
- X setup files.
- X
- XWhat's the What and how it works:
- X There are eight major shell variables that need to come from
- X somewhere. These are:
- X SpooledNewsDir
- X PostedGroups
- X Area
- X ExtendedArea
- X NeverTrust
- X OtherDisregard
- X Disregard
- X Ext
- X
- X The maintjobs tool maintains these variables in a interactive session.
- X The listjobs tool uses the setup script to bring in these variables
- X which cause it to modify builtin defaults.
- X The joblists tool is described below.
- X
- X Overview: The joblists script is invoked by cron at some hour. joblists
- X invokes listjobs script which produces one or several reports.
- X joblists then emails or prints the reports out and exit's.
- X joblists also compresses and saves old reports as needed.
- X Messages and tracting information is captured in the files
- X 'messages' and 'Sent' in the jobs directory.
- X
- X listjobs when invoked brings in it's setup file variables
- X and applies these variables to all articles found in the
- X news directories. All of this work is done in /tmp and
- X is removed on error or completion. A report is built and
- X then copied into the 'jobs' directory /usr/local/jobs.
- X A file called 'Date' in the jobs directory is updated with
- X the prefix of the report name generated. The file 'Comments'
- X which lives in the jobs directory will be concatenated to
- X the report. If this file does not exist the default Final
- X Comment will be used. If a Comment file has an extension
- X (eg Comments.default), this file will be used instead.
- X
- X maintjobs is used to maintain the variables and test them
- X so that special characters that won't work in the scripts
- X are detected before using them. This is so the listjobs
- X script doesn't blow up needlessly and not produce a report
- X when invoked by joblists by cron. maintjobs makes a copy
- X of the lines in the setup file modified and always leaves
- X it in the setup file so after numerous uses you will probably
- X want to hand edit the setup file to remove all of the copies.
- X The copies will never hurt operation of listjobs. maintjobs
- X will also in some cases correct bad setup files. This was
- X mainly done for script maintenance and ease of upgrade.
- X
- X Report Format:
- X Summary of Local Area posts.
- X All Local Area posts.
- X Summary of Disregards (See definition below).
- X Summary of Other Local area posts.
- X All Other Local Area posts.
- X Final Comment Information.
- X
- X
- X Variable Definitions:
- X
- X SpooledNewsDir -is the top most directory that contains targeted
- X job articles. This is *not* where the articles are
- X kept. This is were the directories of the articles
- X are kept.
- X PostedGroups -is a list of the directories which contain job
- X articles.
- X eg. misc.jobs.offered is simply 'offered'
- X Area -is a list of words which describe your focus area.
- X For example "Portland Oregon" will capture all
- X articles which contain the word Portland OR the
- X word Oregon, case insensitive.
- X ExtendedArea -is a list superset of case sensitive words which
- X might appear in subject lines captured from looking
- X for the 'Area' words. This helps classify articles,
- X especially those using proper net-etiquette.
- X NeverTrust -is a list of words which identify articles that
- X are bogus or inappropriate for the report. Any
- X article which contains a word in this list will
- X *NOT* appear in the report, so use this sparingly.
- X An email address or unique word from the subject
- X line is best used here.
- X OtherDisregard -is a list of words that get filtered out of the
- X 'other' section of the report. It's similar to
- X NeverTrust, removes articles from the report.
- X It's main use is for posters that are consistent
- X with their articles. For example, some local recruiters
- X post for jobs and *always* identify the city the
- X job is located. They also post for jobs in other
- X parts of the world. This variable allows you to
- X filter out these other-parts-of-the-world jobs
- X and rely on the poster's subject line. Occasionally
- X you will need to modify this variable.
- X Disregard -is a three piece variable which allows you to
- X remove redundant information from the report. You
- X may have someone that provides you with the
- X information from another source, like presentations...
- X Anyway, this evolved from our group having a person
- X recruiting in the group as well as posting news
- X articles. We wanted the news articles summarized
- X and we wanted to spread his phone number around
- X when he got active. It works like this:
- X firm summary contact
- X where firm is a word that will always
- X identify this persons articles.
- X where summary is a word that will always
- X select a position summary line
- X (eg. Subject, Position, Description...)
- X This will capture all lines with this
- X key, however it does not have the
- X ability to handle titles which appear
- X with in a banner eg ***\n title\n ---
- X where contact is a single word used for contact
- X information. See a setup file for
- X more uses, it's better described there.
- X Ext -is a single word which identifies the file name
- X extension used for the report to be generated.
- X Multiple reports dictate multiple setup files although
- X you will probably find that now more than two or three
- X are needed for your area.
- X
- XThe default setup file variables are set as follows:
- X
- X SpooledNewsDir="/usr/spool/news/misc/jobs"
- X PostedGroups="contract/* offered/* offered/entry/*"
- X Area="Portland Hillsboro Beaverton Aloha Oregon"
- X ExtendedArea="${Area} OR"
- X NeverTrust=none
- X OtherDisregard="none"
- X Disregard=none
- X Ext=""
- X
- XFor more convoluted information read the comments in the setup files and
- Xwhen you get frustrated go to the source which is fairly well commented.
- X
- Xcomments to: jobs@nestmoi.rain.com
- XPlease include system type and configuration,
- X (eg. Sun 360, Sun OS; HP700, HPunix; ...)
- X
- XSun is a trademark of Sun Microsystems.
- XHP is a trademark of Hewlitt Packered Computer Systems.
- XUnix is a trademark of AT&T Bell Labs.
- X4.3BSD is a trademark of the University of California, Berkeley, CA.
- XInternet is probably a trademark of the U.S. Government.
- X
- XIf I've forgotten anyone or made mistakes with the trademark
- Xinformation above, I apologize.
- XDisclaimers: All examples are just examples, no references are made to
- X known companies intentionally to harm those companies. An effort
- X has been made to remove company names from the examples but I
- X ain't perfect. If you have a problem with any of the words drop
- X me a note and I'll alter them or give credit appropriately.
- X All tools used which are commented out are usage examples which are
- X meant to highlight typical usage (namely my own) and are not
- X meant as tools required to get the job done.
- X
- XOffer: If you would like to hire me, I may be available. Drop me an E-mail note
- X and let's talk!
- END_OF_FILE
- if test 13475 -ne `wc -c <'Readme'`; then
- echo shar: \"'Readme'\" unpacked with wrong size!
- fi
- # end of 'Readme'
- fi
- if test -f 'install' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'install'\"
- else
- echo shar: Extracting \"'install'\" \(1824 characters\)
- sed "s/^X//" >'install' <<'END_OF_FILE'
- X#!/bin/sh
- XPATH=/bin:/usr/bin:/usr/ucb
- Xexport PATH
- X# CopyRight 1993 James Chorn All Rights Reserved.
- X# This work is wholely owned by James Chorn.
- X# Permission is given to use and copy the tools described and included
- X# herein with the following proviso:
- X# Proviso: You will not litigate against James Chorn for misuse, destruction
- X# of property informational or otherwise, and you give James Chorn
- X# credit for producing these tools by always including this copyright
- X# notice prominently in all copies and distributions.
- X# No Warrantee is implied or Expressed and this software is provided 'as is'.
- X# James Chorn will not be held accountable for any problem associated with the
- X# use of this software.
- X#
- X# Usage: install [installdir]
- X#
- Xif [ $# = 0 ]; then
- X jobs="/usr/local/jobs"
- X setdir=no
- Xelse
- X jobs="$1"
- X setdir=yes
- Xfi
- X
- Xif [ ! -d "/${jobs}" ]; then
- X echo "Can't create /${jobs}, make this directory and reinvoke."
- X exit 1
- Xfi
- X
- Xif touch ${jobs}/listjobs; then
- X echo "Installing files in ${jobs}"
- X rm -f ${jobs}/listjobs
- Xelse
- X echo "Can't access /${jobs}, set permission for $jobs and reinvoke."
- X exit 1
- Xfi
- X
- Xfor i in joblists listjobs maintjobs Comments Help setup.default
- Xdo
- X if [ -f ${jobs}/$i ]; then
- X echo ${jobs}/$i exists, not installed;
- X exit 1;
- X fi
- X cp -p ./$i ${jobs}/$i
- Xdone
- X
- Xtrap "rm -f /tmp/jobsins.$$ ; echo Caught Signal ; exit 1" \
- X 1 2 3 4 5 6 7 8 9 10 12 13 14 15
- X
- Xif [ $setdir = yes ]; then
- X for i in joblists listjobs maintjobs
- X do
- X echo "Modifing ${jobs}/$i to install path $jobs"
- X sed -e "s,/usr/local/jobs,$jobs," /${jobs}/$i >/tmp/jobins.$$
- X cp /tmp/jobins.$$ ${jobs}/$i
- X rm -f /tmp/jobins.$$
- X done
- X echo "Modifing ${jobs}/joblists to install user name ${USER=root}"
- X sed -e "s,root,$USER," /${jobs}/joblists >/tmp/jobins.$$
- X cp /tmp/jobins.$$ ${jobs}/joblists
- X rm -f /tmp/jobins.$$
- Xfi
- Xexit 0
- END_OF_FILE
- if test 1824 -ne `wc -c <'install'`; then
- echo shar: \"'install'\" unpacked with wrong size!
- fi
- chmod +x 'install'
- # end of 'install'
- fi
- if test -f 'joblists' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'joblists'\"
- else
- echo shar: Extracting \"'joblists'\" \(2727 characters\)
- sed "s/^X//" >'joblists' <<'END_OF_FILE'
- X#!/bin/sh
- XPATH=/bin:/usr/bin:/usr/ucb
- Xexport PATH
- X# CopyRight 1993 James Chorn All Rights Reserved.
- X# This work is wholely owned by James Chorn.
- X# Permission is given to use and copy the tools described and included
- X# herein with the following proviso:
- X# Proviso: You will not litigate against James Chorn for misuse, destruction
- X# of property informational or otherwise, and you give James Chorn
- X# credit for producing these tools by always including this copyright
- X# notice prominently in all copies and distributions.
- X# No Warrantee is implied or Expressed and this software is provided 'as is'.
- X# James Chorn will not be held accountable for any problem associated with the
- X# use of this software.
- X#
- X# csh Usage: joblists >>& /usr/local/jobs/messages
- X#
- X# Sample cron script which creates job listings (is actually in use)...
- X#
- X# Sample crontab entry
- X#
- X# 00 4 * * 1 jim /usr/local/jobs/joblists >>/usr/local/jobs/messages 2>&1
- X#
- X# Sample maintenance of old listings
- X#
- Xjobs="/usr/local/jobs" # Install dir.
- Xif [ -s ${jobs}/Last -a -d ${jobs}/LastSaved ]; then
- X LastDate=`cat ${jobs}/Last` # Last is generated by listjobs
- X if [ " $LastDate" != " " ]; then # is paranoid? avoid compress *
- X OldList=${jobs}/${LastDate}
- X for oldfile in ${OldList}*
- X do
- X if [ -f $oldfile ]; then
- X compress $oldfile
- X if [ -f ${oldfile}.Z ]; then
- X mv -f ${oldfile}.Z \
- X ${jobs}/LastSaved
- X fi
- X fi
- X done
- X fi
- Xfi
- X#
- X# Create the Job listings / Do a Run...
- X# Note: Recommend you use the built-in defaults for a manual test run
- X# and then always make modifications to a setup file(s).
- X#
- X# /usr/local/jobs/listjobs & # Use all Defaults
- X${jobs}/listjobs ${jobs}/setup.default &
- X#${jobs}/listjobs ${jobs}/setup.example &
- X#${jobs}/listjobs ${jobs}/setup.newyork &
- Xwait
- X
- X# Sample autosend use, I have a job but my friends don't...
- X#
- X# Mail off the list to people offsite that will print and distribute.
- X#
- X# Note: It's wise to only send this to people that will distribute
- X# the listing to those that don't have computer access. Remember
- X# also that the listing produced could be quite large and you
- X# may have email bandwidth consideration.
- XDate=`cat ${jobs}/Last`
- XList=${jobs}/${Date} # Ext=.newyork in setup.newyork -> ${List}.newyork
- X
- Xfor user in root
- Xdo
- X cat ${List} | /usr/ucb/mail -s "Usenet Jobs $Date" $user
- X ( echo -n "Mailed $Date to $user " ; /bin/date ) >> ${jobs}/Sent
- Xdone
- X
- X# Print out current default listing fancy on a postscript printer
- X# using the header line as the page title.
- X#
- X#Header=`head -3 $List | tail -1`
- X#enscript -r2 -b"$Header" $List
- X
- X# Print out last listing using lpr
- X# using the header line as the page title.
- X#
- X#Header=`head -3 $List | tail -1`
- X#lpr -J "Job Listings" -T "$Header" ${List}.htrg
- END_OF_FILE
- if test 2727 -ne `wc -c <'joblists'`; then
- echo shar: \"'joblists'\" unpacked with wrong size!
- fi
- chmod +x 'joblists'
- # end of 'joblists'
- fi
- echo shar: End of archive 2 \(of 2\).
- cp /dev/null ark2isdone
- MISSING=""
- for I in 1 2 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked both archives.
- rm -f ark[1-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
- exit 0 # Just in case...
-