home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Exec 5 / CD_Magazyn_EXEC_nr_5.iso / Recent / util / rexx / Scion2html.lha / Scion2html.rexx next >
OS/2 REXX Batch file  |  2001-06-02  |  125KB  |  3,530 lines

  1. /* Harold H. Ipolyi © 11 June 1994 -> 2001
  2. =====README=====
  3. Short:    WWW browser HTML's from Scion Genealogy dbs's
  4. Uploader: ipolyi@ev1.net (Harold H. Ipolyi)
  5. Author:   Harold H. Ipolyi
  6. Type:     util/rexx
  7. LastRev:  2 Jun 2001
  8.  
  9. latest:   index window is now single column for easier perusing
  10. deltas:   Added "index" button, changed "¶" and "®" links to buttons
  11.  
  12. since version "15 Dec 1999": FRAMES
  13.                                                                        <PRE>
  14. _____________________________________________________________________________
  15.  
  16. URL:      http://ddw-rh.dyndns.org/~ipolyi/scion.html
  17. _____________________________________________________________________________
  18. _____________________________________________________________________________
  19.  
  20.  to INSTALL: just drag Scion2html.rexx & its ICON into REXX:
  21. _____________________________________________________________________________
  22.  
  23.  to RUN: first: load a Scion data base
  24.  
  25.          then: double click Scion2html.rexx icon
  26.  
  27.           or:  in an AmigaShell:
  28.                    rx REXX:Scion2html.rexx
  29.  
  30.           or:  Scion  "Settings"  menu item:  "Set Function Keys..."
  31.                  set one of the Function Keys to:
  32.                    rx REXX:Scion2html.rexx
  33.  
  34.           or:  I use the following AWeb execution commands:
  35.  <HR>
  36.  To remake the HTML Genealogy:
  37.  <A HREF="x-aweb:command/Sys:Scion/Scion Work:Genealogy/FamDB">Load</A> and,
  38.  <A HREF="x-aweb:command/C:rx REXX:Scion2html.rexx">convert</A> into HTML's;
  39.  then <A HREF="x-aweb:command/Sys:Miami/Miami">connect</A> and
  40.  <A HREF="x-aweb:command/Sys:AmFTP/AmFTP">upload</A> to on-line provider.
  41.  <HR>
  42. _____________________________________________________________________________
  43. _____________________________________________________________________________
  44.  
  45.  Scion Genealogist © Rob Akins (biz/dbase/Scion.lha) is comprehensive,
  46.  easy to use, and provides Arexx ports for extracting data.
  47. _____________________________________________________________________________
  48.  
  49.  Scion2html.rexx can repeatedly and painlessly recreate HTML files from
  50.  entries in Scion data bases for cross-platform viewing via Mosaic, etc.
  51.  
  52.  Scion2html.rexx can also create AmigaGuide style ".guide" hypertexts
  53. _____________________________________________________________________________
  54.  
  55.  GfxCon © Dirk Farin (gfx/conv/gfxcon.lha) is used to make Thumbnails
  56.  from Scion data base pictures as links to Picture Albums
  57. _____________________________________________________________________________
  58. _____________________________________________________________________________
  59.  
  60. Prerequisites:    Scion V 4.07+ © Rob Akins
  61.         ARexx (of course :)
  62.         rexxsupport.library    ( WB disk:libs     )
  63.         rexxarplib.library    ( aminet:util/rexx )
  64.         HTML/WWW browser (AMosaic, Mosaic, ... )
  65.  
  66.  
  67.      also:     (to incorporate and display in-line pictures)
  68.         GfxCon V1.7+ © Dirk Farin ( must be in: Sys:Tools)
  69.         Amiga OS 3.0+ for displaying picture datatypes
  70.  
  71. _____________________________________________________________________________
  72.  
  73.  NOTE: The directory suffix for the AmigaGuide files has changed from A to AG
  74.        Internal links prevent simple renaming of [....]A to [....]AG 
  75. _____________________________________________________________________________
  76.  
  77.  NOTE: To allow HTML customization of ( ¶ ) info files, i.e. P{IRN}.DBNAME
  78.        and F{IRN}.DBNAME files, Scion2html.rexx will now remove certain HTML
  79.        tags, <P></P><TT></TT></PRE><PRE>, when writing guide & text files.
  80. _____________________________________________________________________________
  81.  
  82.      PN{IRN}.DBNAME files are used to generate the ( ¶ ) info files.
  83.  
  84.      PICTURES from [P|F]P{IRN}.DBNAME are links to Picture Albums ( ® )
  85.  
  86.                   (please see PP & FP Notes later)
  87. _____________________________________________________________________________
  88.  
  89.                                     Tested:
  90.  
  91. |¯¯¯¯¯¯¯¯¯¯¯¯¯|    on Amiga3000 Kickstart v.37.175 Workbench v.38.35
  92. |    assume   |    &  Amiga3000 Kickstart v.40.68  Workbench v.40.42
  93. |  TradeMarks |    w/ Scion Version 3.06 & Mosaic1.2NoNet
  94. |      &      |    w/ Scion Version 3.13 & Mosaic1.3betaAmitcp
  95. |  CopyRights |    w/ Scion Version 4.07 & Mosaic2.0Prerelease
  96. |     as      | w/ Scion Version 5.07 & AWeb Version 3.1
  97. | appropriate |    HTML file compatibility tested on: 
  98. |_____________|    HotJava, Netscape (Sun), Netscape (Mac)
  99.  
  100.                            _________________________
  101.                           |                         |
  102.                           |    Bugs:     (eeeek!)   |
  103.   ________________________|_________________________|_________________________
  104.  |                                                                            |
  105.  | Scion2html.rexx only recognizes the first Scion ARexx port name: "SCIONGEN"|
  106.  | If additional copies of Scion are running concurrently, they are ignored.  |
  107.  |____________________________________________________________________________|
  108.  |                                                                            |
  109.  |     If a new Thumbnail format is selected, the user must manually edit     |
  110.  |       the Picture Album files to reflect the new Thumbnail suffixes.       |
  111.  |           _____________________________________________________            |
  112.  |          /      The reasoning behind this restriction is:      \           |
  113.  |         /¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\          |
  114.  |        /  The Picture Album files may have been  User  modified  \         |
  115.  |       ( and must therefore be protected against auto-regeneration )        |
  116.  |        ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯         |
  117.  |____________________________________________________________________________|
  118.  
  119. =====README=====
  120.  
  121. =====History=====
  122.  
  123. Release History:
  124.  
  125.  11 Jun 1994 · ScionToMosaic.rexx for ScionGenealogist V 3.06
  126.  
  127.  19 Jun 1994 · MakeDir(HTMLdir) fixed; extra comments processed.
  128.  
  129.  25 Jun 1994 · Fixed descenders; Women in List italicised
  130.              · updated for ScionGenealogist V 3.13
  131.  
  132.   3 Sep 1994 · Replaces occurrences of "<ScionIRN>" by NAMES from DB
  133.              ·   e.g. Replaces <101> by Iam Onehundredone, Jr.
  134.              · Added Family Info file processing; Ancestor trees
  135.              · Added descendant charts
  136.              · Women italicised; men boldface everywhere
  137.              · Added creation of a textual file "GenealogyOf..."
  138.  
  139.   1 Mar 1995 · cleaned up bugs in creation of textual files
  140.  
  141.   6 Jun 1995 · renamed ScionToMosaic to Scion2html
  142.              ·   (somehow it kept winding up in "music" on AmiNet)
  143.              · date format in "ancestors" section normalized
  144.              · images used as links to picture albums (see
  145.              ·  PP & FP Notes) and links to pictures
  146.              · GfxCon >V1.5 used for picture copying and reducing
  147.              · recoded for DOS/Windows restricted 8.3 file names
  148.  
  149.  26 Jun 1995 · A little comments cleanup after the last changes
  150.              · skip remaking of files when unnecessary
  151.              · another new wrinkle for one of the users:
  152.              ·     special file name prefixes ( GenPrefix )
  153.  
  154.   1 Jul 1995 · added graphics to Ancestors charts
  155.              · allow family picture album sans family info file
  156.              · Thumbnail size now user settable ( at line 3 )
  157.  
  158.   5 Jul 1995 · (more info) » ( ¶ )
  159.              · (family info) » ( ¶ )
  160.              · (Picture Album) » ( ® )
  161.              · (¶) (®) glyphs added to Ancestor, Descendant charts
  162.              · Thumbnail format {GIF|JPEG} now user settable
  163.              ·  ( suffix still .gif in all cases )
  164.  
  165.   1 Aug 1995 · updated for release with ScionGenealogist V 4.07
  166.              · set correct stack size (21000) for GfxCon
  167.              · JPEG now the default Thumbnail format
  168.              ·     (smaller files, no © problems, looks better)
  169.              · changing of configuration added
  170.              · configuration now saved in S:Scion2html.Config
  171.  
  172.  12 Aug 1995 · fix some bugs that creeped in with updated to Scion4.07
  173.              · handling of more of the new ScionV4.07 data fields
  174.              · using CheckForReplacement to create all anchors
  175.              · changed appearance of family & descendant charts
  176.              · configuration is displayed at startup
  177.  
  178.  24 Sep 1995 · ".guide" style hypertext generation added
  179.              ·  Guide picture VIEWER set to MultiView for OS => 3.0
  180.              · person information now in person.[array]
  181.              · initial settings now in flags.[array]
  182.              · verbose flag for extra progress reporting details
  183.              · bold flag for: male «boldface» & female «italic»
  184.              · removed undocumented buggy feature of replacing ocurrences
  185.              ·  of [ScionIRN] (now only replaces ocurrences of <ScionIRN>)
  186.              · fixed a GenPrefix init bug (couldn't reset back to null)
  187.  
  188.   1 Jan 1996 · changed "&" in front of MARRIAGE DATES to "x"
  189.              · Scion2html.Config moved from S: to ENVARC:
  190.              · Scion2html.Config now only stored when changed
  191.              · directory of ".guide" style files changed to [.....]AG
  192.              · runtime option - exclude details on living persons
  193.              ·      ( please use ? for death date when date not known )
  194.              · added textured background ( for IBrowse )
  195.              · no longer forcing all ( ¶ ) info files to <PRE><TT>
  196.              · added code to filter <TT> </TT> <PRE> </PRE> <P> </P>
  197.              ·                      HTML tags from guide & text info files.
  198.              · using INDEX for Guide files (instead of "List of People" )
  199.              · "?" then "t" creates "genealogytemplate.html"
  200.              · "?" then "r" view readme information
  201.              · "?" then "h" review the Release History
  202.              · "?" then "d" to change settings of default parameters
  203.  
  204.   3 Mar 1996 · fix null IRN bug
  205.  
  206.  14 Aug 1996 · fix libs test
  207.  
  208.  30 Jan 1997 · "List of Persons." changed to "Personae"
  209.              · default "Personae" in tables; link to "Personae sans tables"
  210.              ·   don't want tables? then:
  211.              ·       delete file GENEAFIL.htm and then
  212.              ·       rename file GENEAFIN.htm to file GENEAFIL.htm 
  213.  
  214.  30 Mar 1997 · Logic to prevent output for empty data base nodes
  215.  
  216.  20 Apr 1997 · bug fix: GENEAFIL.htm reference to GENEAFIn.htm was incorrect
  217.  
  218.   1 Jun 1997 · added link to my home page @ http://ipolyi@micron.net/~ipolyi
  219.              · fixed some html nits
  220.              · removed the Samms Genealogy - it is now (with others) at:
  221.              ·  URL: http://www.micron.net/~ipolyi/fic/FicGenealogies.html
  222.              · added "hints" section to menu items
  223.              · removed genealogytemplate - it is now at:
  224.              ·  URL: http://www.micron.net/~ipolyi/scion.html
  225.  
  226.  27 Jun 1998 · added an index.html to prevent direct viewing of []G directory
  227.              · removed non-tables version of Personae page
  228.              · pictures album extra images now in sub-diretory: img
  229.              ·  To satisfy a large demand (me & one other:) I have:
  230.              · added an INDEX - featuring pulldown firstnames
  231.  
  232.  11 Jul 1998 · began Ver 5+ handling ( guarded by test for Version > 5 )
  233.              · added Address & Telephone handling for preparer, pers, & fam
  234.              · added Attachments handling for pictures and notes
  235.              ·  NOTE: Attachments are given priority
  236.              · robots blocking - should have done this earlier!
  237.              · went back to preset of ( ¶ ) info files with <PRE><TT>
  238.              · added sound (Æ) files to .guide(s)
  239.              · added an INDEX for .guide(s)
  240.  
  241.  26 Jul 1998 · bug - moved Scion2html.Config to ENVARC: ( Scion change )
  242.  
  243.   5 Sep 1998 · added email tag processing for 
  244.              ·    "Extras"    menu item  "set address/phone... "
  245.              ·    "Settings"  menu item  "Preparer..."
  246.              ·  ( see HELP for "Address Requester" "telephone" )
  247.  
  248.  17 Oct 1998 · increased apparent loading speed of "INDEX" pages
  249.              · also cross-listing women in "INDEX" under their married names
  250.  
  251.   1 Nov 1998 · replacing null surnames and given names with "_._"
  252.              ·   ( guard against early process termination )
  253.              · surnames are now headings for INDEX page pulldown lists
  254.              · updated the ANCHORs hints
  255.  
  256.  29 Nov 1998 · Picture Album hints redone into a separate page
  257.              · fixed Family Picture Album link bug ( thanx to Dave Crawford )
  258.              · added META tags ( by request )
  259.              · back to " ///\" to show mating ( someone had problem with "&"
  260.              · fixed a picture xfer problem that crept in with Dave C. changes
  261.              · new: add Pictures to existing Picture Album(s)
  262.              · aminet structure change
  263.  
  264.  11 Mar 1999 · requested cleanup & Guide changes
  265.  
  266.  31 Oct 1999 · BURIALDATE has not previously been processed - corrected
  267.  
  268.  15 Dec 1999 · frames
  269.  
  270.   9 Jan 2000 · updated adresses to www.webpak.net/~ipolyi
  271.              · made some "GetLastName: PROCEDURE" changes
  272.  
  273.  27 Jan 2000 · "KEYWORDS" META tag change
  274.  
  275.  22 Aug 2000 · fix of a "add Pictures to existing Picture Album(s)" bug
  276.  
  277.  19 Oct 2000 · index window is now single column for easier perusing
  278.              · Added "index" button, changed "¶" and "®" links to buttons
  279.  
  280.   2 Jun 2001 · Web address and email changes to:
  281.              · http://ddw-rh.dyndns.org/~ipolyi/scion.html
  282.              · ipolyi@ev1.net
  283.  
  284.              · 
  285.  
  286. =====History=====
  287.  
  288. =====Future?=====
  289.  
  290.              · not sure yet what to do with sounds for HTML ...
  291.              ·   ( when an OPEN standard for all platforms comes along? )
  292.  
  293.              · controllabe depth of the ancestor and descendant charts
  294.              ·   ( time and storage saving measure )
  295.              ·   ( Ultimates, i.e. top or botton of line are exempt )
  296.              · 
  297.  
  298. =====Future?=====
  299.  
  300.  * 'rx Scion2html.rexx Normal' automagically [re]creates a .htm file for
  301.  * each person in your ScionGenealogist data base; following the TEMPLATE:
  302.  * http://ddw-rh.dyndns.org/~ipolyi/scion.html
  303.  
  304.  * In an HTML file (maybe HOME PAGE) put an anchor pointing to GenealogyFile:
  305.  * ( see the hint at the end of a NORMAL run or specify ANCHOR )
  306. _____________________________________________________________________________
  307.  
  308.  * NOTE: Attachments are given priority over P{N|P|S}{IRN}.DBNAME files.
  309.  
  310.  * The PN{IRN}.DBNAME files are used to generate the " ¶ " files.
  311.  
  312.  * Whenever the PN{IRN}.DBNAME is changed or replaced, the corresponding
  313.  * " ¶ " file will be updated if 'rx Scion2html.rexx {IRN}' is re-run.
  314.  
  315.  * PP & FP Notes: (personal & family pictures; picture albums " ® ")
  316.  * ScionGenealogist names pictures as;
  317.  *      PP{IRN}.DBNAME (personal) and FP{mFGRN}.DBNAME (family)
  318.  * {P|F}P{IRN|mFGRN}.DBNAME now used as pictures & links.
  319.  *    GfxCon is used to copy/reduce jpegs from {P|F}P{IRN|mFGRN}.DBNAME
  320.  *    reductions are anchors pointing to HTML's for pictures albums
  321.  *    in pictures albums are anchors pointing to pictures
  322.  *  picture albums will not be overwritten; they may be updated with
  323.  *    additional pictures; links to other pictures, etc.
  324.  
  325.  * Whenever picture {P|F}P{IRN|mFGRN}.DBNAME is changed or replaced,
  326.  *  the corresponding images will be updated
  327.  
  328.  * {P|F}P{IRN|mFGRN}.DBNAME may be any legal GfxCon input picture FORMAT:
  329.  * (ILBM,RGB8,PCX,BMP,RLE8,TIFF,Targa,LBM,RGBN,IMG,RLE4,GIF,JPEG,RGB-Raw)
  330. */
  331.  
  332. stonegif = "47494638376140004000F70000F3F3F3
  333. EEEEEEE9E9E9E3E3E3DCEDEDDDDDDDDCCBCBD8D8D8D2D2D2CBDCDCCCCCCCCBBA
  334. BAC6C6C6C1C1C1BACBCBBBBBBBB6B6B6AABABA52525252525252525252525252
  335. 5252525252525252525252525252525252525252525252525252525252525252
  336. 5252525252525252525252525252525252525252525252525252525252525252
  337. 5252525252525252525252525252525252525252525252525252525252525252
  338. 5252525252525252525252525252525252525252525252525252525252525252
  339. 5252525252525252525252525252525252525252525252525252525252525252
  340. 5252525252525252525252525252525252525252525252525252525252525252
  341. 5252525252525252525252525252525252525252525252525252525252525252
  342. 5252525252525252525252525252525252525252525252525252525252525252
  343. 5252525252525252525252525252525252525252525252525252525252525252
  344. 5252525252525252525252525252525252525252525252525252525252525252
  345. 5252525252525252525252525252525252525252525252525252525252525252
  346. 5252525252525252525252525252525252525252525252525252525252525252
  347. 5252525252525252525252525252525252525252525252525252525252525252
  348. 5252525252525252525252525252525252525252525252525252525252525252
  349. 5252525252525252525252525252525252525252525252525252525252525252
  350. 5252525252525252525252525252525252525252525252525252525252525252
  351. 5252525252525252525252525252525252525252525252525252525252525252
  352. 5252525252525252525252525252525252525252525252525252525252525252
  353. 5252525252525252525252525252525252525252525252525252525252525252
  354. 5252525252525252525252525252525252525252525252525252525252525252
  355. 5252525252525252525252525252525252525252525252525252525252525252
  356. 52525252525252525252525252525252525252525252525252525252522C0000
  357. 0000400040000008FF00152860201041810308183478F0A00183870F050A6480
  358. 40C10383080E14CCC8E080C6040A1C1608595141C285140B1C2C90D0A4C70303
  359. 062800A9D1E548060E122268D04081030507180C78E9D1E04804081204553060
  360. A4C98A1E0B34553950A24189211F10B4EAD166839D070E9AECE85001CBB06111
  361. 0C2028D5694D841A150E7C88546981AD081CAC44DAB162D2033D332235AB31E9
  362. D90881752654C8B3A144C60C12AC35C97260CBA34D4B1254AB37E448AD7E9F22
  363. F5D8712953820306875D58152AD8A13A59AA64709760D096028F56A45DF96BC6
  364. B8BFC3DE44F8C025CEDF093ADEF5E830F941DB0829060D0BB42452B507042470
  365. 8870A743B59433CEFFBCEBA0FBE6AB668186347BD66CC98145254A3DA095BA46
  366. DF0252833799182EDD83090DE5164B3A691414450FDD755D027ED996D07306F5
  367. 2457427009C0526A3521A5125F027D85D050FFE5D65D4C1A1190125000228098
  368. 54B82D05DC4F2D5DF7D260BFAD651060DD79A45476452DA6505F83CD64517E10
  369. 2150DC8D26813491784CF2755086417DD55F61722508128273952495427E21D5
  370. 13505B7924C06E41E5A45A77049265526B0EF584104B5A1126104C4FD2E55F01
  371. 5F0195134C045194540204CA961554522520800004C4A41E80083D3556471656
  372. B55197B4AD7923546385F46594A73DD6D15C031178DB01C9B917DA427E91F693
  373. 824FC2D4957C7E5EFF57D046DD75289D4F8EA607D4504021F4954A2C81949972
  374. 1A6586D56914C1775F7561293967450E2C7060466735F5DD4EE5C9FA185C4511
  375. 58D0410C9A2AC0440D70FB5058326D85A274A9652953A98DF225175C0C3EC453
  376. 5911EDC49697E57A34808707961B9A4E437D57D940007764A7851CF956508F4B
  377. E628D00076C92B138DF6F917EF6E1CD9465153938DE614B5570A36E39AC33AF0
  378. 556A1D31D8148CBC0909D476EC498791475A95BA5969D7A995D4538561376B57
  379. F676E8927A6C65CA51C48309E527C248C215647BDA56745059CFAEB9E6C7ADA5
  380. 955E652DB7F99B5A266ABBE99C9F32D8284B7DBDD493821909ACF07A7BB2BDA1
  381. 421B86C650A5FCA1FF4D9D7B78B13D71AA16951859D7147DB955662B9146D0D9
  382. 6A4A86D450A432F6C0C60D50DCD0553E7B4BD8AF4526C98063579DA8E157DB1D
  383. 2440587D42405B46A9B517D4918D56D7216966252BDFE630797929554C617853
  384. 9FA335E8D2573F3D508085091EE4C0C7818D74974B15C16663710DEC69A472B9
  385. FF97394902957757036C1B3419AF85E1E9E67D176118179834256040D3756E6E
  386. D6BF2391FF407932355715888291114F6E84A78C008066C9329EB22C3393DD28
  387. 88620D10005DD674A0AFF1CA219BC1954DF8941404488B576AA9D77070341DD2
  388. 0CE027262C0E9AAA22957671292A493100698A472BD3D4AE3B180193510043A6
  389. 50350024BF21DF73FFE612279379473AF9A90B936A23A4C0AC4942D88990812E
  390. 8627C254667510C85C8C3664A64F69E84789BB4850002580F5050964FF8AD058
  391. 46F31649C58500E342914A9EA71E1CF66C2CB3E999DC0C43232305E937BD2A0E
  392. 447C539AE985072865DCCCC9CEB297B95451345F49495EC4139D18916F50634A
  393. 511F25752F89FC2432A5C19D607843A072B9C4010620DF6ED2C31C3C31285149
  394. 89930AA717A68EE88724505157AD32651615E64E23DE6210B5660281B12D8659
  395. 2D79C953C45220FD94267B3B7AE00FB5584781C9CA3F6E54CF2177F21EA9294B
  396. 2C1709607C48A63CE5192501F519C0E5A0A4B0B3F84A4358F1081D2D530038FE
  397. 884262C9D0D61CB2FF169938C54FFD7C0B284B93ACF59D2B23C9A14D7608D028
  398. 817DAB41AFEB16531066234532E52E29720995D83200D71DE02722011B4318F2
  399. 9DFBB50658A64CE3E856C3B9BCBCCF6345D90E100350388C2ECF5A035C934A84
  400. B324F554644CA3E34F1C3F331303FC2B5B15F9D2C8AAB3B24C6E653323438004
  401. 0D521C053168A755F91003C6F44783FCC88D47B14D7BD6344B060E2C5450F9E8
  402. 5328C6CD91C0A43CEB9108EBE27AABD8A488223BAA49B2A4C691E718C84F6101
  403. 4D4C02034516F58A5967C989464362A0AC3E559930440001DCF429E324F00010
  404. C851D07AD617A07DE96D84499C785878581DD1C660D4A3E4AE2C929CB8994A89
  405. A2528A6D783537B6FF6CA55CB1A28F6E1C25955CE15327D69C53BB1E34B1A361
  406. C44178292165AA239454AD6E37597CDA86E4A44CCA298C49CBB5AC4ABE949E61
  407. 52AA3C5D81094340DAA3A2C0552B3C41EE43CC94A579868A395CAA0C7A74C214
  408. 9894344F259128774473A30CC568276ACBC8B8D46A35B1E0C4908D5A1C14BF2A
  409. 12DAC23356F5ECD2755ED7960D31D33533A99D60962326D4E50F264C09007DB2
  410. F74CBF48C690C701904269251009F2507EFA0A527227F3CB980C607591D9E1D1
  411. 4AA5000824A929A61A1D46464B9F1999D2282A7C935A26B43F1FEF248B0CC98D
  412. D63CD6DFF77C8CA134AA8AEE72F33681DAC9475F1140001E50CCFBA5C9327C11
  413. 8CA55E5200F9FDC8B3C94AB49D92A813AEA529082101C05366A332BA9D298C36
  414. FA31CA6CC895C0A74897BB280ACDC80063972ABE6A80121451A22F65AF6471E9
  415. 62E279DE68165B176B522B2F06D032601AD2366A7545718F9B93D484832774F9
  416. 4635E80193CDAA223F076451421E0E96BD30181CEA1C04D335C3D170D6659952
  417. 13065DBDBB9F8586D214BDBA298FF1D1F44F6655009581053018140D55144325
  418. 504147C92A890912575257D5AC855B01D8999E7AFD90521984260101003B"X
  419.  
  420. /* Hex file above was generated as follows:
  421.    (1) From CLI, typed "type > RAM:temp Stone.gif opt h"
  422.    (2) From a text editor (preferably one with "vertical" block marking),
  423.        removed all the extraneous stuff from resulting "RAM:temp"
  424.    (3) Using text editor, imported the resulting hex file above (note
  425.        enclosing quotes and extra "X" at the end).    */
  426.  
  427. /* add libraries */
  428. libs = 'rexxsupport.library rexxarplib.library'
  429. DO i = 1 TO Words(libs)
  430.  lib = Word(libs,i)
  431.  if ~Show('Lib',lib) then do
  432.   if EXISTS('LIBS:'lib) then call addlib lib, 0, -30
  433.   else do
  434.    say ' '
  435.    say 'ERROR: cannot find' lib 'in LIBS:'
  436.    say ' '
  437.    if lib = 'rexxsupport.library' then do
  438.     say ' please copy rexxsupport.library from WorkBench disk:libs'
  439.     end
  440.    else do
  441.     say ' please get rexxarplib.library from aminet:util/rexx'
  442.     end
  443.    say ' '
  444.    AskExit()
  445.    end
  446.   end
  447.  end i
  448.  
  449.             /*   some Intitializations = default        */
  450. flags.Thumbnail = 350    /* Thumbnail maximum dimensions            */
  451. flags.Thmbfmt = "JPEG"    /* Thumbnail format { GIF | JPEG }        */
  452. flags.MakeHTML = 0    /* 0 to make HTML                */
  453. flags.MakeText = 0    /* 1 to make printable ASCII text file        */
  454. flags.MakeGuide = 0    /* 1 to make ".guide" hypertext files        */
  455.  flags.verbose = 0    /* 1 for verbose progress reports        */
  456. flags.bold = 0        /* 0 male «boldface» & female «italic»        */
  457. flags.living = 0        /* > 0 show: .Living...                */
  458. flags.GenPrefix = ""    /* needs only be set for specific circumstances 
  459.              ( if this makes no sense, you don't need it :) */
  460.  
  461. sayASCII = ' plain ASCII printable files'
  462. sayguide = ' ".guide" hypertext files'
  463. sayHTML = ' ".htm" hypertext files for WWW Net surfers'
  464. bolditalic = ' using boldface » men and italic » women'
  465. progress = ' progress reports'
  466.  
  467. if EXISTS('rexx:Scion2html.rexx') then rexxdir = "rexx:"
  468. else rexxdir = ""
  469.  
  470. OldScion2html = Open('Scion2html','S:Scion2html.Config','r')
  471.  
  472. if OldScion2html then do
  473.  Close('Scion2html')
  474.  say '... moving S:Scion2html.Config ---> ENVARC:Scion/Scion2html.Config'
  475.  address command 'C:copy S:Scion2html.Config ENVARC:Scion/Scion2html.Config'
  476.  address command 'C:delete S:Scion2html.Config'
  477.  say ' '
  478.  end
  479.  
  480. if EXISTS('ENVARC:Scion/Scion2html.Config') then do
  481.  say '... moving ENVARC:Scion/Scion2html.Config ---> ENVARC:Scion2html.Config'
  482.  address command 'C:copy ENVARC:Scion/Scion2html.Config ENVARC:Scion2html.Config'
  483.  address command 'C:delete ENVARC:Scion/Scion2html.Config'
  484.  say ' '
  485.  end
  486.  
  487. GoodScion2html = Open('Scion2html','ENVARC:Scion2html.Config','r')
  488.  
  489. ChangedScion2html = ~GoodScion2html
  490.  
  491. if GoodScion2html then do
  492.  Mdir = readln('Scion2html')
  493.  flags.Thumbnail = readln('Scion2html')
  494.  flags.Thmbfmt = readln('Scion2html')
  495.  coumpound = readln('Scion2html')
  496. /*
  497. say 'coumpound = 'coumpound
  498. do bitnum = 0 to 7 by 1
  499.  say 'bit 'bitnum' = 'bittst(coumpound,bitnum)
  500.  end
  501.           tstbittest = 0
  502. say 'tstbittest = 'tstbittest
  503. do bitnum = 0 to 7 by 1
  504.  say 'bit 'bitnum' = 'bittst(tstbittest,bitnum)
  505.  end
  506.           tstbittest = 7
  507. say 'tstbittest = 'tstbittest
  508. do bitnum = 0 to 7 by 1
  509.  say 'bit 'bitnum' = 'bittst(tstbittest,bitnum)
  510.  end
  511. */
  512.  
  513.  flags.MakeHTML = bittst(coumpound,3)
  514.  flags.MakeGuide = bittst(coumpound,2)
  515. /* flags.verbose */
  516.  flags.bold = bittst(coumpound,1)
  517.  flags.MakeText = bittst(coumpound,0)
  518.  flags.GenPrefix = readln('Scion2html')
  519.  Close('Scion2html')
  520.  
  521.  say '                     '
  522.  say '   Scion2html.Config  settings:'
  523.  say '  output destination: 'Mdir
  524.  end
  525.  
  526. else do
  527.  say '           '
  528.  say '   default  settings:'
  529.  say '  output destination: (will be set later)'
  530.  end
  531.  
  532. say '  Thumbnail: 'flags.Thmbfmt' max 'flags.Thumbnail'x'flags.Thumbnail
  533. if flags.GenPrefix ~= '' then say '  GeneralPrefix = 'flags.GenPrefix
  534.  else say '  GeneralPrefix = {default} [special circumstance only]'
  535. if flags.MakeGuide then say '  make'sayguide
  536.  else say ' NOT making'sayguide
  537. if flags.MakeText then say '  make'sayASCII
  538.  else say ' NOT making'sayASCII
  539. if ~flags.bold then say ' 'bolditalic
  540.  else say ' NOT'bolditalic
  541. if flags.verbose then say ' verbose'progress
  542.  else say '  minimal'progress' (during "normal" runs)'
  543. say ' '
  544.  
  545. if flags.GenPrefix = "" then flags.GenPrefix = "GENEAFI"
  546.  
  547. say '                                                               '
  548. say ' Note: Scion2html.rexx cannot run while Scion is in HELP mode. '
  549. SAY ' '
  550.  
  551. Address "SCIONGEN"    /* Point at Scion Genealogist port */
  552. options RESULTS
  553.  
  554. if Show(p,'SCIONGEN') then do
  555.  
  556.  'GETPROGVERSION'
  557.  flags.VERSION = RESULT
  558.  
  559.  'GETDBNAME'     /* Issue GET DB NAME command to Scion Genealogist */
  560.  flags.DBNAME = RESULT
  561.  
  562.  if flags.VERSION > 5 then do
  563.   'GETBRKCHAR'
  564.   flags.BRKCHAR = RESULT
  565.   'GETLASTIRN'
  566.   end
  567.  else 'GETTOTALIRN'
  568.  
  569.  LASTIRN = RESULT
  570.  
  571.  if LASTIRN = 0 then do
  572.  SAY '                                                                  '
  573.  SAY '   Scion Genealogist is currently displaying an EMPTY data base!  '
  574.  SAY '                                                                  '
  575.  SAY ' '
  576.  AskExit()
  577.   end
  578.  end
  579.  
  580. else do
  581.  SAY '                                                               '
  582.  SAY '   Scion Genealogist is NOT currently displaying a data base:  '
  583.  SAY '                                                               '
  584.  SAY ' Please start Scion; load desired data base; then try again... '
  585.  SAY '                                                               '
  586.  SAY ' '
  587.  AskExit()
  588.  end
  589.  
  590. PARSE ARG flags.target
  591. flags.target = Upper(strip(flags.target,,'"')) /* just in case, remove errant quotes */
  592.  
  593. origThumbnail = flags.Thumbnail
  594. origThumbformat = flags.Thmbfmt
  595.  
  596. blanks = '                                                        '
  597.  
  598. flags.DoPictures = CheckGfxCon()
  599.  
  600. DO WHILE flags.target = '' | flags.target = '?' | flags.target = '/' | substr(flags.target,1,1) = 'H' | substr(flags.target,1,1) = 'P'
  601.  SAY ' '
  602.  if flags.target = 'H' | flags.target = 'HINTS' then do
  603.   SAY '       Some hints:'
  604.   SAY ' '
  605.   SAY '  -----------------------------------------------------------------'
  606.   SAY ' | if Death Date is unknown, please use ?                          |'
  607.   SAY ' |    this will allow the runtime option of                        |'
  608.   SAY ' |     "exclude details on living persons"                         |'
  609.   SAY ' |    to operate properly.                                         |'
  610.   SAY '  -----------------------------------------------------------------'
  611.   SAY ' '
  612.   SAY '  -----------------------------------------------------------------'
  613.   SAY ' | · "Death Place" & "Burial Place" may be used as                 |'
  614.   SAY ' | ·         additional COMMENT fields, IF:                        |'
  615.   SAY ' |   "Death Date"  & "Burial Date"  are blank, respectively        |'
  616.   SAY '  -----------------------------------------------------------------'
  617.   SAY ' '
  618.   SAY '  -----------------------------------------------------------------'
  619.   SAY ' | · Conventions that I followed in my ScionGenealogist data base: |'
  620.   SAY ' |   ·   surnames kept pure ( no honorifics, Jr''s, III''s )         |'
  621.   SAY ' |   ·  given names have any and all honorifics AFTER a COMMA      |'
  622.   SAY ' |      ·  for example:  surname      FirstNames, honorifics       |'
  623.   SAY ' |                       BAUER-GAUSS  Joseph, Dr.                  |'
  624.   SAY ' |                       DAGLEY       Richard Kelley, Jr.          |'
  625.   SAY ' |                       Clayton      John, aka TARZAN of the Apes |'
  626.   SAY '  -----------------------------------------------------------------'
  627.   SAY ' '
  628.   SAY '  -----------------------------------------------------------------'
  629.   SAY ' | · <#> in comments fields or ( ¶ ) info files are replaced       |'
  630.   SAY ' |       by NAMES from the Scion DB ( with appropriate link )      |'
  631.   SAY ' |     for example: <101> is replaced by:                          |'
  632.   SAY ' |         <A HREF=P101.htm>Iam Onehundredone, Jr.</A>             |'
  633.   SAY '  -----------------------------------------------------------------'
  634.   SAY ' '
  635.   SAY '  -----------------------------------------------------------------'
  636.   SAY ' |  For a name change ( NOT maidenname > marriedname ), try this:  |'
  637.   SAY ' |      surname field:    New                                      |'
  638.   SAY ' |   given name field:    Birth Name > Changed To, Ph. D.          |'
  639.   SAY ' |     which lists as:    Birth Name > Changed To New, Ph. D.      |'
  640.   SAY ' |                                                                 |'
  641.   SAY ' |  meaning: "Birth Name" is now known as "Changed To New, Ph. D." |'
  642.   SAY '  -----------------------------------------------------------------'
  643.   SAY ' |      surname field:    TARZAN                                   |'
  644.   SAY ' |   given name field:    John Clayton > aka, of the Apes          |'
  645.   SAY ' |     which lists as:    John Clayton > aka TARZAN, of the Apes   |'
  646.   SAY '  -----------------------------------------------------------------'
  647.   SAY ' «»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»'
  648.   SAY ' »«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«'
  649.   SAY ' «»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»'
  650.   SAY ' »«                                                                »«'
  651.   SAY ' «» GetLastName: PROCEDURE at end of script capitalizes Last Names »«'
  652.   SAY ' «» -------------------------------------------------------------  «»'
  653.   SAY ' »« | it can also be used to handle "non-conforming" Last Names |  »«'
  654.   SAY ' «» |                e.g. "MAC ISAAC" --> "MacISAAC"            |  «»'
  655.   SAY ' »« |                     "VON NUEMANN" --> "VonNuemann"        |  »«'
  656.   SAY ' «» -------------------------------------------------------------  «»'
  657.   SAY ' »« BUT: you must add the additional tests yourself (it''s easy!)   »«'
  658.   SAY ' «»      REMEMBER to transfer your additions to future updates     «»'
  659.   SAY ' »«                                                                »«'
  660.   SAY ' «»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»'
  661.   SAY ' »«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«'
  662.   SAY ' «»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»'
  663.  
  664.   end
  665.  
  666.  flags.IRN = 0
  667.  
  668.  if flags.DoPictures & ( substr(flags.target,1,1) = 'P' ) then do
  669.   HTMLdir = Mdir||flags.DBNAME'G'
  670.   say ' ________________________________________________________'
  671.   do until substr(flags.IRN,1,1) = 'Q'
  672.    say ' '
  673.    say 'enter a Person IRN { 1 .. 'LASTIRN' } or QUIT'
  674.    say ' '
  675.    flags.IRN = flags.IRN + 1
  676.    svflags.IRN = flags.IRN
  677.    if flags.IRN > LASTIRN then flags.IRN = 1
  678.    'GETFIRSTNAME' flags.IRN
  679.    FIRSTNAME = RESULT
  680.    'GETLASTNAME' flags.IRN
  681.    LASTNAME = RESULT
  682.    call WriteCh(stdout,FIRSTNAME' 'LASTNAME' ['flags.IRN'] ')
  683.    PULL flags.IRN
  684.    if flags.IRN = '' then flags.IRN = svflags.IRN
  685.    if substr(flags.IRN,1,1) = 'Q' then PauseExit()
  686.    if ( 0 > flags.IRN ) | ( flags.IRN > LASTIRN ) then do
  687.     say ' '
  688.     say ' out of bounds, please remain within given range'
  689.     say ' '
  690.     flags.IRN = 0
  691.     end
  692.    else do
  693.     'GETFIRSTNAME' flags.IRN
  694.     FIRSTNAME = RESULT
  695.     'GETLASTNAME' flags.IRN
  696.     LASTNAME = RESULT
  697.     say ' '
  698.     say 'Processing:'
  699.     say FIRSTNAME' 'LASTNAME' ['flags.IRN']'
  700.     flags.album = '?'
  701.     do until ( upper(substr(flags.album,1,1)) = 'P' ) | ( upper(substr(flags.album,1,1)) = 'F' )
  702.      say ' '
  703.      call WriteCh(stdout,' Album selection: Person or Family ['flags.album'] ')
  704.      PULL flags.album
  705. /* say 'flags.album ' flags.album */
  706.      if upper(substr(flags.album,1,1)) = 'P' then do
  707.       if Exists(HTMLdir'/P'flags.IRN'A.htm') then addtoAlbum('P',flags.IRN)
  708.       else say HTMLdir'/P'flags.IRN'A.htm does not yet exist; cannot process.'
  709.       end
  710.      else if upper(substr(flags.album,1,1)) = 'F' then do
  711.       if flags.VERSION < 5 then 
  712.        say 'Please upgrade to Scion V5.x for this function...'
  713.       else do
  714.        'GETNUMMARRY' flags.IRN
  715.        NUMMARRY = RESULT
  716. /* say 'NUMMARRY 'NUMMARRY */ 
  717.        setNUMMARRY = NUMMARRY
  718.        if NUMMARRY > 1 then do
  719.         say 'enter a Family # { 1 .. 'NUMMARRY' }'
  720.         PULL setNUMMARRY
  721.         end
  722.        if ( setNUMMARRY > 0 ) & ( setNUMMARRY < NUMMARRY + 1 ) then do
  723. /* say 'GETMARRIAGE 'flags.IRN' 'setNU */
  724.         'GETMARRIAGE' flags.IRN setNUMMARRY-1
  725.         flags.FIRN = RESULT
  726. /* say 'RESULT 'flags.FIRN */
  727.         say ' '
  728.         if Exists(HTMLdir'/F'flags.FIRN'A.htm') then addtoAlbum('F',flags.FIRN)
  729.         else say HTMLdir'/F'flags.FIRN'A.htm does not yet exist; cannot process.'
  730.         end
  731.        else say 'No Family' 
  732.        end
  733.       end
  734.      leave
  735.      end
  736.     end
  737.    end
  738.   end
  739.  
  740.  if flags.target = '?' | flags.target = '/' then do
  741.   SAY ' please send comments, questions to: ipolyi@ev1.net'
  742.   SAY '                                    or:'
  743.   SAY '             Scion2html.rexx  ©  Harold H. Ipolyi '
  744.   SAY '                                  Boise, ID 83716-3298'
  745.   SAY '   ____________________________________________________________'
  746.   SAY '  /                                                            \'
  747.   SAY ' / to [re]create HTML hypertext from ScionGenealogist data base \'
  748.   SAY ' \ also, optionally, AmigaGuide style hypertexts or plain ASCII /'
  749.   SAY '  \____________________________________________________________/'
  750.   SAY ' '
  751.  
  752.  
  753.   SAY '                                 '
  754.   SAY ' Sub-MENU:    »»» pressing RETURN accepts [value]'
  755.   SAY '         '
  756.   SAY ' defaults  change settings of default parameters'
  757.  
  758.   SAY '        '
  759.   SAY '  readme   view Scion2html.rexx readme information'
  760.   SAY '         '
  761.   SAY '  history  review the Release History of Scion2html.rexx'
  762.   SAY '        '
  763.   SAY '  future  review the Future plans for Scion2html.rexx'
  764.   SAY '        '
  765.   SAY '  cancel  '
  766.   SAY ' '
  767.  
  768.   call WriteCh(stdout,' [cancel] ')
  769.   PULL answer
  770.  
  771.   if answer = 'DEFAULTS' | answer = 'D' then do
  772.  
  773.    SAY '                                 '
  774.    SAY ' defaults: may be changed; RETURN accepts [value]'
  775.    SAY '                                   'substr(blanks,1,length(flags.DBNAME)+3)''
  776.    svMdir = Mdir
  777.    call WriteCh(stdout,' HTMLs will be placed in directory  'flags.DBNAME'G  within ['Mdir'] ')
  778.    PULL Mdir
  779.    if Mdir = '' then Mdir = svMdir
  780.    ChangedScion2html = ChangedScion2html | ( Mdir ~= svMdir )
  781.    SAY ' '
  782.    svGeneralPrefix = flags.GenPrefix
  783.    call WriteCh(stdout,' General Prefix ')
  784.    if flags.GenPrefix ~= 'GENEAFI' then call WriteCh(stdout,'(. to reset) ')
  785.    call WriteCh(stdout,' = [')
  786.    if flags.GenPrefix ~= 'GENEAFI' then call WriteCh(stdout,flags.GenPrefix)
  787.    call WriteCh(stdout,'] ')
  788.    PARSE PULL flags.GenPrefix
  789.    if flags.GenPrefix = '' then flags.GenPrefix = svGeneralPrefix
  790.    else if flags.GenPrefix = '.' then flags.GenPrefix = 'GENEAFI'
  791.    ChangedScion2html = ChangedScion2html | ( flags.GenPrefix ~= svGeneralPrefix )
  792.    SAY ' '
  793.    if ~flags.MakeGuide then WriteCh(stdout,' NOT m')
  794.    else WriteCh(stdout,' M')
  795.    WriteCh(stdout,'aking'sayguide'; ')
  796.    call WriteCh(stdout,' acceptable? [yes] ')
  797.    PULL answer
  798.    if answer ~= '' then do
  799.     if substr(answer,1,1) = 'N' then do
  800.      flags.MakeGuide = ~flags.MakeGuide
  801.      ChangedScion2html = 1
  802.      end
  803.     end
  804.    SAY ' '
  805.    if ~flags.MakeText then WriteCh(stdout,' NOT m')
  806.    else WriteCh(stdout,' M')
  807.    WriteCh(stdout,'aking'sayASCII'; ')
  808.    call WriteCh(stdout,' acceptable? [yes] ')
  809.    PULL answer
  810.    if answer ~= '' then do
  811.     if substr(answer,1,1) = 'N' then do
  812.      flags.MakeText = ~flags.MakeText
  813.      ChangedScion2html = 1
  814.      end
  815.     end
  816.    SAY ' '
  817.    if flags.bold then WriteCh(stdout,' NOT')
  818.    WriteCh(stdout,bolditalic'; ')
  819.    call WriteCh(stdout,' acceptable? [yes] ')
  820.    PULL answer
  821.    if answer ~= '' then do
  822.     if substr(answer,1,1) = 'N' then do
  823.      flags.bold = ~flags.bold
  824.      ChangedScion2html = 1
  825.      end
  826.     end
  827.    SAY ' '
  828.    if ~flags.verbose then WriteCh(stdout,' minimal')
  829.    else WriteCh(stdout,' verbose')
  830.    WriteCh(stdout,progress'; ')
  831.    call WriteCh(stdout,' acceptable? [yes] ')
  832.    PULL answer
  833.    if answer ~= '' then do
  834.     if substr(answer,1,1) = 'N' then flags.verbose = ~flags.verbose
  835.     end
  836.    if flags.DoPictures then do
  837.     SAY ' '
  838.     SAY '+-----------------------------------------------------------------+'
  839.     SAY '| NOTE: changing Thumbnail max dim or Thumbnail format will force |'
  840.     SAY '|       regeneration of all Thumbnail pictures. Just so you know! |'
  841.     SAY '+-----------------------------------------------------------------+'
  842.     SAY '|       If Thumbnail format is changed, Picture Albums must then  |'
  843.     SAY '|       be manually edited to reflect the new Thumbnail suffixes. |'
  844.     SAY '+-----------------------------------------------------------------+'
  845.     SAY ' '
  846.     svThumbnail = flags.Thumbnail
  847.     call WriteCh(stdout,' Thumbnail max dim = ['flags.Thumbnail'] ')
  848.     PULL flags.Thumbnail
  849.     if ~IsNumeric(flags.Thumbnail) then flags.Thumbnail = svThumbnail
  850.     ChangedScion2html = ChangedScion2html | ( flags.Thumbnail ~= svThumbnail )
  851.     if flags.Thumbnail < 50 then flags.Thumbnail = 50
  852.     SAY ' '
  853.     svThumbformat = flags.Thmbfmt
  854.     call WriteCh(stdout,' Thumbnail format = ['flags.Thmbfmt'] ')
  855.     PULL flags.Thmbfmt
  856.     if flags.Thmbfmt ~= 'GIF' & flags.Thmbfmt ~= 'JPEG' then flags.Thmbfmt = ''
  857.     if flags.Thmbfmt = '' then flags.Thmbfmt = svThumbformat
  858.     ChangedScion2html = ChangedScion2html | ( flags.Thmbfmt ~= svThumbformat )
  859.     end
  860.    SAY ' '
  861.    end
  862.  
  863.   else if answer = 'HISTORY' | answer = 'H' then do
  864.    if Open('Scion',rexxdir'Scion2html.rexx','r') then do
  865.     readme = 0
  866.     notbreak = 1
  867.     readmestring = '=====History====='
  868.     say readmestring
  869.     DO While ~EOF('Scion') & notbreak
  870.      line = ReadLn('Scion')
  871.      if readme then do
  872.       if line = readmestring then notbreak = 0
  873.       if notbreak then say line
  874.       end
  875.      if line = readmestring then readme = ~readme
  876.      end
  877.      say readmestring
  878.      close('Scion')
  879.      end
  880.     end
  881.  
  882.   else if answer = 'FUTURE' | answer = 'F' then do
  883.    if Open('Scion',rexxdir'Scion2html.rexx','r') then do
  884.     readme = 0
  885.     notbreak = 1
  886.     readmestring = '=====Future?====='
  887.     say readmestring
  888.     DO While ~EOF('Scion') & notbreak
  889.      line = ReadLn('Scion')
  890.      if readme then do
  891.       if line = readmestring then notbreak = 0
  892.       if notbreak then say line
  893.       end
  894.      if line = readmestring then readme = ~readme
  895.      end
  896.      say readmestring
  897.      close('Scion')
  898.     end
  899.    end
  900.  
  901.   else if answer = 'README' | answer = 'R' then do
  902.    if Open('Scion',rexxdir'Scion2html.rexx','r') then do
  903.     if Open('Scionreadme','RAM:Scion2html.readme','w') then do
  904.      readme = 0
  905.      notbreak = 1
  906.      readmestring = '=====README====='
  907.      DO While ~EOF('Scion') & notbreak
  908.       line = ReadLn('Scion')
  909.       if readme then do
  910.        if line = readmestring then do
  911.         close('Scionreadme')
  912.         say '                      created: RAM:Scion2html.readme'
  913.         notbreak = 0
  914.         end
  915.        if notbreak then do
  916.         WriteLn('Scionreadme',line)
  917.         say line
  918.         end
  919.        end
  920.       if line = readmestring then readme = ~readme
  921.       end
  922.      end
  923.      close('Scion')
  924.     end
  925.    end
  926.  
  927.   end
  928.  
  929.  SAY '             _______________________________________'
  930.  SAY '            |                    
  931.                    |'
  932.  SAY '   MENU     | »»» pressing RETURN 
  933. accepts [value]   |'
  934.  SAY '            |_______________________________________|'
  935.  SAY ' '
  936.  SAY '        '
  937.  SAY '   Quit   '
  938.  SAY '       '
  939.  SAY '     ?      about Scion2html.rexx; also can change the settings shown above.'
  940.  SAY '                                              'substr(blanks,1,length(flags.DBNAME)+2)''
  941.  SAY '  Normal    [re]make HTMLs for all persons in  'flags.DBNAME'  data base {'LASTIRN'}'
  942.  SAY '       '
  943.  SAY '     #      [re]make HTMLs for a specific person: { 1 .. 'LASTIRN' }'
  944.  SAY '          '
  945.  SAY '  Anchors   URL hints: <A HREF="?">'flags.DBNAME' Genealogy</A>'
  946.  SAY '                                     '
  947.  SAY '   Hints    useful tips  please read '
  948.  SAY '                                                                
  949.  SAY '  Picture   add extra pictures to existing Picture Album  NEW ! '
  950.  SAY ' '
  951.  
  952.  SAY ' '
  953.  flags.target = 'Normal'
  954.  call WriteCh(stdout,' ['flags.target'] ')
  955.  
  956.  PULL flags.target
  957.  
  958.  if length(flags.target) > 1 & substr(flags.target,1,1) = ' ' then flags.target = substr(flags.target,2,length(flags.target))
  959.  if length(flags.target) > 7 then flags.target = substr(flags.target,1,7)
  960.  if flags.target = '' then flags.target = 'Normal'
  961.  if substr(flags.target,1,1) = '#' then do
  962.   flags.target = ''
  963.   SAY ' '                                    /* :) :) :) :) :) */
  964.   SAY '     NOT #! An actual number, like, you know :), from the set { 1 .. 'LASTIRN' }'
  965.   end
  966.  if flags.target = 'INFO' | flags.target = 'ABOUT' | flags.target = 'HELP' then flags.target = '?'
  967.  if IsNumeric(flags.target) then do
  968.   if flags.target > LASTIRN | flags.target < 1 then do
  969.     SAY ' '
  970.     SAY '     Lousy shooting:'
  971.     SAY ' 'flags.target' is outside range of { 1 .. 'LASTIRN' } of persons in data base  'flags.DBNAME' '
  972.     SAY '     Clean your display, rinse your lenses, and try again!'
  973.     flags.target = ''
  974.    end
  975.   end
  976.  flags.target = Upper(strip(flags.target,,'"'))    /* just in case, remove errant quotes */
  977.  end
  978.  
  979. if ~Validtarget(flags.target) then PauseExit()
  980.  
  981. if substr(flags.target,1,1) = 'A' then flags.target = 'ANCHORS'
  982. if substr(flags.target,1,1) = 'H' then flags.target = 'HINTS'
  983. if substr(flags.target,1,1) = 'N' then flags.target = 'NORMAL'
  984. if substr(flags.target,1,1) = 'P' then flags.target = 'PICTURE'
  985. if substr(flags.target,1,1) = 'Q' then flags.target = 'QUIT'
  986.  
  987. /* SAY flags.target */
  988.  
  989. if flags.VERSION < 4.07 then do
  990.  SAY ' '
  991.  say 'ERROR: Requires Scion VERSION = 4.07 (or greater)'
  992.  AskExit()
  993.  end
  994. else do
  995.  if exists("sys:utilities/multiview") then
  996.   flags.VIEWER = "sys:utilities/multiview"    /* Guide picture viewer    */
  997.  else do
  998.   if flags.VERSION < 4.09 then flags.VIEWER = "display"
  999.   else do
  1000.    'GETVIEWER'
  1001.    flags.VIEWER = RESULT
  1002.    end
  1003.   end
  1004. /* say 'Guide picture viewer = 'flags.VIEWER */
  1005.  if flags.VERSION > 5 then do
  1006.   'GETSNDPLAYER'
  1007.   flags.PLAYER = RESULT
  1008. /* say 'Guide sound player = 'flags.PLAYER */
  1009.   end
  1010.  end
  1011.  
  1012. /* Get path to database so can locate any note files in same location */
  1013. 'GETDBPATH'        /* new in Scion V 4.07 */
  1014. DBPATH = RESULT
  1015. DBPATH = CheckPathName(DBPATH)
  1016.  
  1017. /*
  1018. SAY ' '
  1019. Say ' Testing: is data base assignment of 'DBPATH||flags.DBNAME' visible?'
  1020. SAY ' '
  1021. */
  1022.  
  1023. PRAGMA('w','n')
  1024. if ~Exists(DBPATH||flags.DBNAME) then do
  1025.  SAY 'ERROR: Scion data base 'flags.DBNAME' not found in: 'DBPATH
  1026.  AskExit()
  1027.  end
  1028.  
  1029. if ~GoodScion2html then do
  1030.  Mdir = ''            /* where to put the directories? */
  1031.  if Exists(flags.DBNAME'G') then do    /* check current path */
  1032.   Mdir = PRAGMA('d')        /* we're already there */
  1033.   end
  1034.  else do
  1035.   TXTdir = "RAM:"                    /* RAM: if nothing else */
  1036.   if Exists('Work:') then TXTdir = "Work:"    /* assume Work: */
  1037.   SAY ' '                /* ask, with default prompted */
  1038.   if flags.target ~= 'ANCHORS' then call WriteCh(stdout,'Generate ')
  1039.   call WriteCh(stdout,'Directory 'flags.DBNAME'G for HTML pages ')
  1040.   if flags.target = 'ANCHORS' then call WriteCh(stdout,'is ')
  1041.   call WriteCh(stdout,'in: ['TXTdir'] ')
  1042.   PULL Mdir
  1043.   if Mdir = '' then Mdir = TXTdir        /* default was accepted */
  1044.   end
  1045.  end
  1046.  
  1047. Mdir = CheckPathName(Mdir)
  1048.  
  1049. PRAGMA('w','w')
  1050.  
  1051. if ~flags.MakeHTML then HTMLdir = Mdir||flags.DBNAME'G'
  1052.  
  1053. if EXISTS(HTMLdir'/METATAGS') then do
  1054.  Open('METATAGS',HTMLdir'/METATAGS','r')
  1055.  flags.Meta1 = ReadLn('METATAGS')
  1056.  flags.Meta2 = ReadLn('METATAGS')
  1057.  flags.Meta3 = ReadLn('METATAGS')
  1058.  Close('METATAGS')
  1059.  end
  1060. else flags.Meta1 = " "
  1061.  
  1062. TXTdir = ''
  1063. if flags.MakeText then TXTdir = Mdir||flags.DBNAME'T'
  1064. if flags.MakeGuide then AGdir = Mdir||flags.DBNAME'AG'
  1065.  
  1066. flags.RemakeThumb = ( origThumbnail ~= flags.Thumbnail ) | ( origThumbformat ~= flags.Thmbfmt )
  1067. /* say 'flags.RemakeThumb ' flags.RemakeThumb */
  1068.  
  1069. if ChangedScion2html then do
  1070.  Open('Scion2html','ENVARC:Scion2html.Config','w')
  1071.  call WriteLn('Scion2html',Mdir)
  1072.  call WriteLn('Scion2html',flags.Thumbnail)
  1073.  call WriteLn('Scion2html',flags.Thmbfmt)
  1074.  coumpound = 0
  1075.  if flags.MakeText then coumpound = bitset(coumpound,0)
  1076.  if flags.bold then coumpound = bitset(coumpound,1)
  1077.  if flags.MakeGuide then coumpound = bitset(coumpound,2)
  1078.  if flags.MakeHTML then coumpound = bitset(coumpound,3)
  1079. /*
  1080. say 'coumpound as written = 'coumpound
  1081. */
  1082.  call WriteLn('Scion2html',coumpound)
  1083. /*
  1084.  call WriteLn('Scion2html',flags.MakeText + ( 2 * flags.bold ) + 
  1085. ( 4 * flags.MakeGuide ) + ( 8 * flags.MakeHTML ) )
  1086. */
  1087.  if flags.GenPrefix ~= 'GENEAFI' then call WriteLn('Scion2html',flags.GenPrefix)
  1088.  Close('Scion2html')
  1089.  end
  1090.  
  1091. if flags.target = 'QUIT' then PauseExit()
  1092.  
  1093. if ~flags.bold then do
  1094.  flags.htmlb = '<B>'
  1095.  flags.htmlub = '</B>'
  1096.  flags.htmli = '<I>'
  1097.  flags.htmlui = '</I>'
  1098.  end
  1099. else do
  1100.  flags.htmlb = ''
  1101.  flags.htmlub = ''
  1102.  flags.htmli = ''
  1103.  flags.htmlui = ''
  1104.  end
  1105.  
  1106. if flags.target ~= "ANCHORS" then do
  1107.  if ~flags.MakeHTML then do
  1108.   if ~Makedir(HTMLdir) then do
  1109.    SAY ' '
  1110.    SAY 'ERROR: unable to create directory: 'HTMLdir
  1111.    AskExit()
  1112.    end
  1113.   if ~exists(HTMLdir'/st0ne.gif') then do
  1114.    OPEN('giffile',HTMLdir'/st0ne.gif','W')
  1115.    WriteCh('giffile', stonegif)
  1116.    CLOSE('giffile')
  1117.    end
  1118.   if ~exists(HTMLdir'/img') then do
  1119.    if ~Makedir(HTMLdir'/img') then do
  1120.     SAY ' '
  1121.     SAY 'ERROR: unable to create directory: 'HTMLdir'/img'
  1122.     AskExit()
  1123.     end
  1124.    end
  1125.   end
  1126.  
  1127.  if TXTdir ~= '' then do
  1128.   if ~Makedir(TXTdir) then do
  1129.    SAY ' '
  1130.    SAY 'ERROR: unable to create directory: 'TXTdir
  1131.    AskExit()
  1132.    end
  1133.   end
  1134.  
  1135.  if flags.MakeGuide then do
  1136.   if ~Makedir(AGdir) then do
  1137.    SAY ' '
  1138.    SAY 'ERROR: unable to create directory: 'AGdir
  1139.    AskExit()
  1140.    end
  1141.   end
  1142.  end
  1143.  
  1144. starttime = Time('e')
  1145.  
  1146. do i = 1 to LASTIRN
  1147.  person.gotten.i = 0    /* no persons have yet been gotten from "flags.DBNAME" */
  1148.  end
  1149.  
  1150. if IsNumeric(flags.target) then do
  1151.  
  1152.  GetPerComp(flags.target) /* GetPerComp gets basic info into person. array */
  1153.  
  1154.  pnumb = flags.target
  1155.  
  1156. /*
  1157.  call WriteCh(stdout,'HTMLs for: 'person.GETFULLNAME.pnumb'? ['yes'] ')
  1158.  PULL answer
  1159.  if answer = '' then answer = 'YES'
  1160.  if substr(answer,1,1) ~= 'Y' then AskExit()
  1161. */
  1162.  call WriteCh(stdout,'         HTMLs')
  1163.  if flags.MakeGuide then
  1164.   call WriteCh(stdout,' & guides')
  1165.  if flags.MakeText then
  1166.   call WriteCh(stdout,' & ASCIItextfile')
  1167.  call WriteLn(stdout,' for: 'person.GETFULLNAME.pnumb' {'pnumb'}')
  1168.  
  1169.  starttime = Time('e')
  1170.  
  1171.  if flags.target <= LASTIRN then do
  1172.   if TXTdir ~= '' then Open('GenealogyText',TXTdir'/G'flags.target,'w')
  1173.   flags.living = askliving()
  1174.   flags.depth = askdepth()
  1175.   flags.verbose = 1
  1176.   'EXISTPERSON' flags.target
  1177.   if RESULT = 'YES' then CALL MakeOne(flags.target)
  1178.   else say '{'flags.target'} is a null IRN.'
  1179.   if TXTdir ~= '' then Close('GenealogyText')
  1180.   end
  1181.  end
  1182.  
  1183. else do
  1184.  
  1185.  Delete(HTMLdir'/PAlbum.htm')
  1186.  Delete(HTMLdir'/FAlbum.htm')
  1187.  
  1188.  flags.target = Upper(flags.target)
  1189.  
  1190.  if flags.target ~= "ANCHORS" then do
  1191.  
  1192.   flags.target = 'NORMAL'
  1193.   flags.living = askliving()
  1194.   flags.depth = askdepth()
  1195.   Say ' '
  1196.   call WriteCh(stdout,' HTMLs')
  1197.   if flags.MakeGuide then
  1198.    call WriteCh(stdout,' & guides')
  1199.   if flags.MakeText then
  1200.    call WriteCh(stdout,' & ASCIItextfile')
  1201.   call WriteLn(stdout,' for all ' LASTIRN ' persons in database ' flags.DBNAME)
  1202.  
  1203. /* GENEAFIL.htm is a Scion data base IRN order list of all persons in 
  1204.    HTML format: person * birthdate + deathdate (()) father & mother */
  1205.  
  1206.   Say ' '
  1207.   Say 'file name: 'HTMLdir'/'flags.GenPrefix'L.htm for: Personae'
  1208.   Say ' '
  1209.  
  1210.   Open('indexFile',HTMLdir'/index.html','w')
  1211.   WriteLn('indexFile','<HTML><HEAD>')
  1212.   WriteMeta('indexFile')
  1213.   WriteLn('indexFile','<TITLE>'flags.DBNAME' Genealogy</TITLE></HEAD>')
  1214.   WriteLn('indexFile','<FRAMESET COLS="15%,85%">')
  1215.   WriteLn('indexFile','<FRAME SRC=SN.htm NAME=index>')
  1216.   WriteLn('indexFile','<FRAME SRC=Cred.htm NAME=MAIN>')
  1217.   WriteLn('indexFile','<NOFRAMES>')
  1218.   WriteLn('indexFile','<BODY>')
  1219.   WriteLn('indexFile','Viewing this page requires a browser capable of displaying frames.')
  1220.   WriteLn('indexFile','</BODY>')
  1221.   WriteLn('indexFile','</NOFRAMES>')
  1222.   WriteLn('indexFile','</FRAMESET>')
  1223.   WriteLn('indexFile','</BODY></HTML>')
  1224.   Close('indexFile')
  1225.  
  1226.   Open('creditsFile',HTMLdir'/Cred.htm','w')
  1227.   WriteLn('creditsFile','<HTML><HEAD>')
  1228.   WriteMeta('creditsFile')
  1229.   WriteLn('creditsFile','<TITLE>'flags.DBNAME' Genealogy</TITLE></HEAD>')
  1230.   WriteLn('creditsFile','<BODY BACKGROUND=st0ne.gif><H3>')
  1231.  
  1232.   WriteCh('creditsFile',flags.htmlb''flags.DBNAME''flags.htmlub' Genealogy & ')
  1233.  GetPerComp(1)
  1234.   WriteCh('creditsFile',' · · · <A HREF=P1.htm>')
  1235.   WriteLn('creditsFile',person.GETFULLNAME.1'</A> · · ·')
  1236.   WriteLn('creditsFile','<HR SIZE=5></H3>')
  1237.  
  1238.   WriteLn('creditsFile','<FORM name=buttons>')
  1239.   WriteCh('creditsFile','<INPUT type=button value="Table of Contents" onClick=')
  1240.   WriteCh('creditsFile',"'")
  1241.   WriteCh('creditsFile','window.open(URL="'flags.GenPrefix'L.htm","_top")')
  1242.   WriteCh('creditsFile',"'")
  1243.   WriteLn('creditsFile','>')
  1244.   WriteLn('creditsFile','<BR>')
  1245.  
  1246.   WriteCh('creditsFile','<INPUT type=button value=Index onClick=')
  1247.   WriteCh('creditsFile',"'")
  1248.   WriteCh('creditsFile','window.open(URL="index.html","_top")')
  1249.   WriteCh('creditsFile',"'")
  1250.   WriteLn('creditsFile','></FORM>')
  1251.  
  1252.   WriteCh('creditsFile','<HR SIZE=5>')
  1253.   WriteCh('creditsFile','<FONT COLOR=darkred>Source:</FONT> Scion Data Base ')
  1254.   WriteLn('creditsFile',flags.htmlb''flags.DBNAME''flags.htmlub)
  1255.  
  1256.   if flags.VERSION > 5 then do
  1257.    LASTSAVEDDATE
  1258.    say 'Database 'flags.DBNAME' was last saved on ' RESULT
  1259.    say ' '
  1260.    WriteLn('creditsFile',', <FONT COLOR=darkred>last save date:</FONT> ' RESULT)
  1261.    end
  1262.  
  1263.   WriteCh('creditsFile','<BR> <FONT COLOR=darkred>HTML generated:</FONT> ')
  1264.   WriteLn('creditsFile',Date()' - 'Time())
  1265.   WriteLn('creditsFile','<HR>')
  1266.  
  1267.   if flags.VERSION > 5 then do
  1268.    'GETPREPARER'
  1269.    if RESULT ~= '' then do
  1270.     PARSE VAR RESULT flags.auth '$' addr1 '$' addr2 '$' addr3 '$' addr4 flags.BRKCHAR
  1271.  
  1272.     if p_name ~= '' then 
  1273. WriteLn('creditsFile','<P><FONT COLOR=darkred>Preparer:</FONT><P><B>'flags.auth)
  1274.     if addr1 ~= '' then WriteLn('creditsFile','<BR>'addr1)
  1275.     if addr2 ~= '' then WriteLn('creditsFile','<BR>'addr2)
  1276.     if addr3 ~= '' then WriteLn('creditsFile','<BR>'addr3)
  1277.     if addr4 ~= '' then WriteLn('creditsFile','<BR>'addr4)
  1278.     end
  1279.    'GETPREPPHONE'
  1280.     if RESULT ~= '' then do
  1281.      PARSE VAR RESULT tel1 ',' tel2  ',' tel3 ',' tel4 ',' tel5
  1282.      if tel1 ~= '' then WriteLn('creditsFile','<P>'email(tel1))
  1283.      if tel2 ~= '' then WriteLn('creditsFile','<P>'email(tel2))
  1284.      if tel3 ~= '' then WriteLn('creditsFile','<P>'email(tel3))
  1285.      if tel4 ~= '' then WriteLn('creditsFile','<P>'email(tel4))
  1286.      if tel5 ~= '' then WriteLn('creditsFile','<P>'email(tel5))
  1287.      WriteLn('creditsFile','<P></B><HR SIZE=5><P><HR SIZE=5>')
  1288.      end
  1289.    end
  1290.  
  1291.   WriteLn('creditsFile','<FONT COLOR=darkred>Credits:</FONT><HR><H3>')
  1292.   WriteCh('creditsFile','<I><A HREF=http://www.amiga.de/')
  1293.   WriteLn('creditsFile','>AMIGA</A></I>®')
  1294.   WriteLn('creditsFile','<HR>')
  1295.   WriteCh('creditsFile','<A HREF="http://ftp.sunet.se/aminetbin/find?')
  1296.   WriteCh('creditsFile','Scion"><B>Scion</A>')
  1297.   if flags.VERSION > 0 then do
  1298.    WriteCh('creditsFile','V'flags.VERSION)
  1299.    end
  1300.   WriteLn('creditsFile','</B> © <B>Robbie J Akins</B><HR>')
  1301.   WriteCh('creditsFile','<A HREF="http://ftp.sunet.se/aminetbin/find?')
  1302.   WriteCh('creditsFile','GfxCon"><B>GfxCon</B></A> © ')
  1303.   WriteCh('creditsFile','<B><A HREF=http://tick.informatik.uni-stuttgart.de/~farindk>')
  1304.   WriteLn('creditsFile','Dirk Farin</A></B><HR>')
  1305.   WriteCh('creditsFile','<A HREF="http://ftp.sunet.se/aminetbin/find?')
  1306.   WriteCh('creditsFile','Scion2html"><B>Scion2html.rexx</B></A> ( 2 Jun 2001 ) © ')
  1307.   WriteCh('creditsFile','<A HREF=http://ddw-rh.dyndns.org/~ipolyi/scion.html>')  
  1308.   WriteLn('creditsFile','<B>Harold Ipolyi</B></A>')
  1309.   WriteLn('creditsFile',' @ <A HREF=mailto:ipolyi@ev1.net>ipolyi@ev1.net</A>')
  1310.   WriteLn('creditsFile','</BODY></HTML>')
  1311.   Close('creditsFile')
  1312.  
  1313.   Open('GenealogyFile',HTMLdir'/'flags.GenPrefix'L.htm','w')
  1314.   WriteLn('GenealogyFile','<HTML><HEAD>')
  1315.   WriteMeta('GenealogyFile')
  1316.   WriteLn('GenealogyFile','<TITLE>Personae list</TITLE>')
  1317.   WriteLn('GenealogyFile','</HEAD><BODY BACKGROUND=st0ne.gif>')
  1318.  
  1319.   WriteLn('GenealogyFile','<TABLE BORDER=5 CELLSPACING=5 CELLPADDING=2><TR>')
  1320.   WriteCh('GenealogyFile','<TH COLSPAN=5 BGCOLOR=00ffff>'flags.htmlb''flags.DBNAME''flags.htmlub)
  1321.   WriteLn('GenealogyFile',' Genealogy Table of Contents</TH>')
  1322. /* ---
  1323. <TH COLSPAN=2>')
  1324.   WriteLn('GenealogyFile','<A HREF=SN.htm>INDEX</A></TH>')
  1325.   WriteCh('GenealogyFile','<TH><A HREF=index.html>')
  1326.   WriteCh('GenealogyFile','<BLINK>Credits</BLINK></A>')
  1327. */
  1328.   WriteLn('GenealogyFile','</TH></TR><TR><TD COLSPAN=5 BGCOLOR=cceeee> ')
  1329.   WriteCh('GenealogyFile','Definitions: ')
  1330.   if ~flags.bold then do
  1331.    WriteCh('GenealogyFile',flags.htmlb'bold=male[~_~]'flags.htmlub)
  1332.    WriteCh('GenealogyFile',', 'flags.htmli'italic=fem'flags.htmlui)
  1333.    WriteCh('GenealogyFile',flags.htmlb'{^.^}'flags.htmlub',')
  1334.    end
  1335.   WriteCh('GenealogyFile',' <B>*</B> birth, <B>+</B> death, ')
  1336.   WriteLn('GenealogyFile','¶ more info, ® picture album')
  1337.   WriteLn('GenealogyFile','</TD></TR><TR>')
  1338.   WriteLn('GenealogyFile','<TH>Personae</TH>')
  1339.   WriteLn('GenealogyFile','<TH>*</TH>')
  1340.   WriteLn('GenealogyFile','<TH>+</TH>')
  1341.   WriteLn('GenealogyFile','<TH> [~_~] </TH>')
  1342.   WriteLn('GenealogyFile','<TH> {^.^} </TH>')
  1343.   WriteLn('GenealogyFile','</TR>')
  1344.  
  1345.   if flags.MakeGuide then do
  1346.    Say 'file name: 'AGdir'/'flags.GenPrefix'L.guide for: Personae'
  1347.    Say ' '
  1348.    Open('GenealogyGuide',AGdir'/'flags.GenPrefix'L.guide','w')
  1349.    WriteLn('GenealogyGuide','@database "'flags.GenPrefix'L.guide"')
  1350.  
  1351.    WriteLn('GenealogyGuide','@$VER: 'flags.GenPrefix'L.guide 1.0 ('date()')')
  1352.    WriteLn('GenealogyGuide','@author 'p_name ' 'addr3)
  1353.    WriteLn('GenealogyGuide',' ')
  1354.  
  1355.    WriteLn('GenealogyGuide','@NODE Main "'flags.DBNAME' Genealogy"')
  1356.    WriteLn('GenealogyGuide','@INDEX 'AGdir'/SN.guide/Main')
  1357.    WriteLn('GenealogyGuide',' ')
  1358.    WriteLn('GenealogyGuide','   'flags.DBNAME'. @{b}'Time()' - 'Date()'@{ub}')
  1359.    WriteLn('GenealogyGuide',' ')
  1360.    end
  1361.  
  1362.   if flags.MakeText then do
  1363.    Open('GenealogyText',TXTdir'/GenealogyOf'flags.DBNAME,'w')
  1364.    WriteLn('GenealogyText','Genealogy Data Base "'GetLastName(flags.DBNAME)'"')
  1365.    end
  1366.  
  1367.   TOTALsn = 0
  1368.   qot = "'"
  1369.   sni.last = 0
  1370.   DO i = 1 TO LASTIRN
  1371.    'EXISTPERSON' i
  1372.    if RESULT = 'YES' then do
  1373.     CALL MakeOne(i)
  1374.  
  1375. /* make surname files */
  1376.     if ~flags.MakeHTML & ~(( flags.living > 0 ) & ( person.GETDEATHDATE.i = "" )) then do
  1377.  
  1378. /* --- special processing for married women --- */
  1379.      if person.GETSEX.i = "F" then do
  1380.       'GETNUMMARRY' i
  1381.       marriages = RESULT
  1382.       DO im = 0 TO marriages
  1383.        'GETMARRIAGE' i im
  1384.        marriage = RESULT
  1385.        if marriage ~= "" then do
  1386.         'GETSPOUSE' marriage
  1387.         SPOUSE = RESULT
  1388.         if SPOUSE = i then DO
  1389.          'GETPRINCIPAL' marriage
  1390.          SPOUSE = RESULT
  1391.          end
  1392.         'EXISTPERSON' SPOUSE
  1393.         if RESULT = 'NO' then leave
  1394.         GetPerComp(SPOUSE)
  1395.         jj = TOTALsn
  1396.         if person.GETLASTNAME.SPOUSE = '' then leave
  1397.         DO j = 0 TO TOTALsn
  1398. /* do we already have this last name? */
  1399. /* if so, use its index for AddPtoSN below */
  1400.          if person.GETLASTNAME.SPOUSE = sn.j then jj = j
  1401.          end
  1402. /* if not, then start a new FORM file SN# */ 
  1403.         if jj = TOTALsn then do
  1404.          sn.TOTALsn = person.GETLASTNAME.SPOUSE
  1405.          Open('SN'TOTALsn,HTMLdir'/SN'TOTALsn,'w')
  1406.          WriteLn('SN'jj,person.GETLASTNAME.SPOUSE)
  1407.          sn.jj = person.GETLASTNAME.SPOUSE
  1408. /* sort by creating an index to the FORM files */
  1409.          sni.jj = jj
  1410.          new = sni.jj
  1411.          index = 0
  1412.          j = sni.index
  1413.          DO WHILE sn.j < sn.new
  1414.           index = index + 1
  1415.           j = sni.index
  1416.           end
  1417.          if index < jj then do
  1418.           DO k = jj TO index by -1
  1419.            l = k - 1
  1420.            sni.k = sni.l
  1421.            end
  1422.           sni.index = TOTALsn
  1423.           end
  1424.          TOTALsn = TOTALsn + 1
  1425.          end
  1426.         AddNeetoSN(i,jj)         
  1427.         end
  1428.        end
  1429.       end
  1430. /* --- end of special processing for married women --- */
  1431.  
  1432.      jj = TOTALsn
  1433.      if person.GETLASTNAME.i = '' then leave
  1434.      DO j = 0 TO TOTALsn
  1435. /* do we already have this last name? */
  1436. /* if so, use its index for AddPtoSN below */
  1437.       if person.GETLASTNAME.i = sn.j then jj = j
  1438.       end
  1439. /* if not, then start a new FORM file SN# */
  1440.      if jj = TOTALsn then do
  1441.       sn.TOTALsn = person.GETLASTNAME.i
  1442.       Open('SN'TOTALsn,HTMLdir'/SN'TOTALsn,'w')
  1443.       WriteLn('SN'jj,person.GETLASTNAME.i)
  1444.       sn.jj = person.GETLASTNAME.i
  1445. /* sort by creating an index to the FORM files */
  1446.       sni.jj = jj
  1447.       new = sni.jj
  1448.       index = 0
  1449.       j = sni.index
  1450.       DO WHILE sn.j < sn.new
  1451.        index = index + 1
  1452.        j = sni.index
  1453.        end
  1454.       if index < jj then do
  1455.        DO k = jj TO index by -1
  1456.         l = k - 1
  1457.         sni.k = sni.l
  1458.         end
  1459.        sni.index = TOTALsn
  1460.        end
  1461.       TOTALsn = TOTALsn + 1
  1462.       end
  1463.      AddPtoSN(i,jj)
  1464.      end
  1465.     end
  1466.  
  1467.    else say '{'i'} is a null IRN'
  1468.     end
  1469.  
  1470.  /* close surname files and create INDEX page */
  1471.    if ~flags.MakeHTML then do
  1472.     say ' '
  1473.     say ' Creating INDEX page & METATAGS file.'
  1474.     say ' '
  1475.     if flags.MakeGuide then do
  1476.      Open('SNG',AGdir'/SN.guide','w')
  1477.      WriteLn('SNG','@database "'AGdir'/SN.guide"')
  1478.      WriteLn('SNG','@NODE Main "'flags.DBNAME' Genealogy"')
  1479.      WriteLn('SNG','@TOC 'AGdir'/GENEAFIL.guide/Main')
  1480.      end
  1481.  
  1482. /* Say 'Creating <META> tags' */
  1483.  
  1484.     Meta1n = '<META NAME="DESCRIPTION" CONTENT="'flags.DBNAME' Genealogy">'
  1485.     Meta2n = '<META NAME="KEYWORDS" CONTENT="'flags.DBNAME
  1486.     Meta2n = Meta2n||',family,family tree,genealogy'
  1487.     do j = 0 TO TOTALsn - 1
  1488.      k = sni.j
  1489.      ValidNameTest = hash(upper(substr(sn.k,1,1)))
  1490.      if ( 64 < ValidNameTest ) & ( ValidNameTest < 91 ) then
  1491.       Meta2n = Meta2n||','sn.k
  1492. /*     else say sn.k    */
  1493.      end
  1494.     Meta2n = Meta2n||'">'
  1495.     Meta3n = '<META NAME="AUTHOR" CONTENT="'flags.auth'">'
  1496.  
  1497.     if ( Meta2n ~= flags.Meta2 ) | ( Meta3n ~= flags.Meta3 )  then do
  1498.      Open('METATAGS',HTMLdir'/METATAGS','w')
  1499.      WriteLn('METATAGS',Meta1n)
  1500.      WriteLn('METATAGS',Meta2n)
  1501.      WriteLn('METATAGS',Meta3n)
  1502.      Close('METATAGS')
  1503.      flags.Meta1 = Meta1n
  1504.      flags.Meta2 = Meta2n
  1505.      flags.Meta3 = Meta3n
  1506.      MetaChanged = 1
  1507.      end
  1508.  
  1509. /* end <META> tag creation */
  1510.  
  1511.     Open('SN',HTMLdir'/SN.htm','w')
  1512.     WriteLn('SN','<HTML><HEAD>')
  1513.     WriteMeta('SN')
  1514.     WriteLn('SN','<TITLE>'flags.DBNAME' INDEX</TITLE>')
  1515.     WriteLn('SN','</HEAD><BODY BACKGROUND=st0ne.gif>')
  1516. /*
  1517.     WriteLn('SN','<TABLE BORDER=0><TR><TD BGCOLOR=00ffff>')
  1518.     WriteLn('SN','<A HREF='flags.GenPrefix'L.htm TARGET=MAIN><B>Table of Contents</A>')
  1519.     WriteLn('SN','</TD></TR></TABLE><HR>')
  1520. */
  1521.     WriteLn('SN','<B><I> INDEX :</I></B>')
  1522.  
  1523.     jj = TOTALsn - 1
  1524.     flagAleph = ' '
  1525.     DO j = 0 TO jj
  1526.      Close('SN'sni.j)
  1527.      index = 0
  1528.  
  1529.      Open('SN'sni.j,HTMLdir'/SN'sni.j,'r')
  1530.      snline = ReadLn('SN'sni.j)
  1531.  
  1532.      if flags.MakeGuide then do
  1533.       PersonPrefix = 'P'
  1534.       WriteLn('SNG','')
  1535.       WriteLn('SNG','  'snline)
  1536.       end
  1537.  
  1538.      if flagAleph ~= substr(snline,1,1) then WriteCh('SN','<HR>')
  1539.      else WriteCh('SN','<BR>')
  1540.  
  1541.      WriteLn('SN','<FORM><SELECT NAME="URL"')
  1542.      WriteLn('SN','onChange="if(this.options[this.selectedIndex].value!='qot'$'qot')')
  1543.      WriteLn('SN','{window.open(this.options[this.selectedIndex].value,'qot'MAIN'qot')}">')
  1544.      WriteLn('SN','<OPTION VALUE="$">'snline)
  1545.      snline.index = ReadLn('SN'sni.j)
  1546.      DO While ~EOF('SN'sni.j)
  1547.       pn.index = ReadLn('SN'sni.j)
  1548.       if index > 0 then do
  1549.  
  1550.        DO jndex = 0 TO index - 1
  1551.         if snline.index < snline.jndex then do
  1552.          svsnline = snline.index
  1553.          svpn = pn.index
  1554.  
  1555.          DO kndex = index - 1 TO jndex by - 1 
  1556.           lndex = kndex + 1
  1557.           snline.lndex = snline.kndex
  1558.           pn.lndex = pn.kndex
  1559.           end
  1560.          
  1561.          snline.jndex = svsnline
  1562.          pn.jndex = svpn
  1563.          end
  1564.         end
  1565.        end
  1566.       index = index + 1            /* given name sort */
  1567.       snline.index = ReadLn('SN'sni.j)
  1568.       end
  1569.  
  1570.      DO jndex = 0 TO index - 1
  1571.       WriteLn('SN','<OPTION VALUE=P'pn.jndex'.htm>'snline.jndex)
  1572.       if flags.MakeGuide then WriteLn('SNG',CheckGuideRepl('   <'pn.jndex'>',1))
  1573.       end
  1574.  
  1575.      Close('SN'sni.j)
  1576.      Delete(HTMLdir'/SN'sni.j)
  1577.      WriteLn('SN','</SELECT>')
  1578.      flagAleph = substr(snline,1,1)
  1579.      end
  1580. /*
  1581.     WriteLn('SN','<HR><TABLE BORDER=0><TR><TD BGCOLOR=ffff00><A HREF=Cred.htm')
  1582.     WriteLn('SN','TARGET=MAIN><B>Credits</A></TD></TR></TABLE>')
  1583. */
  1584.     WriteLn('SN','<HR><FORM name=buttons>')
  1585.     WriteCh('SN','<INPUT type=button value="Table of Contents" onClick=')
  1586.     WriteCh('SN',"'")
  1587.     WriteCh('SN','window.open(URL="'flags.GenPrefix'L.htm","_top")')
  1588.     WriteCh('SN',"'")
  1589.     WriteLn('SN','><HR>')
  1590.     WriteCh('SN','<INPUT type=button value=Credits onClick=')
  1591.     WriteCh('SN',"'")
  1592.     WriteCh('SN','window.open(URL="Cred.htm","_top")')
  1593.     WriteCh('SN',"'")
  1594.     WriteLn('SN','>')
  1595.     WriteLn('SN','</FORM>')
  1596.  
  1597.     WriteLn('SN','</BODY></HTML>')
  1598.     Close('SN')
  1599.     if flags.MakeGuide then do
  1600.      WriteLn('SNG','@ENDNODE')
  1601.      Close('SNG')
  1602.      end
  1603.     end
  1604.  /* end of INDEX processing */
  1605.  
  1606.   if flags.MakeGuide then do
  1607.    WriteLn('GenealogyGuide','_______________________________________________')
  1608.    WriteLn('GenealogyGuide','')
  1609.    WriteCh('GenealogyGuide','Definitions: ')
  1610.    if ~flags.bold then
  1611.     WriteCh('GenealogyGuide','@{b}bold=male@{ub}, @{i}italic=fem@{ui},')
  1612.    WriteLn('GenealogyGuide',' * birth, + death, ¶ more info')
  1613.    WriteLn('GenealogyGuide','_______________________________________________')
  1614.    WriteLn('GenealogyGuide','')
  1615.    WriteCh('GenealogyGuide','@{u}Credits:@{uu} ')
  1616.    WriteCh('GenealogyGuide','(@{i}AMIGA@{ui}) · ')
  1617.    WriteCh('GenealogyGuide','(Scion © @{b}Robbie J Akins@{ub}) · ')
  1618.    WriteLn('GenealogyGuide','(Scion2html.rexx © @{b}Harold Ipolyi@{ub})')
  1619.    WriteLn('GenealogyGuide','@ENDNODE')
  1620.    Close('GenealogyGuide')
  1621.    end
  1622.  
  1623.   WriteLn('GenealogyFile','</TR></TABLE>')
  1624.   WriteLn('GenealogyFile','</BODY></HTML>')
  1625.   Close('GenealogyFile')
  1626.   end
  1627.  
  1628. /* add META? */   
  1629.   if MetaChanged = 1 then do
  1630.    Say 'META has changed; Updating all files...'
  1631.    DO i = 1 TO LASTIRN
  1632.     if Exists(HTMLdir'/P'i'.htm') then do
  1633.      say 'P'i'.htm'
  1634.      Open('PERSONFILE',HTMLdir'/P'i'.htm','r')
  1635.      j = 0
  1636.      DO While ~EOF('PERSONFILE')
  1637.       j = j + 1
  1638.       line.j = ReadLn('PERSONFILE')
  1639.       if substr(line.j,1,5) = "<META" then j = j - 1
  1640.       end
  1641.      Close('PERSONFILE')
  1642.      Open('PERSONFILE',HTMLdir'/P'i'.htm','w')
  1643.      WriteLn('PERSONFILE',line.1)
  1644.      WriteMeta('PERSONFILE')
  1645.      do k = 2 to j
  1646.       WriteLn('PERSONFILE',line.k)
  1647.       end
  1648.      Close('PERSONFILE')
  1649.      end
  1650.     end
  1651.    Open('indexFile',HTMLdir'/index.html','r')
  1652.    say 'index.html'
  1653.    j = 0
  1654.    DO While ~EOF('indexFile')
  1655.     j = j + 1
  1656.     line.j = ReadLn('indexFile')
  1657.     if substr(line.j,1,5) = "<META" then j = j - 1
  1658.     end
  1659.    Close('indexFile')
  1660.    Open('indexFile',HTMLdir'/index.html','w')    
  1661.    WriteLn('indexFile',line.1)
  1662.    WriteMeta('indexFile')
  1663.    do k = 2 to j
  1664.     WriteLn('indexFile',line.k)
  1665.     end
  1666.    Close('indexFile')
  1667.    Open('GenealogyFile',HTMLdir'/'flags.GenPrefix'L.htm','r')
  1668.    say flags.GenPrefix'L.htm'
  1669.    j = 0
  1670.    DO While ~EOF('GenealogyFile')
  1671.     j = j + 1
  1672.     line.j = ReadLn('GenealogyFile')
  1673.     if substr(line.j,1,5) = "<META" then j = j - 1
  1674.     end
  1675.    Close('GenealogyFile')
  1676.    Open('GenealogyFile',HTMLdir'/'flags.GenPrefix'L.htm','w')    
  1677.    WriteLn('GenealogyFile',line.1)
  1678.    WriteMeta('GenealogyFile')
  1679.    do k = 2 to j
  1680.     WriteLn('GenealogyFile',line.k)
  1681.     end
  1682.    Close('GenealogyFile')
  1683.    end
  1684.  
  1685.  Say ' '
  1686.  Say ' '
  1687.  Say ' If you have not already done so, add the following anchor pointing to'
  1688.  Say ' "'GetLastName(flags.DBNAME)' Genealogy" to a HTML file (maybe HOME PAGE):  '
  1689.  Say ' '
  1690.  Say '      <A HREF=/'HTMLdir'/>'GetLastName(flags.DBNAME)' Genealogy</A>'
  1691.  Say ' '
  1692.  Say ' and/or:'
  1693.  Say ' '
  1694.  Say '      <A HREF=/'HTMLdir'/SN.htm>INDEX of 'GetLastName(flags.DBNAME)' surnames</A>'
  1695.  Say ' '
  1696.  Say ' and/or:'
  1697.  Say ' '
  1698.  Say '      <A HREF=/'HTMLdir'/'flags.GenPrefix'L.htm>Table of Contents</A>'
  1699.  Say ' '
  1700.  Say ' and maybe:'
  1701.  Say ' '
  1702.  
  1703.  GetPerComp(1)
  1704.  if flags.GenPrefix = "GENEAFI" then
  1705.   Say '      <A HREF=/'HTMLdir'/P1.htm>'person.GETFULLNAME.1'</A>'
  1706.  else
  1707.   Say '      <A HREF=/'HTMLdir'/'flags.GenPrefix'P1.htm>'person.GETFULLNAME.1'</A>'
  1708.  Say ' '
  1709.   end
  1710.  
  1711.  elapsedtime =  Time('e') - starttime
  1712.  
  1713.  spacer = substr(blanks,1,Length(elapsedtime))
  1714.  
  1715.  Say ' '
  1716.  Say '                                        'spacer'         '
  1717.  Say '  Scion2html.rexx completed normally in 'elapsedtime' seconds '
  1718.  Say '                                        'spacer'         '
  1719.  
  1720.  AskExit()
  1721.  
  1722.  EXIT    /* redundant */
  1723.  end
  1724.  
  1725. /*************************************************************************
  1726. *                                                                        *
  1727. *  Makeone procedure extracts data and creates page for a single person  *
  1728. *                                                                        *
  1729. *************************************************************************/
  1730.  
  1731. MakeOne: PROCEDURE EXPOSE person. flags. DBPATH AGdir HTMLdir TXTdir
  1732.  PARSE ARG ScionIRN
  1733.  
  1734. EXISTPERSON ScionIRN
  1735. if RESULT = 'YES' then do
  1736.  
  1737.  if flags.GenPrefix = "GENEAFI" then do
  1738.   PersonPrefix = "P"            /* Person file name prefix */
  1739.   FamilyPrefix = "F"            /* Family file name prefix */
  1740.   end
  1741.  else do
  1742.   PersonPrefix = flags.GenPrefix"P"    /* Person file name prefix */
  1743.   FamilyPrefix = flags.GenPrefix"F"    /* Family file name prefix */
  1744.   end
  1745.  
  1746.  if FamilyPrefix = PersonPrefix then do
  1747.   say ' FamilyPrefix MUST NOT EQUAL PersonPrefix'
  1748.   say ' 'FamilyPrefix'                           'PersonPrefix
  1749.   AskExit()
  1750.   EXIT
  1751.   end
  1752.  
  1753.  HasFileFATHER = 0
  1754.  HasFileMOTHER = 0
  1755.  HasMOTHER = 0
  1756.  HasFATHER = 0
  1757.  HasPARENTS = 0
  1758.  HasCHILDREN = 0
  1759.  DoGenText = 0
  1760.  'GETPARENTS' ScionIRN
  1761.  PARENTS = RESULT
  1762.  tPARENTSt = 't'PARENTS't'
  1763. /* Say 'PARENTS = 'PARENTS tPARENTSt    ??? EXISTPARENTS IRN ??? */
  1764.  if tPARENTSt ~= 'tt' then HasPARENTS = 1
  1765.  'GETMARRIAGE' ScionIRN 0    /*      ??? GETTOTMARRIAGES IRN ???     */
  1766.  MARRIAGE = RESULT
  1767.  tMARRIAGESt = 't'MARRIAGE't'
  1768. /*    Say 'MARRIAGES = 'MARRIAGE tMARRIAGESt        */
  1769.  if tMARRIAGESt ~= 'tMARRIAGEt' then do
  1770.   mFGRN = MARRIAGE
  1771.   'GETNUMCHILD' mFGRN
  1772.   if RESULT > 0 then HasCHILDREN = 1
  1773.  end
  1774. /*
  1775. Say 'PARENTS = 'PARENTS tPARENTSt 'MARRIAGES = 'MARRIAGES tMARRIAGESt 'HasPARENTS = 'HasPARENTS 'HasCHILDREN = 'HasCHILDREN
  1776. */
  1777.  if flags.MakeText & ( HasPARENTS + HasCHILDREN ) = 1 then doGenText = 1
  1778.  
  1779.  GetPerComp(ScionIRN)
  1780.  
  1781.  if person.GETFULLNAME.ScionIRN = "" then return    /* nobody home */
  1782.  
  1783.  if ( flags.living > 0 ) & ( person.GETDEATHDATE.ScionIRN = "" ) then do
  1784. /*    say HTMLdir'/'PersonPrefix''ScionIRN'.htm'    */
  1785.   if Exists(HTMLdir'/'PersonPrefix''ScionIRN'.htm') then do
  1786.    Delete(HTMLdir'/'PersonPrefix''ScionIRN'.htm')
  1787.    end
  1788.   return 0
  1789.   end
  1790.  
  1791.  'GETBAPTISMDATE' ScionIRN
  1792.  BAPTISMDATE = RESULT
  1793.  'GETRELIGION' ScionIRN
  1794.  RELIGION = RESULT
  1795.  'GETBAPTISMPLACE' ScionIRN
  1796.  BAPTISMPLACE = RESULT
  1797.  'GETBURIALDATE' ScionIRN
  1798.  BURIALDATE = RESULT
  1799.  'GETBURIALPLACE' ScionIRN
  1800.  BURIALPLACE = RESULT
  1801.  'GETDIEDOF' ScionIRN
  1802.  DIEDOF = RESULT
  1803.  'GETEDUCATION' ScionIRN
  1804.  EDUCATION = RESULT
  1805.  'GETOCCUPATION' ScionIRN
  1806.  OCCUPATION = RESULT
  1807.  'GETPERSCOMMENT' ScionIRN
  1808.  PERSCOMMENT = RESULT
  1809.  'GETPERSREFS' ScionIRN
  1810.  PERSREFS = RESULT
  1811.  
  1812. /*
  1813.  ValidInfo = 0
  1814.  if LASTNAME||BIRTHDATE||BIRTHPLACE||DEATHDATE||DEATHPLACE||BURIALPLACE||RELIGION||DIEDOF||EDUCATION||OCCUPATION||PERSCOMMENT||PERSREFS ~= "" THEN ValidInfo = 1
  1815.  if ~ValidInfo then do
  1816. Say "Person " ScionIRN"'s lacking information; no new HTML file being created!"
  1817.   return
  1818.   end
  1819.  if flags.MakeText & ( ValidInfo | LASTNAME ~= "" ) then DoGenText = 1
  1820. */
  1821.  if flags.MakeText then DoGenText = 1
  1822.  PfilN = PersonPrefix || ScionIRN
  1823.  
  1824.  dPfilN = HTMLdir'/'PfilN
  1825.  iPfilN = 'img/'PersonPrefix || ScionIRN
  1826.  gPfilN = AGdir'/'PfilN
  1827.  if flags.verbose then do
  1828.   Say ''
  1829.   Say ' HTML:  'dPfilN'.htm  for: 'person.GETFULLNAME.ScionIRN' {'ScionIRN'}'
  1830.   end
  1831.  else Say '  {'ScionIRN'}    'person.GETFULLNAME.ScionIRN
  1832.  Open('PERSONFILE',dPfilN'.htm','w')
  1833.  WriteLn('PERSONFILE','<HTML><HEAD>')
  1834.  WriteMeta('PERSONFILE')
  1835.  WriteLn('PERSONFILE','<TITLE>'person.GETFULLNAME.ScionIRN'</TITLE>')
  1836.  WriteLn('PERSONFILE','</HEAD><BODY BACKGROUND=st0ne.gif>')
  1837.  WriteLn('PERSONFILE','<FORM name=buttons>')
  1838.  WriteCh('PERSONFILE','<INPUT type=button value=Index onClick=')
  1839.  WriteCh('PERSONFILE',"'")
  1840.  WriteCh('PERSONFILE','window.open(URL="index.html","_top")')
  1841.  WriteCh('PERSONFILE',"'")
  1842.  WriteLn('PERSONFILE','>')
  1843.  
  1844.  if flags.MakeGuide then do
  1845.   if flags.verbose then 
  1846.    Say 'Guide:  'gPfilN'.guide  for: 'person.GETFULLNAME.ScionIRN' {'ScionIRN'}'
  1847.   Open('PERSONGuide',gPfilN'.guide','w')
  1848.   WriteLn('PERSONGuide','@database "'gPfilN'.guide"')
  1849.   WriteLn('PERSONGuide','@NODE Main "'person.GETFULLNAME.ScionIRN' Genealogy"')
  1850.   WriteLn('PERSONGuide','@TOC 'AGdir'/'flags.GenPrefix'L.guide/Main')
  1851.   WriteLn('PERSONGuide','@INDEX 'AGdir'/SN.guide/Main')
  1852.   WriteCh('PERSONGuide',person.GETFULLNAME.ScionIRN)
  1853.   end
  1854.  
  1855.  PPIRN = PERSP(ScionIRN)
  1856.  if Exists(PPIRN) & flags.DoPictures then do
  1857.   if flags.RemakeThumb = 1 then do
  1858.    DELETE(dPfilN'.GIF')
  1859.    DELETE(dPfilN'.JPEG')
  1860.    if Exists(dPfilN'.GIF') | Exists(dPfilN'.JPEG') then
  1861. say '<=====> IN USE <=====> cannot modify 'dPfilN' thumbnail'
  1862.    end
  1863.  
  1864.   if AgeTest(PPIRN, dPfilN'.jpg') then do
  1865.    Delete(dPfilN'.'flags.Thmbfmt)
  1866.    end
  1867.  
  1868.   WriteCh('PERSONFILE','<center><A HREF='PfilN'A.htm>')
  1869.   WriteLn('PERSONFILE','<IMG SRC='PfilN'.'flags.Thmbfmt'></A></center>')
  1870.   end
  1871.  
  1872.  WriteLn('PERSONFILE','<PRE><TT><P>')
  1873.  WriteCh('PERSONFILE',person.MGETFULLNAME.ScionIRN)
  1874.  PNIRN = PERSN(ScionIRN)
  1875.  if Exists(PNIRN) then do
  1876.   if flags.verbose then Say 'Writing info ¶ file 'dPfilN'I.htm'
  1877.   Open('PNDBNAME',PNIRN,'r')
  1878.   Open('PERSONI',dPfilN'I.htm','w')
  1879.   if flags.MakeGuide then do
  1880.    if flags.verbose then Say 'Writing info ¶ file 'gPfilN'I.guide'
  1881.    Open('PERSONGI',gPfilN'I.guide','w')
  1882.    WriteLn('PERSONGI','@database "'gPfilN'I.guide"')
  1883.    WriteLn('PERSONGI','@NODE Main "'person.GETFULLNAME.ScionIRN' Information."')
  1884.    WriteLn('PERSONGI','@TOC 'AGdir'/'flags.GenPrefix'L.guide/Main')
  1885.    WriteLn('PERSONGI','@INDEX 'AGdir'/SN.guide/Main')
  1886.    end
  1887.   WriteLn('PERSONI','<HTML><HEAD>')
  1888.   WriteLn('PERSONI','<meta name="robots" content="noindex,nofollow">')
  1889.   WriteLn('PERSONI','<TITLE>'person.GETFULLNAME.ScionIRN' Information</TITLE>')
  1890.   WriteLn('PERSONI','</HEAD><BODY BACKGROUND=st0ne.gif>')
  1891.   WriteCh('PERSONI','<H3><A HREF='PfilN'.htm>'person.MGETFULLNAME.ScionIRN)
  1892.   WriteCh('PERSONI','</A> Information.</H3>')
  1893. /*
  1894.  (<A HREF='flags.GenPrefix'L.htm>')
  1895.   WriteCh('PERSONI',flags.htmlb'Personae list'flags.htmlub'</A>) ('flags.htmlb)
  1896.   WriteLn('PERSONI','<A HREF=SN.htm>INDEX'flags.htmlub'</A>)</H3>')
  1897. */
  1898.   WriteLn('PERSONI','<PRE><TT>')
  1899.   if DoGenText then
  1900.    WriteLn('GenealogyText',person.PGETFULLNAME.ScionIRN' Information.')
  1901.   DO While ~EOF('PNDBNAME')
  1902.    line = ReadLn('PNDBNAME')
  1903.    WriteLn('PERSONI',CheckForReplacement(line))
  1904.    if flags.MakeGuide  | DoGenText then line = TagStrip(line)
  1905.    if flags.MakeGuide then WriteLn('PERSONGI',CheckGuideRepl(line))
  1906.    if DoGenText then WriteLn('GenealogyText',CheckForNAReplacement(line))
  1907.    end
  1908.   Close('PNDBNAME')
  1909.   if DoGenText then WriteLn('GenealogyText',' ')
  1910.   WriteLn('PERSONI','</TT></PRE>')
  1911.   WriteLn('PERSONI','</BODY></HTML>')
  1912.   Close('PERSONI')
  1913.   if flags.MakeGuide then do
  1914.    WriteLn('PERSONGI','@ENDNODE')
  1915.    Close('PERSONGI')
  1916.    end
  1917. /*
  1918.   WriteCh('PERSONFILE',' (<A HREF='PfilN'I.htm> ¶ </A>)')
  1919. */
  1920.   WriteCh('PERSONFILE',' <INPUT type=button value=¶ onClick=')
  1921.   WriteCh('PERSONFILE',"'")
  1922.   WriteCh('PERSONFILE','window.open(URL="'PfilN'I.htm","_self")')
  1923.   WriteCh('PERSONFILE',"'")
  1924.   WriteCh('PERSONFILE','>')
  1925.  
  1926.   if flags.MakeGuide then
  1927.    WriteCh('PERSONGuide',' @{" More Info (¶) " LINK 'gPfilN'I.guide/Main}')   
  1928.   end
  1929.  
  1930.  if Exists(PPIRN) then do
  1931.   if flags.MakeGuide then do
  1932.    WriteCh('PERSONGuide',' @{" Picture (®) " RXS "address command ')
  1933.    WriteCh('PERSONGuide',"'"flags.VIEWER" ")
  1934.    WriteCh('PERSONGuide',PPIRN"'"'"')
  1935.    WriteCh('PERSONGuide','}')
  1936.    end
  1937.  
  1938.  if flags.MakeGuide then do
  1939.   PSIRN = PERSS(ScionIRN)
  1940.   if Exists(PSIRN) then do
  1941.    WriteCh('PERSONGuide',' @{" Audio (Æ) " RXS "address command ')
  1942.    WriteCh('PERSONGuide',"'"flags.PLAYER" ")
  1943.    WriteCh('PERSONGuide',PSIRN"'"'"')
  1944.    end
  1945.   WriteLn('PERSONGuide','')
  1946.   end
  1947.  
  1948.   if flags.DoPictures then do
  1949.    if ~Exists(dPfilN'.jpg') then do
  1950.     Say 'Creating picture 'dPfilN'.jpg'
  1951. /*
  1952. Say 'Sys:Tools/GfxCon 'PPIRN' TO 'dPfilN'.jpg FORMAT JPEG QUALITY 90'
  1953. */
  1954. OldStackSize = pragma('s',21000)
  1955.  
  1956. /* Dave C. change */
  1957. if upper(right(PPIRN,3))="JPG" then
  1958.  address command 'copy 'PPIRN' to 'dPfilN'.jpg'
  1959. else
  1960.  address command 'Sys:Tools/GfxCon 'PPIRN' TO 'dPfilN'.jpg FORMAT JPEG QUALITY 90'
  1961. /* Dave C. change */
  1962.  
  1963. call pragma('s',OldStackSize)
  1964.     end
  1965.    if Exists(dPfilN'.'flags.Thmbfmt) then do
  1966.     if flags.verbose then Say '  ~ image 'dPfilN'.'flags.Thmbfmt'  ...OK... '
  1967.     end
  1968.    else do
  1969.     if flags.verbose then Say 'Creating image 'dPfilN'.'flags.Thmbfmt
  1970. /*
  1971. Say 'Sys:Tools/GfxCon 'dPfilN'.jpg TO 'dPfilN'.'flags.Thmbfmt' FORMAT 'flags.Thmbfmt' BOXFIT 'flags.Thumbnail' 'flags.Thumbnail
  1972. */
  1973. OldStackSize = pragma('s',21000)
  1974. address command 'Sys:Tools/GfxCon 'dPfilN'.jpg TO 'dPfilN'.'flags.Thmbfmt' FORMAT 'flags.Thmbfmt' BOXFIT 'flags.Thumbnail' 'flags.Thumbnail
  1975. call pragma('s',OldStackSize)
  1976.     end                   
  1977. /*
  1978. WriteCh('PERSONFILE',' (<A HREF='PfilN'A.htm>'flags.htmlb' ® 'flags.htmlub'</A>)')
  1979. */
  1980.    WriteCh('PERSONFILE',' <INPUT type=button value=® onClick=')
  1981.    WriteCh('PERSONFILE',"'")
  1982.    WriteCh('PERSONFILE','window.open(URL="'PfilN'A.htm","_self")')
  1983.    WriteCh('PERSONFILE',"'")
  1984.    WriteCh('PERSONFILE','>')
  1985.  
  1986.    if Exists(dPfilN'A.htm') then do
  1987.     if flags.verbose then Say '  ~ picture album 'dPfilN'A.htm  ...OK... '
  1988.     end
  1989.    else do
  1990.     if flags.verbose then Say 'Creating picture album ® 'dPfilN'A.htm'
  1991.     Open('PERSONP',dPfilN'A.htm','w')
  1992.     WriteLn('PERSONP','<HTML><HEAD>')
  1993.     WriteLn('PERSONP','<meta name="robots" content="noindex,nofollow">')
  1994.     WriteLn('PERSONP','<TITLE>'person.GETFULLNAME.ScionIRN)
  1995.     WriteLn('PERSONP',' Picture Album</TITLE><H3>')
  1996.     WriteLn('PERSONP','</HEAD><BODY BACKGROUND=st0ne.gif><center>')
  1997.     WriteLn('PERSONP',' ')
  1998.     WriteLn('PERSONP',' <!--  picture source: 'PPIRN' -->')
  1999.     WriteCh('PERSONP','<IMG SRC='PfilN'.jpg><P>')
  2000.     WriteCh('PERSONP',person.MGETFULLNAME.ScionIRN)
  2001.     WriteCh('PERSONP','<P>Picture Album</center><HR>')
  2002.     WriteLn('PERSONP',' ')
  2003.     WriteLn('PERSONP',' ')
  2004.     WriteLn('PERSONP','<A HREF=PAlbum.htm alt='iPfilN'A1.jpg>')
  2005.     WriteLn('PERSONP','<img alt="Picture Album hints" src='iPfilN'A1.'flags.Thmbfmt'></A>')
  2006.     WriteLn('PERSONP',' ')
  2007.     WriteLn('PERSONP',' ')
  2008.     WriteLn('PERSONP','</BODY></HTML>')
  2009.     Close('PERSONP')
  2010.     end
  2011.    if flags.Pexpln ~= 101 then do
  2012.     flags.Pexpln = 101
  2013.     Open('PAlbum',HTMLdir'/PAlbum.htm','w')
  2014.     WriteLn('PAlbum','<HTML><HEAD>')
  2015.     WriteLn('PAlbum','<meta name="robots" content="noindex,nofollow">')
  2016.     WriteLn('PAlbum','<TITLE>Picture Album hints</TITLE>')
  2017.     WriteLn('PAlbum','</HEAD><BODY BACKGROUND=st0ne.gif>')
  2018.     WriteLn('PAlbum','<HR><HR><H2><B>Use the PICTURE option in the main menu!</B></H2><HR><HR>')
  2019.     WriteLn('PAlbum','<PRE><TT>')
  2020.     WriteCh('PAlbum','<A HREF=img/PnnA1.jpg><IMG SRC=img/PnnA1.'flags.Thmbfmt'></A>')
  2021.     WriteCh('PAlbum',' - another JPEG picture anchored by ')
  2022.     WriteLn('PAlbum','thumbnail image created by:<P>')
  2023.     WriteLn('PAlbum','Copying source picture to: 'HTMLdir'/img/PnnA1.jpg<P>')
  2024.     WriteCh('PAlbum','GfxCon 'HTMLdir'/img/PnnA1.jpg TO 'HTMLdir'/img/PnnA1.'flags.Thmbfmt' FORMAT ')
  2025.     WriteCh('PAlbum',flags.Thmbfmt' BOXFIT 'flags.Thumbnail' 'flags.Thumbnail)
  2026.     WriteLn('PAlbum','<P></PRE></TT><HR><BR><BR>')
  2027.     WriteLn('PAlbum',flags.htmlb'Edit'flags.htmlub' 'HTMLdir'/img/PnnA.htm 'flags.htmlb'to add more pictures to the Picture Album - A2, A3, etc.<P>')
  2028.     WriteLn('PAlbum','All extra pictures should be in img sub-dir<P>')
  2029.     WriteCh('PAlbum','CAUTION:<P> deleting Directory:'flags.htmlub' 'HTMLdir' 'flags.htmlb'destroys all Picture ')
  2030.     WriteCh('PAlbum',' Album modifications and the img sub-dir<P>')
  2031.     WriteLn('PAlbum',' YOUR WORK WILL BE LOST !'flags.htmlub'')
  2032.     WriteLn('PAlbum','</BODY></HTML>')
  2033.     Close('PAlbum')
  2034.     end
  2035.    end
  2036.   end
  2037.  
  2038.  WriteLn('PERSONFILE','')
  2039. /* ---- 
  2040.  WriteCh('PERSONFILE',' (<A HREF='flags.GenPrefix'L.htm>'flags.htmlb'Personae list'flags.htmlub'</A>) ('flags.htmlb)
  2041.  WriteLn('PERSONFILE','<A HREF=SN.htm>INDEX'flags.htmlub'</A>)')
  2042. */
  2043.  
  2044.  if flags.VERSION > 5 then do
  2045.   'GETPERSADDR' ScionIRN
  2046.   PARSE VAR RESULT addr1 '$' addr2 '$' addr3 '$' addr4 '$' addr5 flags.BRKCHAR
  2047.   'GETPERSPHONE' ScionIRN
  2048.   PARSE VAR RESULT tel1 ',' tel2  ',' tel3 ',' tel4 ',' tel5
  2049.   p_name = addr1''addr2''addr3''addr4''addr5''tel1''tel2''tel3''tel4''tel5
  2050.   if p_name ~= '' then do
  2051.    PersOutputCr(1)
  2052.    WriteCh('PERSONFILE','<ADDRESS>')
  2053.    PersOutputCh(addr1''addr2''addr3''addr4''addr5''email(tel1)''email(tel2)''email(tel3)''email(tel4)''email(tel5),1)
  2054.    WriteLn('PERSONFILE','</ADDRESS>')
  2055.    PersOutputCr(1)
  2056.    end
  2057.   end
  2058.    
  2059.  if DoGenText then do
  2060.   if flags.target ~= "NORMAL" then
  2061.    Say 'ASCII:  'TXTdir'/G'ScionIRN'  for 'person.GETFULLNAME.ScionIRN' {'ScionIRN'}'
  2062.   WriteLn('GenealogyText','')
  2063.   WriteLn('GenealogyText','-----------------------------------------------------------')
  2064.   WriteLn('GenealogyText','')
  2065.   WriteLn('GenealogyText',person.PGETFULLNAME.ScionIRN' Data Sheet')
  2066.   end
  2067.  if person.GETBIRTHDATE.ScionIRN || person.GETBIRTHPLACE.ScionIRN ~= "" then do
  2068.   if person.GETBIRTHDATE.ScionIRN ~= "" then
  2069.    PersOutputCh('Born: 'person.GETBIRTHDATE.ScionIRN' * ',0)
  2070.   if person.GETBIRTHPLACE.ScionIRN ~= "" then
  2071.    PersOutputCh(person.GETBIRTHPLACE.ScionIRN,0)
  2072.   PersOutputCr()
  2073.   end
  2074.  if BAPTISMDATE || BAPTISMPLACE || RELIGION ~= "" then do
  2075.   PersOutputCh('Baptised: ')
  2076.   PersOutputCh(BAPTISMDATE' ')
  2077.   if RELIGION ~= "" then PersOutputCh('{'RELIGION'} ',0)
  2078.   if BAPTISMPLACE ~= "" then PersOutputCh(BAPTISMPLACE,0)
  2079.   PersOutputCr()
  2080.   end
  2081.  if person.GETDEATHDATE.ScionIRN ~= "" & person.GETDEATHDATE.ScionIRN ~= "dead" then do
  2082.   PersOutputCh('Died: 'person.GETDEATHDATE.ScionIRN,0)
  2083.   if person.GETDEATHPLACE.ScionIRN ~= "" then
  2084.    PersOutputCh(' + 'person.GETDEATHPLACE.ScionIRN,0)
  2085.   if BURIALPLACE ~= "" | BURIALDATE ~= "" then do
  2086.    PersOutputCh(' . Buried: ')
  2087.    if BURIALPLACE ~= "" then PersOutputCh(BURIALPLACE,0)
  2088.    if BURIALDATE ~= "" then PersOutputCh(' 'BURIALDATE,0)
  2089.    end
  2090.   PersOutputCr()
  2091.   end
  2092.  else do
  2093.   if person.GETDEATHPLACE.ScionIRN ~= "" then
  2094.    PersOutputLn(person.GETDEATHPLACE.ScionIRN,1)
  2095.   if BURIALPLACE ~= "" then PersOutputLn(BURIALPLACE,1)
  2096.   end
  2097.  if DIEDOF ~= "" then PersOutputLn('Cause of Death: 'DIEDOF,1)
  2098.  if EDUCATION ~= "" then PersOutputLn('Education: 'EDUCATION,1)
  2099.  if OCCUPATION ~= "" then PersOutputLn('Occupation: 'OCCUPATION,1)
  2100.  if PERSCOMMENT ~= "" then PersOutputLn('Comments: 'PERSCOMMENT,1)
  2101.  if PERSREFS ~= "" then PersOutputLn('References: 'PERSREFS,1)
  2102.  
  2103. /* end of personal data; start family tree segment */
  2104.  
  2105.  PersOutputHL()
  2106.  HeadLine = ''
  2107.  if HasPARENTS then HeadLine = HeadLine' ·Parents '
  2108.  'GETNUMSIB' ScionIRN
  2109.  xtra = ''
  2110.  if RESULT > 1 then xtra = 's'
  2111.  if RESULT > 0 then HeadLine = HeadLine' ·Sibling'xtra' '
  2112.  'GETNUMMARRY' ScionIRN
  2113.  xtra = ''
  2114.  if RESULT > 1 then xtra = 's'
  2115.  if RESULT > 0 then HeadLine = HeadLine' ·Spouse'xtra' '
  2116.  'GETTOTALCHILD' ScionIRN
  2117.  xtra = 'Child'
  2118.  if RESULT > 1 then xtra = xtra'ren'
  2119.  if RESULT > 0 then HeadLine = HeadLine' ·'xtra
  2120.  PersOutputLn('Immediate Family: 'HeadLine,0)
  2121.  if DoGenText then WriteLn('GenealogyText','')
  2122.  if HasPARENTS then do
  2123.   'GETPRINCIPAL' PARENTS
  2124.   PRINCIPAL = RESULT
  2125.   'GETSPOUSE' PARENTS
  2126.   SPOUSE = RESULT
  2127.   'GETMARRYDATE' PARENTS
  2128.   PARENTSMARRIAGEDATE = RESULT
  2129.   'GETMARRYPLACE' PARENTS
  2130.   PARENTSmFGRNPLACE = RESULT
  2131.   'GETSEX' PRINCIPAL
  2132.   if RESULT = 'M' then do
  2133.    FATHERIRN = PRINCIPAL
  2134.    MOTHERIRN = SPOUSE
  2135.    end
  2136.   else do
  2137.    FATHERIRN = SPOUSE
  2138.    MOTHERIRN = PRINCIPAL
  2139.    end
  2140.   GetPerComp(FATHERIRN)
  2141.   if person.GETFIRSTNAME.FATHERIRN||person.GETLASTNAME.FATHERIRN ~= "" then
  2142.    HasFATHER = 1
  2143.   GetPerComp(MOTHERIRN)
  2144.   if person.GETFIRSTNAME.MOTHERIRN||person.GETLASTNAME.MOTHERIRN ~= "" then
  2145.    HasMOTHER = 1
  2146.  
  2147.   if FATHERLASTNAME ~= "" then do
  2148.    HasFileFATHER = 1
  2149.    FATHERFILENAME = PersonPrefix || FATHERIRN
  2150.    end
  2151.  
  2152.   if MOTHERLASTNAME ~= "" then do
  2153.    HasFileMOTHER = 1
  2154.    MOTHERFILENAME = PersonPrefix || MOTHERIRN
  2155.    end
  2156.  
  2157.   if HasFileFATHER then do
  2158.    PersOutputCh('  <'FATHERIRN'>',1)
  2159. /*
  2160.    if PARENTSMARRIAGEDATE ~= "" then PersOutputCh(' X ',0)
  2161.    else PersOutputCh(' ///\',0)
  2162. */
  2163.    PersOutputCh(' ///\',0)
  2164.    end
  2165.   PersOutputCh('<'MOTHERIRN'>',1)
  2166.   if ( flags.living = 0 ) then do
  2167.    if ( person.GETDEATHDATE.FATHERIRN||person.GETDEATHDATE.MOTHERIRN = "" ) then do
  2168.  
  2169.     if PARENTSMARRIAGEDATE ~= "" then PersOutputCh(' x 'PARENTSMARRIAGEDATE,0)
  2170.     if PARENTSmFGRNPLACE ~= "" then PersOutputCh(' @ 'PARENTSmFGRNPLACE,0)
  2171.     end
  2172.    end
  2173.   PersOutputCr()
  2174.   spcs = '  |'
  2175.   DO i = 0 TO Length(FATHERFULLNAME) /* ################ */
  2176.    spcs = spcs' '     /* ??? GETFAMLBL1 ??? */
  2177.   end            /* ??? GETFAMLBL2 ??? */
  2178.  
  2179.  Minfo = Exists(FAMN(PARENTS))
  2180.  if PARENTSmFGRNCELEBRANT ~= '' | Minfo then do
  2181.   if DoGenText then WriteLn('GenealogyText','  |')   
  2182.   'GETNUMCHILD' PARENTS
  2183.   TOTCHILDREN = RESULT
  2184. /* say 'TOTCHILDREN = 'TOTCHILDREN */
  2185.   DO i = 0 TO TOTCHILDREN - 1
  2186.    'GETCHILD' PARENTS i
  2187.    PARENTSc = RESULT
  2188.    GETPerComp(PARENTSc)
  2189.    if person.GETFIRSTNAME.PARENTSc ~= "" then do
  2190.     if PARENTSc ~= ScionIRN then do
  2191.      LastNameFl = 1
  2192.      if person.GETLASTNAME.PARENTSc = person.GETLASTNAME.FATHERIRN then do
  2193.       LastNameFl = -1
  2194.       LastNameVal = person.GETLASTNAME.FATHERIRN
  2195.       end
  2196.      PersOutputCh('  |_',0)
  2197.      PersOutputCh('<'PARENTSc'>',LastNameFl)
  2198.      LastNameFl = 1
  2199.      BirthDeath(PARENTSc)
  2200.      PersOutputCr()
  2201.      end
  2202.     end
  2203.    end
  2204.   end
  2205.   PersOutputLn('  |',0)
  2206.  END
  2207.  
  2208. /* end of parents, siblings segment; start marriages segment */
  2209.  
  2210. vert.0 = ''
  2211. vert.1 = '|'
  2212. 'GETNUMMARRY' ScionIRN
  2213. TOTMARRIAGES = RESULT
  2214. /* say 'TOTMARRIAGES = 'TOTMARRIAGES */
  2215. DO i = 0 TO TOTMARRIAGES
  2216.  'GETMARRIAGE' ScionIRN i
  2217.  MARRIAGE = RESULT               /* use: 'EXISTFAMILY'   */
  2218.  if MARRIAGE > -1 then do
  2219.   MARRIAGES = i
  2220.   j = i + 1
  2221.   vert.j = vert.1||vert.i
  2222.   end
  2223.  end
  2224. tMARRIAGESt = 't'MARRIAGES't'
  2225.  PersOutputCh('  |_',0) 
  2226.  if tMARRIAGESt ~= 'tMARRIAGESt' then do
  2227.   DO i = 0 TO MARRIAGES
  2228.    'GETMARRIAGE' ScionIRN i
  2229.    mFGRN = RESULT
  2230.    if mFGRN ~= "" then do
  2231.     ki = MARRIAGES - i + 1
  2232.     if ki ~= MARRIAGES + 1 then PersOutputLn('    'vert.ki,0)
  2233.     j = MARRIAGES + 1 - i
  2234.     'GETSPOUSE' mFGRN
  2235.     SPOUSE = RESULT
  2236.     GetPerComp(SPOUSE)
  2237.     if SPOUSE = ScionIRN then do
  2238.      'GETPRINCIPAL' mFGRN
  2239.      SPOUSE = RESULT
  2240.      end
  2241.     'GETMARRYDATE' mFGRN
  2242.     MARRIAGEDATE = RESULT
  2243.     'GETMARRYPLACE' mFGRN
  2244.     mFGRNPLACE = RESULT
  2245.  
  2246.     SPOUSEFILENAME = PersonPrefix || SPOUSE
  2247.  
  2248.     if i = 0 then do
  2249. /*
  2250.      if MARRIAGEDATE ~= "" then PersOutputCh('<'ScionIRN'> X ',1)
  2251.      else PersOutputCh('<'ScionIRN'> ///\',1)
  2252. */
  2253.      PersOutputCh('<'ScionIRN'> ///\',1)
  2254.      PersOutputCh('<'SPOUSE'>',1)
  2255.      end
  2256.  
  2257.     else do
  2258. /*
  2259.      if ( MARRIAGEDATE ~= "" ) then PersOutputCh('    'vert.j'_X',0)
  2260.      else PersOutputCh('    'vert.j'_ ///\',0)
  2261. */
  2262.      PersOutputCh('    'vert.j'_ ///\',0)
  2263.      PersOutputCh('<'SPOUSE'>',1)
  2264.      end
  2265.  
  2266.     blockinfo = ( flags.living > 0 ) & ( person.GETDEATHDATE.SPOUSE = "" )
  2267.  
  2268.     if ~blockinfo then do
  2269.  
  2270.      if MARRIAGEDATE ~= "" then PersOutputCh(' x 'MARRIAGEDATE,0)
  2271.      if mFGRNPLACE ~= "" then PersOutputCh(' @ 'mFGRNPLACE,0)
  2272.      PersOutputCr()
  2273.      jk = MARRIAGES - i
  2274.      spcs = '    'vert.jk'    |'
  2275.  
  2276.      FfilN = HTMLdir'/'FamilyPrefix || mFGRN
  2277.      gFfilN = AGdir'/'FamilyPrefix || mFGRN
  2278.      iFfilN = HTMLdir'/img/'FamilyPrefix || mFGRN
  2279.      Minfo = 0
  2280.  
  2281.      FAMNIRN = FAMN(mFGRN)
  2282.      if Exists(FAMNIRN) then do
  2283.       Minfo = 1
  2284.  
  2285.       if flags.MakeGuide then do
  2286.        if flags.verbose then Say 'Writing info ¶ file 'gFfilN'I.guide'
  2287.        Open('FAMILYGI',gFfilN'I.guide','w')
  2288.        WriteLn('FAMILYGI','@database "'gFfilN'I.guide"')
  2289.        WriteCh('FAMILYGI','@NODE Main "'person.MGETFULLNAME.ScionIRN' & ')
  2290.        WriteLn('FAMILYGI',person.MGETFULLNAME.SPOUSE' Family Information."')
  2291.        WriteLn('FAMILYGI','@TOC 'AGdir'/'flags.GenPrefix'L.guide/Main')
  2292.        WriteLn('FAMILYGI','@INDEX 'AGdir'/SN.guide/Main')
  2293. /*
  2294.        if Exists(FAMP(mFGRN)) then do
  2295.         WriteCh('PERSONGuide',spcs' @{" Picture (®) " RXS "address command ')
  2296.         WriteCh('PERSONGuide',"'"flags.VIEWER" ")
  2297.         WriteCh('PERSONGuide',FAMP(mFGRN)"'"'"')
  2298.         WriteLn('PERSONGuide','}')
  2299.         end
  2300. */
  2301.        end
  2302.  
  2303.       if flags.verbose then Say 'Writing info ¶ file 'FfilN'I.htm'
  2304.       Open('FNDBNAME',FAMNIRN,'r')
  2305.       Open('FAMILYI',FfilN'I.htm','w')
  2306.       WriteLn('FAMILYI','<HTML><HEAD>')
  2307.       WriteLn('FAMILYI','<meta name="robots" content="noindex,nofollow">')
  2308.       WriteCh('FAMILYI','<TITLE>'person.MGETFULLNAME.ScionIRN' & ')
  2309.       WriteLn('FAMILYI',person.MGETFULLNAME.SPOUSE' Family Information</TITLE>') 
  2310.       WriteLn('FAMILYI','</HEAD><BODY BACKGROUND=st0ne.gif>')
  2311.  
  2312.       FAMP = FAMP(mFGRN)
  2313.       if Exists(FAMP) & flags.DoPictures then do
  2314.        WriteCh('FAMILYI','<A HREF='FamilyPrefix || mFGRN'A.htm')
  2315.        WriteCh('FAMILYI','><IMG SRC='FamilyPrefix || mFGRN'.'flags.Thmbfmt'></A>')
  2316.        end
  2317.  
  2318.       if flags.MakeGuide then do
  2319.        FSIRN = FAMS(mFGRN)
  2320.        if Exists(FSIRN) then do
  2321.         WriteCh('FAMILYGI',' @{" Audio (Æ) " RXS "address command ')
  2322.         WriteCh('FAMILYGI',"'"flags.PLAYER" ")
  2323.         WriteCh('FAMILYGI',FSIRN"'"'"')
  2324.         end
  2325.        WriteLn('FAMILYGI','')
  2326.        end
  2327.  
  2328.       WriteCh('FAMILYI','<H3>Family of 'person.MGETFULLNAME.ScionIRN' & ')
  2329.  
  2330.       if SPOUSE ~= '' then WriteCh('FAMILYI',person.MGETFULLNAME.SPOUSE)
  2331.       else WriteCh('FAMILYI','______')
  2332.  
  2333. /*
  2334.       if Exists(FAMP(mFGRN)) & flags.DoPictures then do
  2335.        WriteCh('FAMILYI',' (<A HREF='FamilyPrefix || mFGRN'A.htm')
  2336.        WriteCh('FAMILYI','>'flags.htmlb' ® 'flags.htmlub'</A>) ')
  2337.        end
  2338. */
  2339.  
  2340.       WriteCh('FAMILYI',' (<A HREF='flags.GenPrefix'L.htm>')
  2341.       WriteLn('FAMILYI',flags.htmlb'Personae list'flags.htmlub'</A>) ('flags.htmlb)
  2342.       WriteLn('FAMILYI','<A HREF=SN.htm>INDEX'flags.htmlub'</A>)</H3>')
  2343.       DO While ~EOF('FNDBNAME')
  2344.        line = ReadLn('FNDBNAME')
  2345.        WriteLn('FAMILYI',CheckForReplacement(line))
  2346.        if flags.MakeGuide then WriteLn('FAMILYGI',CheckForNAReplacement(line))
  2347. /*
  2348. if DoGenText then WriteLn('GenealogyText',spcs'  'CheckForNAReplacement(line))
  2349. */
  2350.        end
  2351.       Close('FNDBNAME')
  2352.       WriteLn('FAMILYI','</BODY></HTML>')
  2353.       Close('FAMILYI')
  2354.       if flags.MakeGuide then
  2355.        WriteLn('FAMILYGI','@ENDNODE')
  2356.        Close('FAMILYGI')
  2357.       end
  2358.  
  2359.      Palbum = 0
  2360.      if Exists(FAMP(mFGRN)) & flags.DoPictures then do
  2361.  
  2362.       Palbum = 1
  2363.       if flags.RemakeThumb = 1 then do
  2364.        DELETE(FfilN'.GIF')
  2365.        DELETE(FfilN'.JPEG')
  2366.        if Exists(FfilN'.GIF') | Exists(FfilN'.JPEG') then 
  2367. say '<=====> IN USE <=====> cannot modify 'FfilN' thumbnail'
  2368.        end
  2369.       if AgeTest(FAMP(mFGRN),FfilN'.jpg') then do
  2370.        Delete(FfilN'.'flags.Thmbfmt)
  2371.        end
  2372.  
  2373.       if flags.DoPictures & ~Exists(FfilN'.jpg') then do
  2374.        Say 'Creating picture 'FfilN'.jpg'
  2375. /*
  2376. Say 'Sys:Tools/GfxCon 'FAMP(mFGRN)' TO 'FfilN'.jpg FORMAT JPEG QUALITY 90'
  2377. */
  2378. Say 'Sys:Tools/GfxCon 'FAMP(mFGRN)' TO 'FfilN'.jpg FORMAT JPEG QUALITY 90'
  2379. OldStackSize = pragma('s',21000)
  2380.  
  2381. /* Dave C. change */
  2382. if upper(right(FAMP(mFGRN),3))="JPG" then
  2383.  address command 'copy 'FAMP(mFGRN)' TO 'FfilN'.jpg'
  2384. else
  2385.  address command 'Sys:Tools/GfxCon 'FAMP(mFGRN)' TO 'FfilN'.jpg FORMAT JPEG QUALITY 90'
  2386. /* Dave C. change */
  2387.  
  2388. call pragma('s',OldStackSize)
  2389.        end
  2390.       if Exists(FfilN'.'flags.Thmbfmt) then do
  2391.        if flags.verbose then Say '  ~ image 'FfilN'.'flags.Thmbfmt'  ...OK... '
  2392.       end
  2393.       else do
  2394.        if flags.verbose then Say 'Creating image 'FfilN'.'flags.Thmbfmt''
  2395. /*
  2396. Say 'Sys:Tools/GfxCon 'FfilN'.jpg TO 'FfilN'.'flags.Thmbfmt' FORMAT 'flags.Thmbfmt' BOXFIT 'flags.Thumbnail' 'flags.Thumbnail
  2397. */
  2398. OldStackSize = pragma('s',21000)
  2399.  
  2400. BOXFITmax = 100
  2401. if flags.Thumbnail < BOXFITmax then BOXFITmax = flags.Thumbnail
  2402.  
  2403. /* Dave C. change */
  2404. address command 'Sys:Tools/GfxCon 'FfilN'.jpg TO 'FfilN'.'flags.Thmbfmt' FORMAT 'flags.Thmbfmt' BOXFIT' BOXFITmax BOXFITmax
  2405. /* Dave C. change */
  2406.  
  2407. call pragma('s',OldStackSize)
  2408.        end
  2409.       if Exists(FfilN'A.htm') then do
  2410.        if flags.verbose then Say '  ~ picture album 'FfilN'A.htm  ...OK... '
  2411.        end
  2412.       else do
  2413.        if flags.verbose then Say 'Creating picture album ® 'FfilN'A.htm'
  2414.        Open('FAMILYP',FfilN'A.htm','w')
  2415. WriteLn('FAMILYP','<HTML><HEAD>')
  2416. WriteLn('FAMILYP','<meta name="robots" content="noindex,nofollow">')
  2417. WriteCh('FAMILYP','<TITLE>'person.MGETFULLNAME.ScionIRN' ///\ ')
  2418. WriteCh('FAMILYP',person.MGETFULLNAME.SPOUSE)
  2419. WriteLn('FAMILYP',' Family Picture Album</TITLE><H3>')
  2420. WriteLn('FAMILYP','</HEAD><BODY BACKGROUND=st0ne.gif><center>')
  2421. WriteLn('FAMILYP',' ')
  2422. WriteLn('FAMILYP',' <!--  picture source: 'FAMP(mFGRN)' -->')
  2423. WriteCh('FAMILYP','<IMG SRC='FamilyPrefix || mFGRN'.jpg><P>')
  2424. WriteCh('FAMILYP',person.MGETFULLNAME.ScionIRN' & ')
  2425. if SPOUSE = '' then WriteCh('FAMILYP','<>')
  2426.  else WriteCh('FAMILYP',person.MGETFULLNAME.SPOUSE)
  2427. WriteLn('FAMILYP','<P>Family Picture Album</center><HR>')
  2428. WriteLn('FAMILYP',' ')
  2429. WriteLn('FAMILYP',' ')
  2430. WriteLn('FAMILYP','<A HREF=FAlbum.htm alt=img/'FamilyPrefix || mFGRN'A1.jpg>')
  2431. WriteLn('FAMILYP','<img alt="Picture Album hints" src=img/'FamilyPrefix || mFGRN'A1.'flags.Thmbfmt'></A>')
  2432. WriteLn('FAMILYP',' ')
  2433. WriteLn('FAMILYP',' ')
  2434.        WriteLn('FAMILYP','</BODY></HTML>')
  2435.        Close('FAMILYP')
  2436.        end
  2437.       if flags.Fexpln ~= 101 then do
  2438.        flags.Fexpln = 101
  2439.        Open('FAlbum',HTMLdir'/FAlbum.htm','w')
  2440.  WriteLn('FAlbum','<HTML><HEAD>')
  2441.  WriteLn('FAlbum','<meta name="robots" content="noindex,nofollow">')
  2442.  WriteLn('FAlbum','<TITLE>Picture Album hints</TITLE>')
  2443.  WriteLn('FAlbum','</HEAD><BODY BACKGROUND=st0ne.gif>')
  2444.  WriteLn('FAlbum','<HR><HR><H2><B>Use the PICTURE option in the main menu!</B></H2><HR><HR>')
  2445.  WriteLn('FAlbum','<PRE><TT>')
  2446.  WriteCh('FAlbum','<A HREF=img/FnnA1.jpg><IMG SRC=img/FnnA1.'flags.Thmbfmt'></A>')
  2447.  WriteCh('FAlbum',' - another JPEG picture anchored by ')
  2448.  WriteLn('FAlbum','thumbnail image created by:<P>')
  2449.  WriteLn('FAlbum','Copying source picture to: 'HTMLdir'/img/FnnA1.jpg<P>') 
  2450.  WriteCh('FAlbum','GfxCon 'HTMLdir'/img/FnnA1.jpg TO 'HTMLdir'/img/FnnA1.'flags.Thmbfmt' FORMAT ')
  2451.  WriteCh('FAlbum',flags.Thmbfmt' BOXFIT 'flags.Thumbnail' 'flags.Thumbnail)
  2452.  WriteLn('FAlbum','<P></PRE></TT><HR><BR><BR>')
  2453.  WriteLn('FAlbum',''flags.htmlb'Edit'flags.htmlub' 'HTMLdir'/img/FnnA.htm 'flags.htmlb'to add more pictures to the Picture Album - A2, A3, etc.<P>')
  2454.  WriteCh('FAlbum','CAUTION:<P> deleting Directory:'flags.htmlub' 'HTMLdir' 'flags.htmlb'destroys all Picture ')
  2455.  WriteCh('FAlbum',' Album modifications and the img sub-dir<P>')
  2456.  WriteLn('FAlbum',' YOUR WORK WILL BE LOST !'flags.htmlub'')
  2457.  WriteLn('FAlbum','</BODY></HTML>')
  2458.        Close('FAlbum')
  2459.        end
  2460.       end
  2461.  
  2462.       if flags.VERSION > 5 then do
  2463.        'GETFAMADDR' mFGRN
  2464.        PARSE VAR RESULT p_name '$' addr1 '$' addr2 '$' addr3 '$' addr4 '$' addr5 flags.BRKCHAR
  2465.        'GETFAMPHONE' mFGRN
  2466.        p_name = addr1''addr2''addr3''addr4''addr5''RESULT
  2467.        if p_name ~= '' then do
  2468.         WriteCh('PERSONFILE','<ADDRESS>')
  2469.         PersOutputCh('        'addr1'   'addr2'   'addr3'   'addr4'   'addr5'   'RESULT,1)
  2470.         WriteLn('PERSONFILE','</ADDRESS>')
  2471.         PersOutputCr(1)
  2472.         end
  2473.        end
  2474.  
  2475.      Minfo2 = 0
  2476.      Minfo3 = 0
  2477.      if MARRIAGECELEBRANT ~= '' | Minfo | Palbum then do
  2478.       if Minfo then do
  2479. /*
  2480. WriteCh('PERSONFILE',spcs'(<A HREF='FamilyPrefix || mFGRN'I.htm> ¶ </A>) ')
  2481. */
  2482.        Minfo3 = 1
  2483.        WriteCh('PERSONFILE',spcs' <INPUT type=button value=¶ onClick=')
  2484.        WriteCh('PERSONFILE',"'")
  2485.        WriteCh('PERSONFILE','window.open(URL="'FamilyPrefix || mFGRN'I.htm","_self")')
  2486.        WriteCh('PERSONFILE',"'")
  2487.        WriteCh('PERSONFILE','>')
  2488.  
  2489.        if flags.MakeGuide then do
  2490.         WriteCh('PERSONGuide',spcs' @{" More Info (¶) " LINK 'gFfilN'I.guide/Main}')
  2491.         Minfo2 = 1
  2492.         if Exists(FAMP(mFGRN)) then do
  2493.          WriteCh('PERSONGuide',' @{" Picture (®) " RXS "address command ')
  2494.          WriteCh('PERSONGuide',"'"flags.VIEWER" ")
  2495.          WriteCh('PERSONGuide',FAMP(mFGRN)"'"'"}')
  2496.          end
  2497.         if Exists(FAMS(mFGRN)) then do
  2498.          WriteCh('PERSONGuide',' @{" Audio (Æ) " RXS "address command ')
  2499.          WriteCh('PERSONGuide',"'"flags.PLAYER" ")
  2500.          WriteCh('PERSONGuide',FAMS(mFGRN)"'"'"}')
  2501.          end
  2502.         WriteLn('PERSONGuide','')
  2503.         end
  2504.        end
  2505.  
  2506.       if Palbum then do
  2507.        if Minfo3 = 0 then WriteCh('PERSONFILE',spcs)
  2508. /*
  2509.        WriteCh('PERSONFILE',' (<A HREF='FamilyPrefix || mFGRN'A.htm')
  2510.        WriteCh('PERSONFILE','>'flags.htmlb' ® 'flags.htmlub'</A>) ')
  2511. */
  2512.        WriteCh('PERSONFILE',' <INPUT type=button value=® onClick=')
  2513.        WriteCh('PERSONFILE',"'")
  2514.        WriteCh('PERSONFILE','window.open(URL="'FamilyPrefix || mFGRN'A.htm","_self")')
  2515.        WriteCh('PERSONFILE',"'")
  2516.        WriteCh('PERSONFILE','>')
  2517.  
  2518.        WriteCh('PERSONFILE',' <A HREF='FamilyPrefix || mFGRN'A.htm>')
  2519.        WriteCh('PERSONFILE','<img ALIGN=right src=')
  2520.        WriteLn('PERSONFILE',FamilyPrefix || mFGRN'.'flags.Thmbfmt'></A>')
  2521.        end
  2522.  
  2523.  
  2524.  
  2525.       if ( Exists(FAMP(mFGRN)) & flags.DoPictures ) | Minfo then 
  2526.        WriteLn('PERSONFILE',' ')
  2527.  
  2528.       'GETCELEBRANT' mFGRN
  2529.       if RESULT ~= "" then PersOutputLn(spcs' Celebrant: 'RESULT,1)
  2530.       'GETWITNESS' mFGRN
  2531.       if RESULT ~= "" then PersOutputLn(spcs'   Witness: 'RESULT,1)
  2532.       'GETFAMCOMMENT' mFGRN
  2533.       if RESULT ~= "" then PersOutputLn(spcs'  Comments: 'RESULT,1)
  2534.       'GETENDDATE' mFGRN
  2535.       ENDDATE = RESULT
  2536.       if flags.VERSION > 5 then do
  2537.        'GETENDINGSTR' mFGRN
  2538.        ENDING = RESULT
  2539.        if ENDDATE ~= "" | ENDING ~= 'Unknown' then do
  2540.         PersOutputCh(spcs,0)
  2541.         PersOutputCh('     Ended: ',0)
  2542.         if ENDDATE ~= "" then PersOutputCh(ENDDATE,0)
  2543.         PersOutputCh(' · 'ENDING,0)
  2544.         PersOutputCr()
  2545.         end
  2546.        end
  2547.       else do
  2548.        'GETENDING' mFGRN
  2549.        ENDING = RESULT
  2550.        if ENDDATE ~= "" | ENDING > 0 then do
  2551.         PersOutputCh(spcs,0)
  2552.         PersOutputCh('     Ended: ',0)
  2553.         if ENDDATE ~= "" then PersOutputCh(ENDDATE,0)
  2554.         if ENDING = 1 then PersOutputCh(' · None',0)
  2555.         if ENDING = 2 then PersOutputCh(' · Divorce',0)
  2556.         if ENDING = 3 then PersOutputCh(' · Separation',0)
  2557.         if ENDING = 4 then PersOutputCh(' · Annulment',0)
  2558.         if ENDING = 5 then PersOutputCh(' · Death',0)
  2559.         PersOutputCr()
  2560.         end
  2561.        end
  2562.  
  2563.       'GETFAMREFS' mFGRN
  2564.       if RESULT ~= "" then PersOutputLn(spcs'References: 'RESULT,1)
  2565.  
  2566.       if DoGenText then WriteLn('GenealogyText',spcs)
  2567.  
  2568.       if Minfo & DoGenText then do
  2569. /*
  2570.       if Minfo & ( DoGenText | flags.MakeGuide ) then do
  2571. */
  2572.        if flags.MakeGuide then WriteLn('PERSONGuide',spcs)
  2573.        Open('FNDBNAME',FAMNIRN,'r')
  2574.        DO While ~EOF('FNDBNAME')
  2575.         line = TagStrip(ReadLn('FNDBNAME'))
  2576. /*
  2577.         if flags.MakeGuide then WriteLn('PERSONGuide',spcs'  'CheckGuideRepl(line))
  2578. */
  2579.         if DoGenText then 
  2580.          WriteLn('GenealogyText',spcs'  'CheckForNAReplacement(line))
  2581.         end
  2582.        Close('FNDBNAME')
  2583.        end
  2584.  
  2585.       end
  2586.      end
  2587.     else do
  2588.      PersOutputCr()
  2589.      end
  2590.  
  2591.      'GETNUMCHILD' mFGRN
  2592.      TOTCHILDREN = RESULT
  2593. /* say 'TOTCHILDREN = 'TOTCHILDREN */
  2594.      DO k = 0 TO TOTCHILDREN - 1
  2595.       'GETCHILD' mFGRN k
  2596.       mFGRNc = RESULT
  2597.  
  2598.       GetPerComp(mFGRNc)
  2599.  
  2600.       if person.GETFIRSTNAME.mFGRNc ~= "" then do
  2601.        HasCHILDREN = 1
  2602.  
  2603.        jk = MARRIAGES - i
  2604.        LastNameFl = 1
  2605.        if person.GETLASTNAME.mFGRNc = person.GETLASTNAME.ScionIRN then do
  2606.         LastNameFl = -1
  2607.         LastNameVal = person.GETLASTNAME.ScionIRN
  2608.         end
  2609.        PersOutputCh('    'vert.jk'    |_<'mFGRNc'>',LastNameFl)
  2610.        LastNameFl = 1
  2611.        BirthDeath(mFGRNc)
  2612.        PersOutputCr()
  2613.        end
  2614.       end
  2615.      end
  2616.     end
  2617.   end
  2618.  else do
  2619.   LastNameFl = 1
  2620.   if LASTNAME = FATHERLASTNAME then do
  2621.   LastNameFl = -1
  2622.    LastNameVal = FATHERLASTNAME
  2623.    end
  2624.   PersOutputLn('<'ScionIRN'>',1)
  2625.   LastNameFl = 1
  2626.  end
  2627.  WriteLn('PERSONFILE','</FORM>')
  2628.  
  2629.  if HasPARENTS then do
  2630.   if flags.verbose then say ' Ancestors...'
  2631.   PersOutputHL()
  2632.   PersOutputLn('Ancestors',0)
  2633.   if DoGenText then WriteLn('GenealogyText','')
  2634.   Paternal(ScionIRN,'  ')
  2635.   PersOutputCh('<'ScionIRN'>',1)
  2636.   if person.GETBIRTHDATE.ScionIRN ~= "" then
  2637.    PersOutputCh(' * 'person.GETBIRTHDATE.ScionIRN,0)
  2638.   if person.GETDEATHDATE.ScionIRN ~= "" & person.GETDEATHDATE.ScionIRN ~= "dead" then
  2639.    if person.GETDEATHDATE.ScionIRN ~= "?" then
  2640.     PersOutputCh(' + 'person.GETDEATHDATE.ScionIRN,0)
  2641.   PersOutputCr()
  2642.   Maternal(ScionIRN,'  ')
  2643.   end
  2644.  
  2645.  if HasCHILDREN then do
  2646.   if flags.verbose then say ' Descendants...'
  2647.   PersOutputHL()
  2648.   indent = "  "
  2649.   PersOutputLn('Descendants',0)
  2650.   if DoGenText then WriteLn('GenealogyText','')
  2651.   PersOutputCh(indent'<'ScionIRN'>',1)
  2652.   if person.GETBIRTHDATE.ScionIRN ~= "" then
  2653.    PersOutputCh(' * 'person.GETBIRTHDATE.ScionIRN,0)
  2654.   if person.GETDEATHDATE.ScionIRN ~= "" & person.GETDEATHDATE.ScionIRN ~= "dead" then
  2655.    if person.GETDEATHDATE.ScionIRN ~= "?" then
  2656.     PersOutputCh(' + 'person.GETDEATHDATE.ScionIRN,0)
  2657.   PersOutputCr()
  2658.   marriagesANDchildren(ScionIRN,indent)
  2659.   end
  2660. /*©*/
  2661.  WriteLn('PERSONFILE','</TT></PRE>')
  2662.  WriteLn('PERSONFILE','</BODY></HTML>')
  2663.  Close('PERSONFILE')
  2664.  if flags.MakeGuide then do
  2665.   WriteLn('PERSONGuide','@ENDNODE')
  2666.   Close('PERSONGuide')
  2667.   end
  2668. /*©*/
  2669. /*
  2670.  if flags.target = "NORMAL" & ValidInfo then do
  2671. */
  2672.  if flags.target = "NORMAL" then do
  2673.   if DoGenText then WriteLn('GenealogyText',' ')
  2674.   WriteLn('GenealogyFile','<TR><TD ALIGN=center>')
  2675.   GeneaOutputCh('<'ScionIRN'>',1)
  2676.   WriteLn('GenealogyFile','</TD>')
  2677.   WriteLn('GenealogyFile','<TD ALIGN=right>')
  2678.   if person.GETBIRTHDATE.ScionIRN ~= "" then
  2679.    GeneaOutputCh('  *',0)
  2680.    GeneaOutputCh(person.GETBIRTHDATE.ScionIRN,0)
  2681.   WriteLn('GenealogyFile','</TD>')
  2682.   WriteLn('GenealogyFile','<TD ALIGN=right>')
  2683.   if person.GETDEATHDATE.ScionIRN ~= "" & person.GETDEATHDATE.ScionIRN ~= "dead" then
  2684.    if person.GETDEATHDATE.ScionIRN ~= "?" then
  2685.     GeneaOutputCh('  +',0)
  2686.     GeneaOutputCh(person.GETDEATHDATE.ScionIRN,0)
  2687.   WriteLn('GenealogyFile','</TD>')
  2688.   if HasFATHER then do
  2689.    WriteLn('GenealogyFile','<TD ALIGN=center>')
  2690.    GeneaOutputCh('  · ',0)
  2691.    GeneaOutputCh('<'FATHERIRN'>',1)
  2692.    WriteLn('GenealogyFile','</TD>')
  2693.    WriteLn('GenealogyFile','<TD ALIGN=center>')
  2694.    if HasMOTHER then do
  2695. /*
  2696.     GeneaOutputCh(' ///\',0)
  2697. */
  2698.     GeneaOutputCh('<'MOTHERIRN'>',1)
  2699.     end
  2700.    end
  2701.   else do
  2702.    WriteLn('GenealogyFile','<TD ALIGN=center>')
  2703.    WriteLn('GenealogyFile','</TD>')
  2704.    WriteLn('GenealogyFile','<TD ALIGN=center>')
  2705.    if HasMOTHER then do
  2706.     GeneaOutputCh('  · ',0)
  2707.     GeneaOutputCh('<'MOTHERIRN'>',1)
  2708.     end
  2709.    end
  2710.   GeneaOutputCr() /* do not close, we have many more to go. */
  2711.   end
  2712.  return
  2713.  
  2714.  
  2715.  
  2716. email: PROCEDURE
  2717.  PARSE ARG nm '@' dom
  2718.  if strip(nm) = '' then return ''
  2719.  if strip(dom) = '' then return '   'strip(nm)
  2720.  else do
  2721.   PARSE VAR nm nm1 ':' nm2
  2722.   if strip(nm1) = 'email' then nm1 = nm2
  2723.   return '   <I>@</I> <A HREF=mailto:'strip(nm1)'@'strip(dom)'>'strip(nm1)'@'strip(dom)'</A>'
  2724.  
  2725.  
  2726. IsNumeric: PROCEDURE
  2727.  PARSE ARG str
  2728.  return DataType(str, 'W')
  2729.  
  2730.  
  2731. /******************************** Makedir **********************************/
  2732.  
  2733. /* Makedir - If a directory under the given name already exists, or can be
  2734.    created, return 1, otherwise return 0. Though this function works
  2735.    correctly under Workbench 1.3, it has the same effect as the existing
  2736.    MAKEDIR; hence it is useful only under 2.0.
  2737. */
  2738. Makedir: procedure
  2739.  ds = statef(arg(1))
  2740.  if ds='' then
  2741.   result = 'MAKEDIR'(arg(1))
  2742.  else
  2743.   result = left(ds,3) = 'DIR'
  2744.  return result
  2745.  
  2746. Paternal: PROCEDURE EXPOSE person. AGdir flags. DoGenText PersonPrefix DBPATH
  2747.  PARSE ARG irn, indent
  2748.  'GETPARENTS' irn
  2749.  PARENTS = RESULT
  2750.  'GETPRINCIPAL' PARENTS
  2751.  PRINCIPAL = RESULT
  2752.  'GETSPOUSE' PARENTS
  2753.  SPOUSE = RESULT
  2754. /* say 'PRINCIPAL = 'PRINCIPAL' SPOUSE = 'SPOUSE */
  2755.  'GETSEX' PRINCIPAL
  2756.  if RESULT = 'M' then do
  2757.   FIRN = PRINCIPAL
  2758.   MIRN = SPOUSE
  2759.   end
  2760.  else do
  2761.   FIRN = SPOUSE
  2762.   MIRN = PRINCIPAL
  2763.   end
  2764.  pirn = FIRN
  2765.  if 't'pirn't' ~= 'tt' then do
  2766.   Paternal(pirn,indent'    ')
  2767.   PersOutputCh(indent' ,-',0)
  2768.   if pirnLASTNAME ~= "" then PersOutputCh('<'pirn'>',1)
  2769.   if EXISTS(PERSN(pirn)) then PersOutputCh(' (¶)',0)
  2770.   if EXISTS(PERSP(pirn)) then PersOutputCh(' (®)',0)
  2771.   if EXISTS(PERSS(pirn)) then PersOutputCh(' (Æ)',0)
  2772.   BirthDeath(pirn)
  2773.   PersOutputCr()
  2774.   Maternal(pirn,indent'|   ')
  2775.   end
  2776.  return 0
  2777.  
  2778. Maternal: PROCEDURE EXPOSE person. AGdir flags. DoGenText PersonPrefix DBPATH
  2779.  PARSE ARG irn, indent
  2780.  'GETPARENTS' irn
  2781.  PARENTS = RESULT
  2782.  'GETPRINCIPAL' PARENTS
  2783.  PRINCIPAL = RESULT
  2784.  'GETSPOUSE' PARENTS
  2785.  SPOUSE = RESULT
  2786.  'GETSEX' PRINCIPAL
  2787.  if RESULT = 'M' then do
  2788.   FIRN = PRINCIPAL
  2789.   MIRN = SPOUSE
  2790.   end
  2791.  else do
  2792.   FIRN = SPOUSE
  2793.   MIRN = PRINCIPAL
  2794.   end
  2795.  pirn = MIRN
  2796.  if 't'pirn't' ~= 'tt' then do
  2797.   Paternal(pirn,indent'|   ')
  2798.   PersOutputCh(indent' `-',0)
  2799.   if pirnLASTNAME ~= "" then PersOutputCh('<'pirn'>',1)
  2800.   if EXISTS(PERSN(pirn)) then PersOutputCh(' (¶)',0)
  2801.   if EXISTS(PERSP(pirn)) then PersOutputCh(' (®)',0)
  2802.   if EXISTS(PERSS(pirn)) then PersOutputCh(' (Æ)',0)
  2803.   BirthDeath(pirn)
  2804.   PersOutputCr()
  2805.   Maternal(pirn,indent'    ')
  2806.   end
  2807.  return 0
  2808.  
  2809. marriagesANDchildren: PROCEDURE EXPOSE person. AGdir flags. DoGenText PersonPrefix DBPATH
  2810.         PARSE ARG ScionIRN,indent
  2811.  'GETNUMMARRY' ScionIRN
  2812.  TOTMARRIAGES = RESULT
  2813. /* say 'TOTMARRIAGES = 'TOTMARRIAGES */
  2814.  
  2815.  if 't'TOTMARRIAGES't' = 'tt' then return 0
  2816.  
  2817.  DO i = 0 TO TOTMARRIAGES - 1
  2818.   'GETMARRIAGE' ScionIRN i
  2819.   MARRIAGE = RESULT
  2820.   if MARRIAGE > -1 then do
  2821.    MARRIAGES = i
  2822.    end
  2823.  end
  2824.  tMARRIAGESt = 't'MARRIAGES't'
  2825. /* Say 'MARRIAGES = 'MARRIAGES tMARRIAGESt */
  2826.  
  2827.  if tMARRIAGESt ~= 'tMARRIAGESt' then do
  2828.   DO i = 0 TO MARRIAGES
  2829.    'GETMARRIAGE' ScionIRN i
  2830.    mFGRN = RESULT
  2831.    if mFGRN ~= "" then do
  2832.     'GETSPOUSE' mFGRN
  2833.     SPOUSE = RESULT
  2834.     if SPOUSE = ScionIRN then
  2835.      DO
  2836.      'GETPRINCIPAL' mFGRN
  2837.      SPOUSE = RESULT
  2838.      end
  2839.     PersOutputCh(indent' ///\',0)
  2840.     mindent = "  "
  2841.     if i <= ( MARRIAGES - 1 ) then mindent = " :"
  2842.     PersOutputCh('<'SPOUSE'>',1)
  2843.     if EXISTS(PERSN(SPOUSE)) then PersOutputCh(' (¶)',0)
  2844.     if EXISTS(PERSP(SPOUSE)) then PersOutputCh(' (®)',0)
  2845.     if EXISTS(PERSS(SPOUSE)) then PersOutputCh(' (Æ)',0)
  2846.     BirthDeath(SPOUSE)
  2847.     PersOutputCr()
  2848.     'GETNUMCHILD' mFGRN
  2849.     TOTCHILDREN = RESULT
  2850. /*
  2851.  say 'TOTCHILDREN = 'TOTCHILDREN 'mFGRN = 'mFGRN
  2852. */
  2853.     DO k = 0 TO TOTCHILDREN - 1
  2854.      'GETCHILD' mFGRN k
  2855.      mFGRNc = RESULT
  2856.      GetPerComp(mFGRNc)
  2857.      if k = ( TOTCHILDREN - 1 ) then do
  2858.       indent2 = indent||mindent" "
  2859.       PersOutputCh(indent||mindent'|_<'mFGRNc'>',1)
  2860.       end
  2861.      else do
  2862.       indent2 = indent||mindent"|"
  2863.       PersOutputCh(indent2'_<'mFGRNc'>',1)
  2864.       end
  2865.      if EXISTS(PERSN(mFGRNc)) then PersOutputCh(' (¶)',0)
  2866.      if EXISTS(PERSP(mFGRNc)) then PersOutputCh(' (®)',0)
  2867.      if EXISTS(PERSS(mFGRNc)) then PersOutputCh(' (Æ)',0)
  2868.      BirthDeath(mFGRNc)
  2869.      PersOutputCr()
  2870.  
  2871.      marriagesANDchildren(mFGRNc,indent2)
  2872.      end
  2873.     end
  2874.    end
  2875.   end
  2876.  return 0
  2877.  
  2878. /* get correct person notes file name */
  2879. PERSN: PROCEDURE EXPOSE DBPATH flags.
  2880.  PARSE ARG IRN 
  2881.  file = ''
  2882.  if flags.VERSION > 5 then do
  2883.   'GETPERSNOTE' IRN
  2884.   file = RESULT
  2885.   end
  2886.  if file = '' then file = DBPATH'PN'IRN'.'flags.DBNAME
  2887.  return file
  2888.  
  2889. /* get correct family notes file name */
  2890. FAMN: PROCEDURE EXPOSE DBPATH flags.
  2891.  PARSE ARG IRN 
  2892.  file = ''
  2893.  if flags.VERSION > 5 then do 
  2894.   'GETFAMNOTE' IRN
  2895.   file = RESULT
  2896.   end
  2897.  if file = '' then file = DBPATH'FN'IRN'.'flags.DBNAME
  2898.  return file
  2899.  
  2900. /* get correct person picture file name */
  2901. PERSP: PROCEDURE EXPOSE DBPATH flags.
  2902.  PARSE ARG IRN 
  2903.  file = ''
  2904.  if flags.VERSION > 5 then do
  2905.   'GETPERSPIX' IRN
  2906.   file = RESULT
  2907.   end
  2908.  if file = '' then file = DBPATH'PP'IRN'.'flags.DBNAME
  2909.  return file
  2910.  
  2911. /* get correct family picture file name */
  2912. FAMP: PROCEDURE EXPOSE DBPATH flags.
  2913.  PARSE ARG IRN 
  2914.  file = ''
  2915.  if flags.VERSION > 5 then do
  2916.   'GETFAMPIX' IRN
  2917.   file = RESULT
  2918.   end
  2919.  if file = '' then file = DBPATH'FP'IRN'.'flags.DBNAME
  2920.  return file
  2921.  
  2922. /* get correct person sound file name */
  2923. PERSS: PROCEDURE EXPOSE DBPATH flags.
  2924.  PARSE ARG IRN
  2925.  file = ''
  2926.  if flags.VERSION > 5 then do
  2927.   'GETPERSSND' IRN
  2928.   file = RESULT
  2929.   end
  2930.  if file = '' then file = DBPATH'PS'IRN'.'flags.DBNAME
  2931.  return file
  2932.  
  2933. /* get correct family sound file name */
  2934. FAMS: PROCEDURE EXPOSE DBPATH flags.
  2935.  PARSE ARG IRN
  2936.  file = ''
  2937.  if flags.VERSION > 5 then do
  2938.   'GETFAMSND' IRN
  2939.   file = RESULT
  2940.   end
  2941.  if file = '' then file = DBPATH'FS'IRN'.'flags.DBNAME
  2942.  return file
  2943.  
  2944. PersOutputHL: PROCEDURE EXPOSE person. DoGenText flags.
  2945.  WriteLn('PERSONFILE','<HR>')
  2946.  if flags.MakeGuide then WriteLn('PERSONGuide','')
  2947.  if DoGenText then do
  2948.    WriteLn('GenealogyText','')
  2949.    WriteLn('GenealogyText','-----------------------------------------------------------')
  2950.    WriteLn('GenealogyText','')
  2951.    end
  2952.  return 0
  2953.  
  2954. BirthDeath: PROCEDURE EXPOSE person. DoGenText flags.
  2955.  irn = arg(1)
  2956.  if ( flags.living > 0 ) & ( person.GETDEATHDATE.irn = "" ) then return 0
  2957. /* GetPerComp(irn) */
  2958.  if person.gotten.irn = PERSON.GOTTEN. then return 0
  2959.  if person.GETBIRTHDATE.irn ~= "" then
  2960.   PersOutputCh('   * 'person.GETBIRTHDATE.irn,0)
  2961.  if person.GETDEATHDATE.irn ~= "" & person.GETDEATHDATE.irn ~= "?" then
  2962.   PersOutputCh('   + 'person.GETDEATHDATE.irn,0)
  2963.  return 0
  2964.  
  2965. PersOutputCr: PROCEDURE EXPOSE person. DoGenText flags.
  2966.  if arg(1) ~= "1" then WriteLn('PERSONFILE','')
  2967.  if flags.MakeGuide then WriteLn('PERSONGuide','')
  2968.  if DoGenText then WriteLn('GenealogyText','')
  2969.  return 0
  2970.  
  2971. PersOutputCh: PROCEDURE EXPOSE person. AGdir DoGenText flags. PersonPrefix LastNameFl LastNameVal
  2972.  if arg(1) ~= "" then do
  2973.   if arg(2) = 0 then do
  2974.    if arg(1) ~= " (Æ)" then WriteCh('PERSONFILE',arg(1))
  2975.    if flags.MakeGuide then do
  2976.     if arg(1) = ' ('flags.htmlb'®'flags.htmlub')' then WriteCh('PERSONGuide',' (®)')
  2977.     else WriteCh('PERSONGuide',arg(1))
  2978.     end
  2979.    if DoGenText then WriteCh('GenealogyText',arg(1))
  2980.    end
  2981.   else do
  2982.    WriteCh('PERSONFILE',CheckForReplacement(arg(1)))
  2983.    if flags.MakeGuide then WriteCh('PERSONGuide',CheckGuideRepl(arg(1)))
  2984.    if DoGenText then WriteCh('GenealogyText',CheckForNAReplacement(arg(1)))
  2985.    end
  2986.  end
  2987.  return 0
  2988.  
  2989. PersOutputLn: PROCEDURE EXPOSE person. AGdir DoGenText flags. PersonPrefix LastNameFl LastNameVal
  2990.  if arg(1) ~= "" then do
  2991.   if arg(2) = 0 then do
  2992.    WriteLn('PERSONFILE',arg(1))
  2993.    if flags.MakeGuide then WriteLn('PERSONGuide',arg(1))
  2994.    if DoGenText then WriteLn('GenealogyText',arg(1))
  2995.    end
  2996.   else do
  2997.    WriteLn('PERSONFILE',CheckForReplacement(arg(1)))
  2998.    if flags.MakeGuide then WriteLn('PERSONGuide',CheckGuideRepl(arg(1)))
  2999.    if DoGenText then WriteLn('GenealogyText',CheckForNAReplacement(arg(1)))
  3000.    end
  3001.  end
  3002.  return 0
  3003.  
  3004. GeneaOutputCr: PROCEDURE EXPOSE person. flags.
  3005.  if flags.MakeGuide then WriteLn('GenealogyGuide','') 
  3006.  return 0
  3007.  
  3008. GeneaOutputCh: PROCEDURE EXPOSE person. AGdir DoGenText flags. PersonPrefix LastNameFl LastNameVal
  3009.  if arg(1) ~= "" then do
  3010.   if arg(2) = 0 then do
  3011.    if substr(arg(1),1,2) ~= '  ' then WriteCh('GenealogyFile',arg(1))
  3012.    if flags.MakeGuide then WriteCh('GenealogyGuide',arg(1))
  3013.    end
  3014.   else do
  3015.    WriteCh('GenealogyFile',CheckForReplacement(arg(1)))
  3016.    if flags.MakeGuide then WriteCh('GenealogyGuide','   'CheckGuideRepl(arg(1)))
  3017.    end
  3018.  end
  3019.  return 0
  3020.  
  3021. GeneaOutputLn: PROCEDURE EXPOSE person. AGdir DoGenText flags. PersonPrefix LastNameFl LastNameVal
  3022.  if arg(1) ~= "" then do
  3023.   if arg(2) = 0 then do
  3024.    WriteLn('GenealogyFile',arg(1))
  3025.    WriteLn('GenealogyGuide',arg(1))
  3026.    end
  3027.   else do
  3028.    WriteLn('GenealogyFile',CheckForReplacement(arg(1)))
  3029.    WriteLn('GenealogyGuide',CheckGuideRepl(arg(1)))
  3030.    end
  3031.  end
  3032.  return 0
  3033.  
  3034. addtoAlbum: PROCEDURE EXPOSE HTMLdir LASTIRN flags.
  3035. say 'adding to Picture Album: 'HTMLdir'/'arg(1)||arg(2)'A.htm'
  3036.  if ~Exists(HTMLdir'/'arg(1)||arg(2)'A.htm') then return 0
  3037. /* get file designation of Picture */
  3038.  do until Exists(sourcedir)
  3039.   say 'enter dir where pictures are to be found: '
  3040.   PULL sourcedir
  3041.   end
  3042.  address command 'c:dir 'sourcedir'/#?.#?'
  3043. /* does Picture file Exist? */
  3044.  do until Exists(sourcedir'/'sourcepic)
  3045.   say 'enter pictures file name:'
  3046.   PULL sourcepic
  3047.   end
  3048.   say ' '
  3049.   say '                |¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|'
  3050.   say '                |   Selected Picture:  |'
  3051.   say '                |______________________|'
  3052.   say ' '
  3053.   address command 'c:list 'sourcedir'/'sourcepic
  3054. /* check for next available Picture Set number */
  3055.  h = 1
  3056.  do while Exists(HTMLdir'/img/'arg(1)||arg(2)'A'h'.'flags.Thmbfmt) | Exists(HTMLdir'/img/'arg(1)||arg(2)'A'h'.jpg')
  3057.   h = h + 1
  3058.   end
  3059.  say ' '
  3060.  say '        |¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|'
  3061.  say '        |   Picture Album designations will be:  |'
  3062.  say '        |________________________________________|'
  3063.  say ' '
  3064.  say HTMLdir'/img/'arg(1)||arg(2)'A'h'.jpg'
  3065.  say HTMLdir'/img/'arg(1)||arg(2)'A'h'.'flags.Thmbfmt 
  3066.  say ' '
  3067.  say 'Enter a Picture title:  ( or EXIT )'
  3068.  pictitle =  ReadLn(stdin)
  3069.  if upper(pictitle) = 'EXIT' then return 0
  3070.  say ' '
  3071.  
  3072. /* do Picture conversions */
  3073.  OldStackSize = pragma('s',21000)
  3074.  if upper(right(sourcedir'/'sourcepic,3))="JPG" then
  3075.   address command 'copy 'sourcedir'/'sourcepic' to 'HTMLdir'/img/'arg(1)||arg(2)'A'h'.jpg'
  3076.  else
  3077.   address command 'Sys:Tools/GfxCon 'sourcedir'/'sourcepic' TO 'HTMLdir'/img/'arg(1)||arg(2)'A'h'.jpg FORMAT JPEG QUALITY 90'
  3078. /* Thumbnail */
  3079.  address command 'Sys:Tools/GfxCon 'HTMLdir'/img/'arg(1)||arg(2)'A'h'.jpg TO 'HTMLdir'/img/'arg(1)||arg(2)'A'h'.'flags.Thmbfmt' FORMAT 'flags.Thmbfmt' BOXFIT 'flags.Thumbnail' 'flags.Thumbnail
  3080. /* update Album */
  3081.  say 'adding to Picture Album: 'HTMLdir'/'arg(1)||arg(2)'A.htm'
  3082.  Open('PA',HTMLdir'/'arg(1)||arg(2)'A.htm','r')
  3083.  j = 0
  3084.  DO While ~EOF('PA')
  3085.   j = j + 1
  3086.   line.j = ReadLn('PA')
  3087.   end
  3088.  Close('PA')
  3089.  Open('PA',HTMLdir'/'arg(1)||arg(2)'A.htm','w')
  3090.  k = 1
  3091.  do until ( substr(line.k,1,14) = '</BODY></HTML>' ) | ( k > j )
  3092.   say 'Writing: 'line.k
  3093.   WriteLn('PA',line.k)
  3094.   k = k + 1
  3095.   end
  3096. /* add links for Pictures */
  3097.  WriteLn('PA',' ')
  3098.  WriteLn('PA','<HR>')
  3099.  WriteLn('PA',' <!--  picture source: 'sourcedir'/'sourcepic' -->')
  3100.  
  3101. /*
  3102.  say 'Writing: <TABLE BORDER=0><TH>'
  3103.  WriteLn('PA','<TABLE BORDER=0><TH>')
  3104. */
  3105.  say 'Writing: <A HREF=img/'arg(1)||arg(2)'A'h'.jpg>'
  3106.  WriteCh('PA','<A HREF=img/'arg(1)||arg(2)'A'h'.jpg>')
  3107.  say 'Writing: <IMG SRC=img/'arg(1)||arg(2)'A'h'.'flags.Thmbfmt' ALIGN=left></A>'
  3108.  WriteLn('PA','<IMG SRC=img/'arg(1)||arg(2)'A'h'.'flags.Thmbfmt' ALIGN=left></A>')
  3109.  say 'Writing: 'pictitle
  3110.  WriteLn('PA',' <I>'pictitle'</I><HR>')
  3111. /*
  3112.  say 'Writing: </TH></TR><TR><TH>'pictitle'</A></TH></TR></TABLE>'
  3113.  WriteLn('PA','</TH></TR><TR><TH>'pictitle'</A></TH></TR></TABLE>')
  3114. */
  3115.  say 'Writing: </BODY></HTML>'
  3116.  WriteLn('PA','</BODY></HTML>')
  3117.  Close('PA')
  3118.  
  3119.  say ' '
  3120.  say ' Do you wish to edit Picture Album: 'HTMLdir'/'arg(1)||arg(2)'A.htm ?'
  3121.  pull ans
  3122.  if substr(ans,1,1) = 'Y' then do
  3123.   'GETEDITOR'
  3124.   if (RESULT = "") then say "No editor defined"
  3125.   else address command RESULT' 'HTMLdir'/'arg(1)||arg(2)'A.htm'
  3126.   end
  3127.  return 0
  3128.  
  3129. WriteMeta: PROCEDURE EXPOSE flags.
  3130.  if flags.Meta1 ~= " " then do
  3131.   WriteLn(arg(1),flags.Meta1)
  3132.   WriteLn(arg(1),flags.Meta2)
  3133.   WriteLn(arg(1),flags.Meta3)
  3134.   end
  3135.  return 0
  3136.  
  3137. TagStrip: PROCEDURE
  3138.  PARSE ARG line
  3139.  line = CStrip(line,"<TT>")
  3140.  line = CStrip(line,"</TT>")
  3141.  line = CStrip(line,"<PRE>")
  3142.  line = CStrip(line,"</PRE>")
  3143.  line = CStrip(line,"<P>")
  3144.  line = CStrip(line,"</P>")
  3145.  return line
  3146.  
  3147. CStrip: PROCEDURE
  3148.  pt = pos(arg(2),arg(1))
  3149.  if pt ~= 0 then do
  3150.   if pt = 1 then line = substr(arg(1),pt+length(arg(2)))
  3151.   else line = substr(arg(1),1,pt-1)''substr(arg(1),pt+length(arg(2)))
  3152.   return CStrip(line,arg(2))
  3153.   end
  3154.  return arg(1)
  3155.  end
  3156.  
  3157.  
  3158. /***************************************************************
  3159. * Check for "<IRN>" and replace with Person Name (with anchor) *
  3160. ***************************************************************/
  3161.  
  3162. CheckForReplacement: PROCEDURE EXPOSE person. flags. PersonPrefix LastNameFl LastNameVal
  3163.  PARSE ARG line "<" last
  3164.  if last = "" then return line
  3165.  RIRN = GetRIRN(last".")
  3166.  if RIRN = 0 then return line"<"last
  3167.  last = CheckforReplacement(last)
  3168.  lastend = GetEnd(last".")
  3169.  GetPerComp(RIRN)
  3170.  if ( flags.living > 0 ) & ( person.GETDEATHDATE.RIRN = "" ) then
  3171.   return line'.Living...'lastend
  3172.  RIRNFILENAME = PersonPrefix || RIRN
  3173.  if flags.bold then return line'<A HREF='RIRNFILENAME'.htm>'person.GETFULLNAME.RIRN'</A>'lastend
  3174.  if LastNameFl = -1 & person.GETLASTNAME.RIRN = LastNameVal then do
  3175.   if person.GETSEX.RIRN = "M" then
  3176.    RIRNFULLNAME = ''flags.htmlb''person.GETFIRSTNAME.RIRN''flags.htmlub''
  3177.   else RIRNFULLNAME = ''flags.htmli''person.GETFIRSTNAME.RIRN''flags.htmlui''
  3178.   end
  3179.  else do
  3180.   if person.GETSEX.RIRN = "M" then
  3181.    RIRNFULLNAME = ''flags.htmlb''person.GETFULLNAME.RIRN''flags.htmlub''
  3182.   else RIRNFULLNAME = ''flags.htmli''person.GETFULLNAME.RIRN''flags.htmlui''
  3183.   end
  3184.  return line'<A HREF='RIRNFILENAME'.htm>'RIRNFULLNAME'</A>'lastend
  3185.  
  3186. /******************************************************************
  3187. * Check for "<IRN>" and replace with Person Name (without anchor) *
  3188. ******************************************************************/
  3189.  
  3190. CheckForNAReplacement: PROCEDURE EXPOSE person. flags. PersonPrefix LastNameFl LastNameVal
  3191.  PARSE ARG line "<" last
  3192.  if last = "" then return line
  3193. /* if last = "" then return line */
  3194.  RIRN = GetRIRN(last".")
  3195.  if RIRN = 0 then return line"<"last
  3196.  last = CheckForNAReplacement(last)
  3197.  lastend = GetEnd(last".")
  3198.  GetPerComp(RIRN)
  3199.  if ( flags.living > 0 ) & ( person.GETDEATHDATE.RIRN = "" ) then
  3200.   return line'.Living...'lastend
  3201.  if ~flags.bold then do
  3202.   if LastNameFl = -1 & person.GETLASTNAME.RIRN = LastNameVal then do
  3203.    if person.GETSEX.RIRN = "M" then
  3204.     RIRNFULLNAME = ''person.GETFIRSTNAME.RIRN''
  3205.    else
  3206.     RIRNFULLNAME = ''person.GETFIRSTNAME.RIRN''
  3207.    return line||RIRNFULLNAME lastend
  3208.    end
  3209.   else do
  3210.    if person.GETSEX.RIRN = "M" then
  3211.     RIRNFULLNAME = ''person.GETFULLNAME.RIRN''
  3212.    else
  3213.     RIRNFULLNAME = ''person.GETFULLNAME.RIRN''
  3214.    return line || RIRNFULLNAME lastend
  3215.    end
  3216.   end
  3217.  else do
  3218.   if LastNameFl = -1 & person.GETLASTNAME.RIRN = LastNameVal then
  3219.    RIRNFULLNAME = person.GETFIRSTNAME.RIRN
  3220.   else RIRNFULLNAME = person.GETFULLNAME.RIRN
  3221.   return line||RIRNFULLNAME lastend
  3222.   end
  3223.  
  3224. /****************************************************************
  3225. * Check for "<IRN>" and replace with Person Name (Guide anchor) *
  3226. ****************************************************************/
  3227.  
  3228. CheckGuideRepl: PROCEDURE EXPOSE AGdir person. flags. PersonPrefix LastNameFl LastNameVal
  3229.  PARSE ARG line "<" last
  3230.  if last = "" then return line
  3231.  RIRN = GetRIRN(last".")
  3232.  if RIRN = 0 then return line"<"last
  3233.  last = CheckGuideRepl(last)
  3234.  lastend = GetEnd(last".")
  3235.  GetPerComp(RIRN)
  3236.  if ( flags.living > 0 ) & ( person.GETDEATHDATE.RIRN = "" ) then
  3237.   return line'.Living...'lastend
  3238.  RIRNFILENAME = PersonPrefix || RIRN
  3239.  if LastNameFl = -1 & person.GETLASTNAME.RIRN = LastNameVal then 
  3240.   RIRNFULLNAME = person.GETFIRSTNAME.RIRN
  3241.  else RIRNFULLNAME = person.GETFULLNAME.RIRN
  3242.  if flags.bold then 
  3243.   return line'@{" 'RIRNFULLNAME' " LINK 'AGdir'/'<RIRNFILENAME'.guide/Main}'lastend
  3244.  thegender = 'i'
  3245.  if person.GETSEX.RIRN = "M" then thegender = 'b'
  3246.  return line'@{" " LINK 'AGdir'/'RIRNFILENAME'.guide/Main}@{'thegender'}'RIRNFULLNAME'@{u'thegender'}'lastend
  3247.  
  3248. GetRIRN: PROCEDURE
  3249.  PARSE ARG numb ">" last
  3250.  if last = "" then return 0
  3251.  if IsNumeric(numb) then return numb
  3252.  return 0
  3253.  
  3254. GetEnd: PROCEDURE
  3255.  PARSE ARG line ">" last
  3256.  if last = "" then return substr(line,1,length(line)-1)
  3257.  return substr(last,1,length(last)-1)
  3258.  
  3259. GetLength: PROCEDURE
  3260.  PARSE UPPER ARG names
  3261.  nonletters = length(compress(names, xrange('A','Z')))
  3262.  return Length(names) - nonletters * 4 / 10
  3263.  
  3264.  
  3265. /* create a full name from first, last, and honorifics parts */
  3266.  
  3267. GetFullName: PROCEDURE EXPOSE person. thelastname
  3268.  PARSE ARG firstnames "," hon
  3269.  if hon = "" then do
  3270.   if length(firstnames) > 2 then
  3271.    if substr(firstnames,length(firstnames)-1,length(firstnames)) = "V." then
  3272.     firstnames = substr(firstnames,1,length(firstnames)-2)"v."
  3273.   return firstnames thelastname
  3274.   end
  3275.  return firstnames Space(thelastname)","hon
  3276.  
  3277. MGetFullName: PROCEDURE EXPOSE person. flags. thelastname thegender
  3278.  PARSE ARG firstnames "," hon
  3279.  if flags.bold then return firstnames Space(thelastname)
  3280.  gchar = "B"
  3281.  if thegender = "f" then gchar = "I"
  3282.  if hon = "" then do
  3283.   if length(firstnames) > 2 then
  3284.    if substr(firstnames,length(firstnames)-1,length(firstnames)) = "V." then
  3285.     firstnames = substr(firstnames,1,length(firstnames)-2)"v."
  3286.   return "<"gchar">"firstnames thelastname"</"gchar">"
  3287.   end
  3288.  return "<"gchar">"firstnames Space(thelastname)","hon"</"gchar">"
  3289.  
  3290. PGetFullName: PROCEDURE EXPOSE person. flags. thelastname thegender
  3291.  PARSE ARG firstnames "," hon
  3292.  if flags.bold then return firstnames Space(thelastname)
  3293.  schar = "1"
  3294.  uchar = "2"
  3295.  if thegender = "f" then do
  3296.   schar = "3"
  3297.   uchar = "3"
  3298.   end
  3299.  if hon = "" then do
  3300.   if length(firstnames) > 2 then
  3301.    if substr(firstnames,length(firstnames)-1,length(firstnames)) = "V." then
  3302.     firstnames = substr(firstnames,1,length(firstnames)-2)"v."
  3303.   return ""schar"m"firstnames thelastname""uchar"m"
  3304.   end
  3305.  return ""schar"m"firstnames Space(thelastname)","hon""uchar"m"
  3306.  
  3307. AgeTest: PROCEDURE EXPOSE flags.
  3308.  PARSE ARG DBFile, HTMFile
  3309.  if Exists(DBFile) then do
  3310.   if Exists(HTMFile) then do
  3311. Parse value StateF(DBFile) with type size blk bits DBday DBmin DBtick com
  3312. Parse value StateF(HTMFile) with type size blk bits HTMday HTMmin HTMtick com
  3313. /* Say DBFile DBday DBmin DBtick  HTMFile HTMday HTMmin HTMtick */
  3314.    if ( DBday > HTMday ) | ( DBday = HTMday & DBmin > HTMmin ) then do
  3315.     Delete(HTMFile)
  3316.     Say DBFile 'is newer; removing 'HTMFile
  3317.     return 1
  3318.     end
  3319.    else do
  3320.     if flags.verbose then Say '  ~ 'HTMFile'  ...OK... '
  3321.     return 0
  3322.     end
  3323.   return 1
  3324.   end
  3325.  return 1
  3326.  end
  3327.  
  3328. CheckPathName: PROCEDURE
  3329. PARSE ARG str
  3330. /* Check if path ends with a ":". If not, append a "/" */
  3331. lastchar = right(str,1)
  3332. if right(str,1) ~= ":" & right(str,1) ~= "/" then return str'/'
  3333. return str
  3334.  
  3335. AskExit: PROCEDURE
  3336.  SAY '                 '
  3337.  SAY '===> press RETURN to exit...'
  3338.  SAY ' '
  3339.  PULL target
  3340.  PauseExit()
  3341.  end
  3342.  
  3343. PauseExit: PROCEDURE
  3344.  SAY ' '
  3345.  SAY '    \                   /'
  3346.  SAY '     \                 / '
  3347.  SAY '                         '
  3348.  SAY '                         '
  3349.  SAY '       Scion2html.rexx   '
  3350.  SAY '                         '
  3351.  SAY '              ©          '
  3352.  SAY '                         '
  3353.  SAY '        Harold Ipolyi    '
  3354.  SAY '                         '
  3355.  SAY '                         '
  3356.  SAY '     /                 \ '
  3357.  SAY '    /                   \'
  3358.  SAY ' '
  3359.  EXIT
  3360.  end
  3361.  
  3362. CheckGfxCon: PROCEDURE
  3363. DoPictures = EXISTS("Sys:Tools/GfxCon")
  3364.  
  3365. if ~DoPictures then do
  3366.  SAY ' '
  3367.  say 'GfxCon not found in Sys:Tools - unable to include inline pictures in HTMLs'
  3368.  end
  3369. return DoPictures
  3370.  
  3371. Validtarget: PROCEDURE
  3372.  PARSE UPPER ARG str
  3373.  tval = substr(str,1,1)
  3374.  if verify(' BCDEFGIJKLMORSTUVWXYZ.,<>-=\|+_)(*&^%$@!~[]{}`',tval,m) > 1 then
  3375.   return 0
  3376.  return 1
  3377.  
  3378. AddPtoSN: PROCEDURE EXPOSE person.
  3379.  PARSE ARG irn, sn
  3380.  WriteLn('SN'sn,person.GETFIRSTNAME.irn)
  3381.  WriteLn('SN'sn,irn)
  3382.  return 0
  3383.  
  3384. AddNeetoSN: PROCEDURE EXPOSE person.
  3385.  PARSE ARG irn, sn
  3386.  WriteLn('SN'sn,person.GETFIRSTNAME.irn' -née 'person.GETLASTNAME.irn)
  3387.  WriteLn('SN'sn,irn)
  3388.  return 0
  3389.  
  3390. GetPerComp: PROCEDURE EXPOSE person. flags.
  3391.  PARSE ARG irn
  3392.  if irn = '' then return "" 
  3393.  if ~person.gotten.irn then do
  3394.   person.gotten.irn = 1
  3395.  
  3396. /* name */
  3397.   'GETFIRSTNAME' irn
  3398.   person.GETFIRSTNAME.irn = RESULT
  3399.   if person.GETFIRSTNAME.irn = '' then person.GETFIRSTNAME.irn = "_._"
  3400.   'GETLASTNAME' irn
  3401.   person.GETLASTNAME.irn = RESULT
  3402.   if person.GETLASTNAME.irn = '' then person.GETLASTNAME.irn = "_._"
  3403.   thelastname = GetLastName(person.GETLASTNAME.irn)
  3404. /* requires `thelastname' above */
  3405.   person.GETFULLNAME.irn = GetFullName(person.GETFIRSTNAME.irn)
  3406. /* gender */
  3407.   'GETSEX' irn
  3408.   person.GETSEX.irn = RESULT
  3409.   thegender = GETSEX.irn
  3410. /* special names; requires `thegender' above */
  3411.   person.MGETFULLNAME.irn = MGetFullName(person.GETFIRSTNAME.irn)
  3412.   person.PGETFULLNAME.irn = PGetFullName(person.GETFIRSTNAME.irn)
  3413. /* dates */
  3414.   'GETBIRTHDATE' irn
  3415.   person.GETBIRTHDATE.irn = RESULT
  3416.   'GETDEATHDATE' irn
  3417.   person.GETDEATHDATE.irn = RESULT
  3418.   if ( RESULT = "" ) & ( flags.VERSION > 5.07 ) then do
  3419.  
  3420. /*
  3421.  
  3422. Scion v5.08 (due for release early in the New Year) will have a new arexx
  3423. command - "GETISDEAD irn".
  3424.  
  3425. If -
  3426. (1) the person (irn) has a death date, or
  3427. (2) the person has a burial date, or
  3428. (3) the person's death date is "dead - no date", then
  3429.  
  3430. the function will return 1 (TRUE), else 0 (FALSE)
  3431.  
  3432. */
  3433.  
  3434.    'GETISDEAD' irn
  3435.    if RESULT then person.GETDEATHDATE.irn = "?"
  3436.    end
  3437.  
  3438. /* say 'person.GETDEATHDATE.irn 'person.GETDEATHDATE.irn */
  3439. /* places */
  3440.  
  3441.   'GETBIRTHPLACE' irn
  3442.   person.GETBIRTHPLACE.irn = RESULT
  3443.   'GETDEATHPLACE' irn
  3444.   person.GETDEATHPLACE.irn = RESULT
  3445.   end
  3446.  return 0 
  3447.  
  3448. askliving: PROCEDURE
  3449.  answer = ""
  3450.  say ' '
  3451.  call WriteCh(stdout,'     Exclude information about living persons? [y] ')
  3452.  PULL answer
  3453.  if substr(answer,1,1) = 'N' then return 0
  3454.  if substr(answer,1,1) = 'Q' then AskExit()
  3455.  return 2
  3456.  
  3457. askdepth: PROCEDURE
  3458.  answer = "0"
  3459.  return 0
  3460.  
  3461. /* under construction
  3462.  say ' '
  3463.  say ' The depth of the ancestor and descendant charts may be set to:'
  3464.  say ' '
  3465.  say ' '
  3466.  say ' 0       - unlimited ( show all )'
  3467.  say ' '
  3468.  say ' 2,3,4,5 - number of generations ( does not apply to ultimates )'
  3469.  say '                    ( ultimates refers to those persons who:   )'
  3470.  say '                    ( have no ancestors or have no descendants )'
  3471.  say ' '
  3472.  say ' '
  3473.  call WriteCh(stdout,'          Depth? ['answer'] ')
  3474.  PULL answer
  3475.  say ' '
  3476.  say ' Selected Depth = 'answer
  3477.  if answer > 1 and answer < 6 then return answer
  3478.  say ' '
  3479.  say ' All generations will be shown'
  3480.  return 0
  3481.  
  3482. under construction */
  3483.  
  3484.  /* Capitalize last name; also handle special cases! */
  3485.  /* End users may wish to customize this code */
  3486.  
  3487. GetLastName: PROCEDURE EXPOSE flags.
  3488.  
  3489. /* to use last names as is in data base, uncomment the following 2 lines: */
  3490. /* PARSE ARG str */
  3491. /* return str    */
  3492.  
  3493. /* otherwise, the following rules will be applied */
  3494.  
  3495.  PARSE upper ARG str
  3496.  
  3497. /* capitalize ( for html, the practice of all upper case surnames is unsightly */
  3498.  
  3499.  spart = translate(substr(str,2,length(str)),xrange('a','z'),xrange('A','Z'))
  3500.  spart = translate(substr(str,2,length(str)),xrange('à','ý'),xrange('À','Ý'))
  3501.  
  3502.  
  3503. /* special handling for specific DataBases "DBNAME" */
  3504.  
  3505.                                           /* my personal DataBase "IPOLYI" */
  3506.  if flags.DBNAME = "IPOLYI" then do
  3507.   if str = "BAUER-GAUSS" then return "Bauer-Gauss"
  3508.   if ( str = "DE IPOLYI" ) | ( str = "DEIPOLYI" ) then return "deIpolyi"
  3509.   if str = "MC GRADY" then return "McGrady"
  3510.   if str = "MCFEE" then return "McFee"
  3511.   if str = "KIS RED" then return "KisRed"
  3512.   if str = "ROTH-HACKENSCHMIDT" then return "Roth-Hackenschmidt"
  3513.   if str = "SCHüCH-GLICKHFELDEN" then return "Schüch-Glickhfelden"
  3514.   end
  3515.  
  3516.                                           /* my fictional DataBase "TARZAN" */
  3517.  if flags.DBNAME = "TARZAN" then do
  3518.   if str = "VONRUDERFRUD" then return "Von Ruderfrud"
  3519.   if str = "VONHARBEN" then return "Von Harben"
  3520.   end
  3521.  
  3522.                                           /* my test DataBase "TEST" */
  3523.  if flags.DBNAME = "TEST" then do
  3524.   if str = "PRETEST" then return "PreTest"
  3525.   end
  3526.  
  3527.  
  3528.  return substr(str,1,1)Space(spart)
  3529.  
  3530.