home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 13 / AACD13.ISO / AACD / Utilities / Scion2HTML / Scion2html.rexx < prev    next >
OS/2 REXX Batch file  |  2000-08-23  |  123KB  |  3,463 lines

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