Imported cb2bib-1.4.4

Summary: Imported cb2bib-1.4.4
Keywords:

Imported cb2bib-1.4.4
into Git repository
parent bc7cc7b5
2011-01-23 RELEASE OF VERSION 1.4.4
2011-01-23 Consider import multi keywords BibTeX entries (Thanks to C. Dri)
2010-12-17 Added Cyrillic to ASCI transliteration (Thanks to V. Koval)
2010-12-06 Updated bookmark's file netqinf.txt
2010-11-24 Documented comma separated value CSV to BibTeX procedure (Thanks to G. Ranger)
2010-11-05 Fixed three bashisms in file c2btools/bib2pdf (Thanks to F. Rusconi)
2010-10-19 Set executable inside cmake build tree (Thanks to F. Rusconi)
2010-10-11 RELEASE OF VERSION 1.4.3
2010-10-11 Fixed two-letter initial, 'Yu. Last' author parsing
2010-10-10 Fixed trimming leading spaces in Annote verbatim sections
......
......@@ -102,7 +102,7 @@ if(APPLE)
set(MACOSX_BUNDLE_SHORT_VERSION_STRING "1.4")
set(MACOSX_BUNDLE_LONG_VERSION_STRING "1.4.2")
set(MACOSX_BUNDLE_BUNDLE_VERSION "1.4.2")
set(MACOSX_BUNDLE_COPYRIGHT "(C) 2004-2010 Pere Constans")
set(MACOSX_BUNDLE_COPYRIGHT "(C) 2004-2011 Pere Constans")
### ??
### set_source_files_properties(${ProjectName_RESOURCES} ${ProjectName_TRANSLATIONS} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
......
The cb2Bib. Copyright (C) 2004-2010 by Pere Constans
The cb2Bib. Copyright (C) 2004-2011 by Pere Constans
The cb2Bib includes third party GPL and LGPL code that is copyrighted by others:
......
......@@ -2,7 +2,7 @@
#-------------------------------------------------------------------------------
# c2bciter -- Wrapper for calling cb2Bib Citer
# cb2Bib Tools
# Copyright (C) 2004-2010 by Pere Constans
# Copyright (C) 2004-2011 by Pere Constans
# constans@molspaces.com
#
# Copyright (C) 2009 by Filippo Rusconi
......
......@@ -2,7 +2,7 @@
#-------------------------------------------------------------------------------
# c2bimport -- Script for calling cb2Bib in "Download Reference to cb2Bib" mode
# cb2Bib Tools
# Copyright (C) 2004-2010 by Pere Constans
# Copyright (C) 2004-2011 by Pere Constans
# constans@molspaces.com
#
# Copyright (C) 2009 by Filippo Rusconi
......
......@@ -3,7 +3,7 @@
# bib2pdf -- Script to convert BibTeX files to PDF
# cb2Bib Tools
#
# Copyright (C) 2005-2010 by Pere Constans
# Copyright (C) 2005-2011 by Pere Constans
# constans@molspaces.com
#
# Improvements and modifications:
......@@ -117,13 +117,13 @@ cp "$bib" "${tmp_dir}"/c2b_tmp.bib
cd "${tmp_dir}"
# There might be bibliography errors, do not stop.
set +e
"${latexCmd}" $latex_flags c2b_tmp >& /dev/null
"${latexCmd}" $latex_flags c2b_tmp > /dev/null 2>&1
"${bibtexCmd}" c2b_tmp
"${latexCmd}" $latex_flags c2b_tmp >& /dev/null
"${latexCmd}" $latex_flags c2b_tmp > /dev/null 2>&1
"${latexCmd}" $latex_flags c2b_tmp
if [ "x${dvi2pdfCmd}" != "x" ]
then
"${dvi2pdfCmd}" c2b_tmp >& /dev/null
"${dvi2pdfCmd}" c2b_tmp > /dev/null 2>&1
fi
# Make sure we trap errors.
......
......@@ -3,7 +3,7 @@
# isi2bib -- Script to convert ISI format to BibTeX
# cb2Bib Tools
#
# Copyright (C) 2005-2010 by Pere Constans
# Copyright (C) 2005-2011 by Pere Constans
# constans@molspaces.com
#
# Improvements and modifications:
......
......@@ -3,7 +3,7 @@
# ris2bib -- Script to convert RIS format to BibTeX
# cb2Bib Tools
#
# Copyright (C) 2005-2010 by Pere Constans
# Copyright (C) 2005-2011 by Pere Constans
# constans@molspaces.com
#
# Improvements and modifications:
......
......@@ -115,7 +115,7 @@ action=browse_referenceurl
# QUERY INFO FOR PNAS (Volume and Page)
# Extracts BibTeX reference and article PDF file
journal=Proceedings of the National Academy of Sciences of the United States of America|
query=http://www.pnas.org/search?submit=yes&submit=Submit&pubdate_year=&volume=<<volume>>&firstpage=<<pages>>&doi=&author1=&author2=&title=&andorexacttitle=and&titleabstract=&andorexacttitleabs=and&fulltext=&andorexactfulltext=and&fmonth=Jan&fyear=1915&tmonth=Jul&tyear=2010&tocsectionid=all&format=standard&hits=10&sortspec=relevance&submit=yes
query=http://www.pnas.org/search?submit=yes&submit=Submit&pubdate_year=&volume=<<volume>>&firstpage=<<pages>>&doi=&author1=&author2=&title=&andorexacttitle=and&titleabstract=&andorexacttitleabs=and&fulltext=&andorexactfulltext=and&fmonth=Jan&fyear=1915&tmonth=Jul&tyear=2011&tocsectionid=all&format=standard&hits=10&sortspec=relevance&submit=yes
capture_from_query=/content/(.+)\.(extract|abstract|full)
referenceurl_prefix=http://www.pnas.org/citmgr?type=bibtex&gca=pnas;
referenceurl_sufix=
......@@ -327,7 +327,7 @@ action=browse_query
# QUERY INFO FOR CR
# Uses <<post>> http method
journal=
query=<<post>>http://www.crossref.org/guestquery?search_type=journal&auth=&issn=&title=<<journal>>&art_title=&volume=<<volume>>&issue=&page=<<pages>>%20&year=&isbn=&comp_num=&series_title=&multi_hit=on&view_records=Search&bibsearch=bibsearch
query=<<post>>http://www.crossref.org/guestquery?search_type=journal&auth=&issn=&title=<<journal>>&art_title=&volume=<<volume>>&issue=&page=<<pages>>%20&year=&isbn=&comp_num=&series_title=&multi_hit=on&view_records=Search&queryType=bibsearch
capture_from_query=doi:(.+)</a>
referenceurl_prefix=http://dx.doi.org/
referenceurl_sufix=
......
......@@ -56,7 +56,7 @@ if(APPLE)
add_executable(cb2bib MACOSX_BUNDLE ${CB2BIB_CPP} ${CB2BIB_MOC} ${CB2BIB_UIH} ${CB2BIB_RCC} ${MODSINGAPP_CPP} ${MODSINGAPP_MOC})
else()
add_executable(cb2bib WIN32 ${CB2BIB_CPP} ${CB2BIB_MOC} ${CB2BIB_UIH} ${CB2BIB_RCC} ${MODSINGAPP_CPP} ${MODSINGAPP_MOC})
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/../../bin)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
endif()
if(C2B_USE_LZO)
target_link_libraries(cb2bib c2b ${LZO_LIBRARIES} ${QT_LIBRARIES})
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#include "bookmarkPlugin.h"
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#ifndef BOOKMARKPLUGIN_H
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#include "c2b.h"
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#ifndef C2B_H
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
*
* Class implementation of the approximate search algorithm
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
*
* Class implementation of the approximate search algorithm
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#include "authorString.h"
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#ifndef AUTHORSTRING_H
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#include "bibExtractor.h"
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#ifndef BIBEXTRACTOR_H
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#include "bibParser.h"
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#ifndef BIBPARSER_H
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#include "bibPreparser.h"
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#ifndef BIBPREPARSER_H
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#ifndef BIBREFERENCE_H
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#include "bibSearcher.h"
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#ifndef BIBSEARCHER_H
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#ifndef CB2BIB_CONF_PARAMETERS_H
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#ifndef CB2BIB_PARAMETERS_H
......@@ -33,7 +33,7 @@ const QString C2B_ICON_DISCONNECT_B("connect_no.png");
const QString C2B_ICON_VIEWBIB_B("viewbib.png");
const QString C2B_ICON_VIEWC2B_B("viewcb.png");
const QString C2B_ORGANIZATION("MOLspaces");
const QString C2B_VERSION("1.4.3");
const QString C2B_VERSION("1.4.4");
// File Manager Client
#ifdef Q_WS_X11
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#include "cb2bib_utilities.h"
......@@ -56,8 +56,32 @@ QString& simplifyString(QString& str)
return str;
}
static inline QString& _to_ascii_strip_diacritics(QString& str)
static const unsigned short _cyrillic_to_ascii[] =
{
// Code points 1024 to 1309
// See http://en.wikipedia.org/wiki/ISO_9
69, 69, 68, 71, 69, 90, 73, 73, 74, 76, 78, 67, 75, 73, 85, 68, 65,
66, 86, 71, 68, 69, 90, 90, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83,
84, 85, 70, 72, 67, 67, 83, 83, 698, 89, 697, 69, 85, 65, 97, 98, 118,
103, 100, 101, 122, 122, 105, 106, 107, 108, 109, 110, 111, 112, 114, 115, 116, 117,
102, 104, 99, 99, 115, 115, 698, 121, 697, 101, 117, 97, 101, 101, 100, 103, 101,
122, 105, 105, 106, 108, 110, 99, 107, 105, 117, 100, 1120, 1121, 69, 101, 1124, 1125,
1126, 1127, 1128, 1129, 65, 97, 1132, 1133, 1134, 1135, 1136, 1137, 70, 102, 89, 121, 89,
121, 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159,
1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 71, 103, 71, 103, 71, 103, 90, 122, 1176,
1177, 75, 107, 75, 107, 75, 107, 75, 107, 78, 110, 78, 110, 80, 112, 79, 111,
83, 115, 84, 116, 85, 117, 85, 117, 72, 104, 67, 99, 67, 99, 67, 99, 72,
104, 67, 99, 67, 99, 1216, 90, 122, 75, 107, 76, 108, 78, 110, 78, 110, 67,
99, 1229, 1230, 1231, 65, 97, 65, 97, 1236, 1237, 69, 101, 65, 97, 65, 97, 90,
122, 90, 122, 90, 122, 73, 105, 73, 105, 79, 111, 79, 111, 79, 111, 69, 101,
85, 117, 85, 117, 85, 117, 67, 99, 1270, 1271, 89, 121, 1274, 1275, 1276, 1277, 1278,
1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 78, 110, 1292, 1293, 84, 116,
1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 81, 113, 87, 119
};
static inline QString& _to_ascii_transliterate(QString& str)
{
// Strip diacritics, undo ligatures, transliterate
if (str.length() == 0)
return str;
ushort* const c0 = (ushort*)str.data();
......@@ -73,6 +97,21 @@ static inline QString& _to_ascii_strip_diacritics(QString& str)
++c;
if (*c < 128)
continue;
if (*c > 1023 && *c < 1310)
{
*c = _cyrillic_to_ascii[*c-1024];
if (*c == 1236)
{
*c = 198;
do_ligatures_198 = true;
}
if (*c == 1237)
{
*c = 230;
do_ligatures_230 = true;
}
continue;
}
QChar qc(*c);
if (!qc.isLetter())
continue;
......@@ -84,6 +123,12 @@ static inline QString& _to_ascii_strip_diacritics(QString& str)
case 248:
*c = QChar('o').unicode();
break;
case 272:
*c = QChar('D').unicode();
break;
case 273:
*c = QChar('d').unicode();
break;
case 321:
*c = QChar('L').unicode();
break;
......@@ -171,7 +216,7 @@ QString toAscii(const QString& str, const AsciiConversion type)
QString ascii(str);
if (type == FromBibTeX)
cleanEquations(ascii);
_to_ascii_strip_diacritics(ascii);
_to_ascii_transliterate(ascii);
if (type == Collation)
{
for (int i = 0; i < ascii.length(); ++i)
......@@ -181,7 +226,7 @@ QString toAscii(const QString& str, const AsciiConversion type)
}
if (type == KeepWords || type == FromBibTeX)
_to_ascii_keep_words(ascii);
else // Cleanup
else if (type == Cleanup)
ascii.remove(nonAsciiLetter);
return ascii;
}
......@@ -252,6 +297,8 @@ QString& c2bToBib(QString& str)
str.replace(QChar(263), "{\\'c}");
str.replace(QChar(268), "{\\v{C}}");
str.replace(QChar(269), "{\\v{c}}");
str.replace(QChar(272), "{\\DJ}");
str.replace(QChar(273), "{\\dj}");
str.replace(QChar(321), "{\\L}");
str.replace(QChar(322), "{\\l}");
str.replace(QChar(323), "{\\'N}");
......@@ -407,6 +454,8 @@ QString& bibToC2b(QString& str)
str.replace("{\\vC}", QChar(268));
str.replace("{{\\vc}}", QChar(269)); // {\\v{c}
str.replace("{\\vc}", QChar(269));
str.replace("{\\DJ}", QChar(272));
str.replace("{\\dj}", QChar(273));
str.replace("{\\L}", QChar(321));
str.replace("{\\l}", QChar(322));
str.replace("{\\'N}", QChar(323));
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#ifndef CB2BIB_UTILITIES_H
......@@ -23,7 +23,7 @@
namespace c2bUtils
{
enum AsciiConversion {Cleanup, Collation, FromBibTeX, KeepWords};
enum AsciiConversion {Cleanup, Collation, FromBibTeX, KeepWords, Transliterate};
extern QString setCapitalization(const QString& str);
extern QString toAscii(const QString& str, const AsciiConversion type);
extern QString& bibToC2b(QString& str);
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#include "compositePattern.h"
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#ifndef COMPOSITEPATTERN_H
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#include "coreBibParser.h"
......@@ -79,7 +79,7 @@ QString coreBibParser::referenceToFomattedBibTeX(const bibReference& ref) const
fvalue = '{' + fvalue + '}';
BibString += ",\n" + fd + padding + " = " + fvalue;
}
it++;
++it;
}
BibString += "\n}\n";
return BibString;
......@@ -100,7 +100,7 @@ QString coreBibParser::referenceToBibTeX(const bibReference& ref) const
const QString padding(QString().fill(' ', 12 - fd.length()));
BibString += ",\n" + fd + padding + " = {" + fvalue + '}';
}
it++;
++it;
}
BibString += "\n}\n";
return BibString;
......@@ -264,20 +264,48 @@ bibReference coreBibParser::wholeReference(const QString& str)
ref.typeName = _bib_type_re.cap(1).toLower();
setReferenceEnd(&str_ref, str_ref.length());
QString fvalue;
const int kwi(_bibliographic_fields.indexOf(QLatin1String("keywords")));
for (int i = 0; i < _bib_fields_re.count(); ++i)
{
QRegExp* bf = &_bib_fields_re[i];
pos = bf->indexIn(str_ref);
if (pos > 0)
if (i == kwi)
{
if (c2bUtils::inBraces(pos + bf->matchedLength(), str_ref, &fvalue))
ref[_bibliographic_fields.at(i)] = fvalue;
QString kwv;
if (pos > 0)
{
while (pos > -1)
{
if (c2bUtils::inBraces(pos + bf->matchedLength(), str_ref, &fvalue))
kwv += ';' + fvalue;
pos = bf->indexIn(str_ref, pos + bf->matchedLength());
}
}
else
{
bf = &_bib_fields_nb_re[i];
pos = bf->indexIn(str_ref);
while (pos > -1)
{
kwv += ';' + bf->cap(1);
pos = bf->indexIn(str_ref, pos + bf->matchedLength());
}
}
ref[_bibliographic_fields.at(i)] = kwv;
}
else
{
bf = &_bib_fields_nb_re[i];
if (bf->indexIn(str_ref) > -1)
ref[_bibliographic_fields.at(i)] = bf->cap(1);
if (pos > 0)
{
if (c2bUtils::inBraces(pos + bf->matchedLength(), str_ref, &fvalue))
ref[_bibliographic_fields.at(i)] = fvalue;
}
else
{
bf = &_bib_fields_nb_re[i];
if (bf->indexIn(str_ref) > -1)
ref[_bibliographic_fields.at(i)] = bf->cap(1);
}
}
}
return ref;
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#ifndef COREBIBPARSER_H
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#include "document.h"
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#ifndef DOCUMENT_H
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#include "documentCache.h"
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#ifndef DOCUMENTCACHE_H
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#ifndef DOCUMENTCONTENTS_H
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#include "heuristicBibParser.h"
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#ifndef HEURISTICBIBPARSER_H
......
......@@ -34,7 +34,7 @@ GET_REFERENCES
<tr class="footer">
<td width="100%" align="left">
<a href="http://www.molspaces.com/cb2bib/index.html">The cb2Bib / version GET_CB2BIB_VERSION_NUMBER</a>.
Copyright &copy; 2004-2010 by Pere Constans. Licensed under the terms of the
Copyright &copy; 2004-2011 by Pere Constans. Licensed under the terms of the
<a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a> version 3.
</td>
</tr>
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-2011 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.4. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
*
* Improvements and modifications:
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* Copyright (C) 2004-201