Personnel Database/Processing/How To

From PCSAR

(Difference between revisions)
Jump to: navigation, search
(Process)
(Extract and validate)
Line 61: Line 61:
******* (done) create tool to determine revision number of page: ~/bin/wiki-page-revision-number-get
******* (done) create tool to determine revision number of page: ~/bin/wiki-page-revision-number-get
******* ''consider usage pattern get-latest-revision-number; get-page; verify lastest-revision-number unchanged
******* ''consider usage pattern get-latest-revision-number; get-page; verify lastest-revision-number unchanged
-
******* '''(next)''' create tool to determine editor of revision of page
+
******* '''(next)''' create tool to determine editor of particular revision of page (not necessarily current revision)
******** (done) create tool <code>wiki-page-editors-list</code> that generates list of revision id's and editors
******** (done) create tool <code>wiki-page-editors-list</code> that generates list of revision id's and editors
******** create script wiki-page-editor that produces editor of latest or specified revision
******** create script wiki-page-editor that produces editor of latest or specified revision

Revision as of 02:00, 21 November 2017

Contents

How to process the membership database

Processing the database requires UNIX scripts, which I (Brett Wuth) keep on the PCSAR virtual machine.

Unless you understand UNIX, you're not likely to understand much of this. If you need to get someone else to do this, you'll need to find someone with UNIX or Linux shell skills.

The scripts check for changes in the database, so they keep a running record of the last changes they've seen.

Pending edits

Check my personal copy of the call-out list to see any marked-up changes that I've noted may be necessary.

Extract and validate

(review as used: Brett Wuth) to do

  • validate upon edit rather than wait for process
    • (reverified after 2015-07 damage) enable PCSARBot to receive email on watched pages
      • configure exim to receive e-mail locally
      • login as PCSARBot
      • change e-mail address to bot@pcsar.castrov.cuug.ab.ca
      • confirm new address
      • enable e-mail options for
        • E-mail me when a page I'm watching is changed
        • E-mail me also for minor edits of pages
    • (reverified after 2015-07 damage) validate Activities upon edit
    • validate each Membership Record upon edit
      • (reverified after 2015-07 damage) write script to validate just member passed
        • see ~bot/sar/pc/membership/bin/wiki-membership-member-validate
        • Use "Brett Wuth" as experiment
      • (reverified after 2015-07 damage) update all memrec pages to include validation report
        • define as part of memrec template
      • develop trigger on memrec changes
        • develop dispatch on changes to individual memrec or Activities
          • (recheck) create trial watch on my mem record (Brett Wuth)
            • (done) Add PCSARBot to "TrustedGuest" group
          • currently uses exact match on page name in .procmailrc
          • (done) verify changes to Brett Wuth's MemRec triggers report update
          • develop mechanism to register dispatch for page, what script to run
            • on wiki itself
            • advantage: inspectability: easy for others self, to see what is going on
            • disadvantage: more work
            • single page Members:PCSARBot/Watches
              • each line like: * [[pagename]]: script
              • with possible duplicates of pagename
            • (done) write scripts to enable/disable watch on a wiki page
              • (done) wiki-page-watch-enable
              • (done) wiki-page-watch-disable
            • (done) write scripts to add/remove watch scripts
              • (done) wiki-watch-script-add
              • (done) wiki-watch-script-remove
            • create mechanism to dispatch scripts based on email of page that changed
              • consider security of other person editing page
              • document how mvs handles edit conflicts
              • (done) create tool to determine revision number of page: ~/bin/wiki-page-revision-number-get
              • consider usage pattern get-latest-revision-number; get-page; verify lastest-revision-number unchanged
              • (next) create tool to determine editor of particular revision of page (not necessarily current revision)
                • (done) create tool wiki-page-editors-list that generates list of revision id's and editors
                • create script wiki-page-editor that produces editor of latest or specified revision
              • create mechanism to modify page only if its at a specific version
              • validate against whitelist of last editors
            • create mechanism to unwatch pages if email came in and no watch script registered
        • develop watch on memrec category
          • add new pages
          • delete removed pages
      • allow Members: page to transclude report from another Members: page
      • when Activities changes, reprocess all Members
        • only if no errors in Activities itself -- otherwise error would appear on each page
        • only file report if change -- otherwise many unrelated updates

(review as used: Brett Wuth) to do: optimize for speed (last run 7min)

as user "wuth"

cd ~/sar/pc/membership
wiki-extract


  • Reconcile

make any necessary changes.

Process

  • make sure current ssh-agent authority is extended
ssh -AX wuth@localhost
database-process


d4h-web-interface.py user:pcsard4hbot@pcsar.ca.d4h.org membersImport

may need to re-download database to get newly assigned D4HMemberIDs

wiki-extract
d4h-web-interface.py user:pcsard4hbot@pcsar.ca.d4h.org activitiesAttendanceImport
rapid-notify-post
    • sometimes fails at initial log in and has to be restarted
    • takes ~65 minutes to run
  • To Do: (review as used: Brett Wuth)
    • additional policy checks
      • write policy check for sar fund currency
        • Set type of existing Activities. See /[ssh/pcsar]/home/wuth/sar/pc/membership/lib/Membership.xsd ActivityCategoryType (done to 2012-01)
        • base on /[scp/pcsar]/home/wuth/sar/pc/membership/bin/policy-check-stale
          • see lib/SARFundStale.xsl
            • needs debugging
        • add to CVS
      • write policy check for voting member upgrade
      • write policy check for voting member currency
    • commonize elements of {bin,lib}/{call-out,first-call}


  • Personnel records: -- done by Adam now
lpr -Pofficejet8500 -o outputorder=reverse run/print-queue/*{recorder,SARCAR}*
  • Fax to Fire Dispatch in Lethbridge -- not done any more
first-call-list-fax


  • Print/Send the Fan-Out list -- no longer done
fan-out-list-send
  • Call Out List: -- done by Adam
    • for binder
    • for SARCAR
    • for overhead box at firehall
    • 3 copies

sync wiki accounts

wuth@pcsar:~/sar/pc/membership$
 xslt lib/MembersOnly.xsl < personnel-database.xml | xslt lib/EMailPrimaryTxtWithNone.xsl >tmp/address-list
 cat /home/wuth/sar/pc/membership/tmp/address-list | sed -e 's|\(.*\) <\(.*\)>|sudo /usr/local/bin/wiki-members-add "\1" "\2"|' | bash

will require manual manipulation to

To Do:

  • (next) create tool to drop member of group
  • rename existing user

see personal notes

Non-monthly processing

These are tasks that aren't done on a regular basis. Some of them haven't been done in long time and their instructions are now out of date.

copy to Brett's laptop

Because the remaining steps don't run on the PCSAR virtual machine yet, the file must be copied to Brett's laptop and run from there.

wuth@macbook:~/sar/pc/membership$ chmod 600 personnel-database.xml
wuth@macbook:~/sar/pc/membership$ scp -p wuth@pcsar:sar/pc/membership/personnel-database.xml .
wuth@macbook:~/sar/pc/membership$ chmod 400 personnel-database.xml
wuth@macbook:~/sar/pc/membership$ scp -p wuth@pcsar:sar/pc/membership/tmp/personnel-database.txt tmp
wuth@macbook:~/sar/pc/membership$ rm -r run
wuth@macbook:~/sar/pc/membership$ scp -pr wuth@pcsar:sar/pc/membership/run .                     

To prepare a list of addresses and phone numbers of all our members

This was required for a casino application.

 xslt lib/MembersOnly.xsl < personnel-database.xml |xslt lib/NamePhoneAddress.xsl >tmp/addresses.txt

To print blank Personnel Records

  • keep 10 copies at hand
 personnel-blank-print 10

To send call-out list via e-mail

  • Stop sending in September 2003
 call-out-list-email

Call-out list to executive.

  • verify doesn't send when no change:
  • Add note about any deletions
  • automate production of

To e-mail mailing labels

  • Does not require anymore
mailing-labels-email

Mailing Labels sent to Jackie.

To e-mail changes for Resource database

      • Stop doing October, 2003. Need another way to handle resource database
personnel-database-mail-resource-database

When new members join, or e-mail addresses filled in

To: Subject: Welcome 
--text follows this line--
Thanks for joining Pincher Creek SAR. Can you please check if I've correctly
copied your membership record:

---cut---
---cut---

Training sessions/meetings are the first Tuesday of every month,
usually starting at 19:00.

If you'd like to join in a club discussion and receive notices
via e-mail, please send a "subscribe" message to pcsar-discuss-request@castrov.cuug.ab.ca

Take Care,Brett Wuth wuth@acm.org
wuth@telusplanet.net bwuth@cuug.ab.ca Box 1251-U, Pincher Creek,
Alberta T0K 1W0, CANADA Tel:+1 403 627-2460 pgp-public-keys@uit.no
has mine; Print=E4F8EDEECBE01AD2FA3D8B2D94B1A292 What is the meaning of life?! Yes.

To print the participation dates

xslt <personnel-database.xml Activities.xsl | awk -v FS=":" {printf "%-24s:%-7s:%s\n", $1, $2, $3 } | mail -s "activity history" `MailRCAliasAddressGet "Bob Costa"` wuth
participation-report-make
  • Add any missing entries to partitipation-type.txt

Brett Wuth, 2006/07/15 09:35 MST (via web): Reformat the database after automatic translation using:

  xml-tidy "Training, Experience, Equipment, Notes" <personnel-database.xml >reformatted.xml
Personal tools