SELECT bib# FROM bib WHERE tag="856" AND text LIKE "http://www.aip.org/history/ohilist"
from pymarc import MARCReader, MARCWriter
reader = MARCReader(file(marcin))
writer = MARCWriter(file(marcout, 'w'))
recordcounter = 0
for record in reader:
if record['856'] is not None:
for field in record.get_fields('856'):
try:
if 'http://www.aip.org/history/ohilist' in field['u']:
print field['u']
writer.write(record)
recordcounter += 1
except:
pass
else:
pass
writer.close()
=LDR 01435npcaa2200349 a 4500
=005 20080228121100.0
=008 970114s1990||||mdu\\\\\|\\\\\\\\\\\eng|d
=035 \\ $a(NNAIP)IC33334
=040 \\ $aMdCpAIP$cMdCpAIP$eappm
=090 \\ $aOH30131
=100 1\ $aCrane, H. R.$q(Horace Richard),$d1907-
=245 10 $aOral history interview with H. R. Crane,$f1990 June 29.
=300 \\ $a1 session
=300 \\ $aTranscript, 9 pp.
=500 \\ $aInterview conducted by Charles F. Atchley, 29 June 1990.
=520 \\ $aPrimarily focusses on Crane's neutrino detection experiments, 1935-1948.
=540 \\ $aOral History Interview may be read and quoted by any researcher with an access application on file,
and excerpts may be copied.
=590 \\ $aIncluded in the American Institute of Physics' International Catalog of Sources for History of Physics
and Allied Sciences.
=650 \0 $aNeutrinos$xExperiments.
=655 \7 $aOral histories.$2aat
=655 \7 $aInterviews.$2aat
=655 \7 $aAudiotapes.$2aat
=655 \7 $aTranscripts.$2aat
=656 \7 $aPhysicists.$2lcsh
=796 1\ $aAtchley, Charles F.,$einterviewer.
=797 \\ $aAIP-ICOS
=852 \\ $aAmerican Institute of Physics.$bCenter for History of Physics. Niels Bohr Library.$eOne Physics Ellipse,
College Park, MD 20740, USA
=856 78 $uhttp://www.aip.org/history/ohilist/568.html$3(Transcript)
=904 \\ $aUSA
=982 \\ $a568
=998 \\ $aicos$b568$coh
=999 \\ $a568
<?
$ch = curl_init() or die(curl_error());
curl_setopt($ch, CURLOPT_URL, $atomic['href']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$rawtranscript = curl_exec($ch) or die(curl_error());
$pattern = "/<h1>Transcript<\/h1>([^\^]*?)<\/div>/";
$imgpattern = "/<img src=\"(Images\/[a-z0-9_]+\.jpg)\"/";
preg_match($pattern, $rawtranscript, $match);
preg_match($imgpattern, $rawtranscript, $imgmatch);
$atomic['transcript'] = htmlentities(str_replace("h1>", "h3>", str_replace("h3>", "h4>",
str_replace("\n</td>\n</tr>\n</table>\n</div>", "", $match[1]))));
$thumbnail = 'http://www.aip.org/history/ohilist/' . $imgmatch[1];
if($thumbnail != 'http://www.aip.org/history/ohilist/'){
$atomic['thumbnail'] = $thumbnail;
}
?>
<?php function unapi_show_oai_dc() {
global $postId, $blogName;
foreach(array_merge(get_posts('include=' . $postId), get_pages('include=' . $postId)) as $post) : setup_postdata($post);
?>
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:identifier><?php the_permalink_rss(); ?></dc:identifier>
<dc:title><?php the_title_rss(); ?></dc:title>
<dc:type>interview</dc:type>
<?php
foreach ( wp_get_object_terms($postId, 'auth') as $cat ) {
if ( $cat->name == "" ) continue;
?>
<dc:creator><?php echo $cat->name; ?></dc:creator>
<?php } ?>
<dc:publisher><?php echo htmlspecialchars($blogName); ?></dc:publisher>
<dc:date><?php the_date('r'); ?></dc:date>
<dc:format>application/xml</dc:format>
<dc:language><?php echo get_option('rss_language'); ?></dc:language>
<?php
foreach ( wp_get_object_terms($postId, 'subj') as $cat ) {
if ( $cat->name == "" ) continue;
?>
<dc:subject scheme="local"><?php echo $cat->name; ?></dc:subject>
<?php } ?>
<dc:description>'<?php echo the_excerpt_rss(); ?>'</dc:description>
</oai_dc:dc>
<?php
endforeach;
} ?>