/ Published in: Perl

Convert (comma separated) keywords to (space separated) tags in BibTeX files for use in social bibliography sites (bibsonomy.org, citeulike.org)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/usr/bin/perl -w use strict; use utf8; use encoding "utf8"; use Getopt::Std; use Text::BibTeX; # getopt(); our $opt_r; # # while (my $entry = new Text::BibTeX::Entry $oldfile, \*BIBFILE1) { next if !$entry->parse_ok; my $keywords = $entry->get ('keywords'); # my $title = $entry->get ('title'); # print "$title:\n" if (defined($title)); # print "$keywords\n-->\n"; ## my $tags; if (!$opt_r) { } else { # print "reverse\n"; } # print "/", $tags, "/\n\n"; ## $entry->set ('keywords', $tags); }
Comments
