⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ris.pm

📁 一个论文管理系统
💻 PM
字号:
# $Id: RIS.pm,v 1.6 2005/11/17 21:25:36 martin Exp $## Copyright 2005 Nature Publishing Group# This program is free software; you can redistribute it and/or# modify it under the terms of the GNU General Public License# as published by the Free Software Foundation; either version 2# of the License, or (at your option) any later version.## The Bibliotech::Import class is a base class for import modulespackage Bibliotech::Import::RIS;use strict;use base 'Bibliotech::Import';use Bibliotech::Const;sub name {  'RIS';}sub version {  1.0;}sub api_version {  1;}sub mime_types {  (RIS_MIME_TYPE);}sub extensions {  ('ris');}sub understands {  $_[1] =~ /^TY  - \w+$/m ? 1 : 0;}sub parse {  my $self = shift;  my $doc = $self->doc;  $doc = "\n$doc\n";  my $blocks = new Bibliotech::Import::EntryList;  while ($doc =~ /( ^TY\ \ -\ .*?		    ^ER\ \ -\s*$ )/xgsm) {    $blocks->push(new Bibliotech::Import::RIS::Entry ($1));  }  $self->data($blocks);  return 1;}package Bibliotech::Import::RIS::Entry;use strict;use base 'Bibliotech::Import::Entry::FromData';sub parse {  my ($self, $importer) = @_;  my $block = $self->block or die 'no block';  my $ris_parser = new Bibliotech::CitationSource::NPG::RIS::Result ($block) or die 'no RIS parser';  my $ris_type = $ris_parser->ris_type;  $ris_parser->is_valid_ris_type      or die "This record will not be added to your library because the type of entry is not recognised (RIS type \"$ris_type\" is not understood).\n";  my $noun = $importer->noun;  $ris_parser->type($noun);  $ris_parser->source($noun.' Import');  $self->data($ris_parser);  $self->parse_ok(1);  return 1;}sub raw_keywords {  return Set::Array->new(shift->data->keywords)->flatten;}sub keywords {  shift->split_keywords(qr/[,;\n] */,			"RIS keyword line starting with \"%s\" split on commas, semicolons, and newlines.");}1;__END__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -