Skip to content

Commit

Permalink
use url instead of PMID
Browse files Browse the repository at this point in the history
  • Loading branch information
lushl9301 committed Jun 9, 2015
1 parent 0f0539f commit d012b7f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
9 changes: 3 additions & 6 deletions htmlGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@
</head>
<body>"""
print head
urlHead = '<a href="http://www.ncbi.nlm.nih.gov/pubmed/?term='
urlHead = '<a href="'
urlTail = "</h3></a>"
for pmid in pmidList:
_pmid, title = pmid.split('#')
entry = urlHead + _pmid[6:-1] + '" target="_blank"><h3>' + _pmid[:-1] + urlTail
description = "<p>" + title[7:] + "</p>"

_pmid, title = pmid.split('!!')
entry = urlHead + _pmid[5:-1] + '" target="_blank"><h3>' + _pmid[5:-1] + urlTail
print entry
print description

tail = """
</body>
Expand Down
2 changes: 1 addition & 1 deletion jsonParser.pl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
next;
}
$result = decode_json($readinline);
$pmid = "PMID- 88888888\n";
$pmid = "URL- " . $result->{'url'} . "\n";
$title = "Title- " . $result->{'title'};
$abstract = "Abstract- " . $result->{'abstract'};

Expand Down
3 changes: 1 addition & 2 deletions keywords.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Text
Mining
use
#this key word will be ignore
#instead of write
#Text Mining
Expand Down
5 changes: 3 additions & 2 deletions preProcess.pl
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
if ($readinline =~ /^\n/) {
next;
}
$pmid = "";
$pmid = "URL- http://www.ncbi.nlm.nih.gov/pubmed/";
$title = "Title- ";
$abstract = "Abstract- ";

#PMID
$pmid .= $readinline;
$readinline =~ /(\d+)\n/;
$pmid .= $1 . "\n";


while ($readinline = <FILE>) {
Expand Down
2 changes: 1 addition & 1 deletion stem.pl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
if (/^\n/) {
print $output "\n";
}
if (/^PMID/) {
if (/^URL/) {
print $output $_;
$_ = <>;
}
Expand Down

0 comments on commit d012b7f

Please sign in to comment.