- Author:
- David Nickerson <david.nickerson@gmail.com>
- Date:
- 2021-09-16 00:41:19+12:00
- Desc:
- Updating Noble 1962 model:
* Exposing the membrane potential to the top-level model;
* adding SED-ML for the paced and pacemaker variants of the model.
Using OpenCOR Snapshot release 2021-09-14.
- Permanent Source URI:
- https://models.fieldml.org/workspace/a1/rawfile/f954e59183314cd37f86c8832dc81317d01c8ec5/models/rebase-imports.pl
#!/usr/bin/perl
use strict;
use File::Find;
use File::Spec;
@ARGV = ('.') unless @ARGV;
sub processFile {
if (/\.xml$/) {
my $file = $_;
my $out = $file . ".tmp";
open IN,"<$file" or die "Error opening input file ($file): $!\n";
open OUT,">$out" or die "Error opening output file ($out): $!\n";
while (<IN>) {
if (/\"http:\/\/www.physiome.org.nz\/publications\/PBMB-2005-89\/Nickerson\/models\/(\S+)\"/) {
my $f = "/home/andre/pmr2/a1/models/" . $1;
my $r = File::Spec->abs2rel($f);
s/\"http:\/\/www.physiome.org.nz\/.*\"/\"$r\"/;
}
print OUT $_;
}
close OUT;
close IN;
system("mv $out $file");
}
}
find(\&processFile,@ARGV);
exit;