[Pansophy] I have updated the Travelerization process for SN/SNType
Valerie Bookwalter
bookwalt at jlab.org
Tue May 3 16:24:34 EDT 2022
Allen,
If you receive errors in processing a traveler, please let me know so I can see if my new changes caused the errors or something the author did.
Thanks!
Megan/David,
I have updated the following files:
Travelerization.pl
TemplateDataFooter.txt
TemplateDataFooterPgN.txt
The DataFooter files received the code: &SNType=#url.sntype#
Added to the <CFLOCATION> tag.
The Perl Script:
I modified the processDataFiles area
Lines 826-835:
sub processDataFiles
{
#==================================
# add processing for SN on page 1
# mysn / myct / mysnset added
# VDB 03May2022
#==================================
$mysn='';
$myct='';
$mysnset=0;
Lines 923-936 where the SNs are processed:
elsif($ct =~ m/SN$/)
{ print(DATAFILE "<CFIF isdefined(\'form.$arraylabels[$i]\') >
$arraylabels[$i]='#form.$arraylabels[$i]#',</CFIF> \n");
#==================================
# add processing for SN on page 1
# mysn / myct / mysnset added
# VDB 03May2022
#==================================
if ($pg == 1 && $mysnset == 0) {
$mysn = "$arraylabels[$i]";
$myct = "$ct";
$mysnset = 1;
}
}
Lines 1136-1147 where it writes before the CFLOCATION tag:
#==================================
# add processing for SN on page 1
# mysn / myct / mysnset added
# VDB 03May2022
#==================================
if ($pg == 1 && $mysnset == 1) {
print(DATAFILE "<CFIF isdefined(\'form.$mysn\') > \n");
print(DATAFILE "<CFSET url.serialnum = \"#form.$mysn#\"/> \n");
print(DATAFILE "<CFSET url.sntype = \"$myct\"/> \n");
print(DATAFILE "</CFIF> \n");
}
I ran 2 test cases with files in newhtmfiles area and it appears to work.
You can look through my changes and let me know if you see any errors.
Thanks!
Valerie Bookwalter
Jefferson Lab, SRF Department
Pansophy Team
1-757-269-5802 (OFFICE - currently working offsite)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jlab.org/pipermail/pansophy/attachments/20220503/6cdf11a5/attachment.html>
More information about the Pansophy
mailing list