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

📄 self.pm

📁 一个论文管理系统
💻 PM
字号:
# $Id: Self.pm,v 1.4 2005/07/20 18:30:18 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::CitationSource::Self class does NOT retrieve citation data; it# recognizes internal URL's, and converts abstract URI references to their# original URI's, or it simply complains that you shouldn't be bookmarking# whatever it is you're bookmarking.package Bibliotech::CitationSource::Self;use strict;use base 'Bibliotech::CitationSource';sub api_version {  1;}sub name {  'Self';}sub version {  '$Revision: 1.4 $';}sub understands {  my ($self, $uri) = @_;  return 0 unless $uri->scheme eq 'http';  my $location = $self->bibliotech->location or return 0;  return $uri->as_string =~ /^$location/;}sub filter {  my ($self, $uri) = @_;  # if they are adding a simple /uri/xxx link, convert it for them  my $location = $self->bibliotech->location;  if ($uri =~ m|^${location}uri/([^/]+)|) {    my $hash = $1;    if (Bibliotech::Bookmark::is_hash_format($hash)) {      my ($bookmark) = Bibliotech::Bookmark->search(hash => $hash);      if ($bookmark) {	my $new_uri = $bookmark->uri;	return $new_uri if $new_uri;      }    }  }  $self->errstr('Sorry, you cannot add a URI on this web site '.		'(if this is a bookmark, please use the copy function instead).');  return '';  # signal an abort!}# there is no citations() method because this module is not designed to get citations# we are just taking advantage of the filter() method to rewrite local domain URI's1;__END__

⌨️ 快捷键说明

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