Editing Personnel Database/Processing/How To

From PCSAR

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Current revision Your text
Line 1: Line 1:
-
==How to process the personnel database==
+
==How to process the membership database==
Processing the database requires UNIX scripts, which I ([[Brett Wuth]]) keep
Processing the database requires UNIX scripts, which I ([[Brett Wuth]]) keep
on the PCSAR virtual machine.
on the PCSAR virtual machine.
Line 11: Line 11:
=== Pending edits ===
=== Pending edits ===
-
Check my personal copy of the call-out list to see any marked-up changes that I've noted
+
Check my marked up copy of the call out list to see any changes
-
may be necessary.
+
that may be necessary.
 +
 
=== Extract and validate ===
=== Extract and validate ===
{{rbw|as used}}
{{rbw|as used}}
-
to do
+
to do:
* validate upon edit rather than wait for process
* validate upon edit rather than wait for process
-
** (reverified after 2015-07 damage) enable PCSARBot to receive email on watched pages
+
** validate Activities upon edit
-
*** configure exim to receive e-mail locally
+
*** ''(done)'' create script to just validate Activities page
-
*** login as PCSARBot
+
**** ''(done)'' create calling script ~/sar/pc/membership/bin/wiki-membership-activities-validate
-
*** change e-mail address to bot@pcsar.castrov.cuug.ab.ca
+
*** save errors to wiki
-
*** confirm new address
+
**** update [[Activities/Report/wiki-membership-activities-validate]]
-
*** enable e-mail options for
+
***** (done) create generic script that updates a report page from stdin: ~/bin/mediawiki-report-post
-
**** E-mail me when a page I'm watching is changed
+
***** '''(next)''' modify wiki-membership-activities-validate to report "no errors found"
-
**** E-mail me also for minor edits of pages
+
***** modify wiki-membership-activities-validate to update [[Activities/Report/wiki-membership-activities-validate]]
-
** (reverified after 2015-07 damage) validate Activities upon edit
+
*** automatically run script when Activities page modified
-
*** Add [[Activities]] to PCSARBot's watchlist
+
** validate each Membership Record upon edit
-
*** uses .procmailrc
+
-
*** uses script ~bot/sar/pc/membership/bin/wiki-membership-activities-validate to update [[Activities/Report/wiki-membership-activities-validate]]
+
-
*** amend script to output errors with contextual lines
+
-
** validate each Personnel 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 "{{member|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 ({{member|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:'' <code><nowiki>* [[pagename]]: script</nowiki></code>
+
-
******* ''with possible duplicates of pagename, specifying different scripts
+
-
****** (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
+
-
****** '''(next)''' create mechanism to dispatch scripts based on email of page that changed; <code>wiki-watch-scripts-dispatch</code>
+
-
******* ''consider security of other person editing page
+
-
******* (done) create tool to determine revision number of page: ~/bin/wiki-page-revision-number-get
+
-
******* (done) 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 script wiki-page-editor that produces editor of latest or specified revision
+
-
******* (done) create tool to get the synced content and last editor of a page: <code>wiki-page-get-with-editor</code>
+
-
******** (done) create <code>wiki-page-get</code>
+
-
******** ''consider usage pattern get-latest-revision-number; get-page; verify lasest-revision-number unchanged
+
-
******* validate against whitelist of last editors
+
-
******** '''design choice:''' use single hardcoded name: 'Brett Wuth'
+
-
******** consider: can whitelist be stored on wiki page? That page would need to be validated itself. Could be rooted in a single hardcoded name.
+
-
******** shortcut: validate against single hardcoded name until need list
+
-
****** 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
+
-
*** distribute previously created tools through git
+
-
*** 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
+
{{rbw|as used}} to do: optimize for speed (last run 7min)
{{rbw|as used}} to do: optimize for speed (last run 7min)
Line 92: Line 43:
=== Process ===
=== Process ===
-
xslt <personnel-database.xml lib/Applicants.xsl | xslt lib/Name.xsl
 
-
 
-
 
* <big>'''make sure current ssh-agent authority is extended'''</big>
* <big>'''make sure current ssh-agent authority is extended'''</big>
ssh -AX wuth@localhost
ssh -AX wuth@localhost
Line 100: Line 48:
database-process
database-process
-
* prints copies for myself
+
* print copy for myself
-
* sends personnel list (names only) to [[Members:Protocols/Shell H2S/Global Training|Global Training for validation of H2S Alive course registration.]]
+
-
 
+
-
Manually check the Unicode in reports:
+
-
* [[Members:Membership Database/PCSAR]]
+
-
* [[Members:Membership Database/Combined Members]]
+
-
* [[Members:Call Out/List]]
+
-
==== D4H export ====
+
-
2021-03-21 D4H has changed SSL protocols. Requires upgraded version python.
+
-
 
+
-
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
+
-
 
+
-
==== Rave export ====
+
-
wuth@pcsar:~/sar/pc/membership$ call-out-list-xml >tmp/call-out-list.xml
+
-
wuth@desk:~/wuth/pcremo/rave/rave-api-tools$ scp -p wuth@pcsar.castrov.cuug.ab.ca:sar/pc/membership/tmp/call-out-list.xml .
+
-
wuth@desk:~/wuth/pcremo/rave/rave-api-tools$ python3 -m sar
+
 +
rapid-notify-post
** sometimes fails at initial log in and has to be restarted
** sometimes fails at initial log in and has to be restarted
** takes ~65 minutes to run
** takes ~65 minutes to run
*** see {{subpage|Rapid Notify}}
*** see {{subpage|Rapid Notify}}
-
==== Continue ====
 
* To Do: {{rbw|as used}}
* To Do: {{rbw|as used}}
** additional policy checks
** additional policy checks
Line 158: Line 86:
=== sync wiki accounts ===
=== sync wiki accounts ===
-
* [http://iweb.castrov.cuug.ab.ca/mediawiki/index.php/Mediawiki#Syncing_user_list sync] the personnel list with the wiki user list
+
* [http://iweb.castrov.cuug.ab.ca/mediawiki/index.php/Mediawiki#Syncing_user_list sync] the membership list with the wiki user list
** rename/merge Charlene/Charleen Bruder
** rename/merge Charlene/Charleen Bruder
** Extract list of users currently with "Member" status
** Extract list of users currently with "Member" status
*** http://pcsar.dyndns.org:8080/mediawiki/index.php?title=Special:Listusers&limit=500&group=Members
*** http://pcsar.dyndns.org:8080/mediawiki/index.php?title=Special:Listusers&limit=500&group=Members
-
wuth@pcsar:~/sar/pc/membership$
+
=== H2S list ===
-
xslt lib/MembersOnly.xsl < personnel-database.xml | xslt lib/EMailPrimaryTxtWithNone.xsl >tmp/address-list
+
* Send membership list (names only) to [[Members:Protocols/Shell H2S/Global Training|Global Training for validation of H2S Alive course registration.]]
-
cat /home/wuth/sar/pc/membership/tmp/address-list | sed -e 's|\(.*\) <\(.*\)>|sudo /usr/local/bin/wiki-members-add "\1" "\2"|' | bash
+
-
 
+
h2s-training-list-email
-
will require manual manipulation to
+
-
 
+
-
'''To Do:
+
-
* '''(next)''' create tool to drop member of group
+
-
* rename existing user
+
-
 
+
-
see [http://iweb.castrov.cuug.ab.ca/mediawiki/index.php/Mediawiki#Syncing_user_list personal notes]
+
==Non-monthly processing==
==Non-monthly processing==
Line 226: Line 147:
--text follows this line--
--text follows this line--
Thanks for joining Pincher Creek SAR. Can you please check if I've correctly
Thanks for joining Pincher Creek SAR. Can you please check if I've correctly
-
copied your personnel record:
+
copied your membership record:
---cut---
---cut---

Please note that all contributions to PCSAR are considered to be released under the Attribution-Share Alike 3.0 Unported (see PCSAR:Copyrights for details). If you don't want your writing to be edited mercilessly and redistributed at will, then don't submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!


Cancel | Editing help (opens in new window)
Personal tools