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