Imported cb2bib-1.4.3

Summary: Imported cb2bib-1.4.3
Keywords:

Imported cb2bib-1.4.3
into Git repository
parent abe80c3e
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
2010-10-10 Removed hard-coded monospace font in Annote's CSS file
2010-10-10 Fixed opened files seen as modified in when using Qt 4.7.0
2010-09-11 RELEASE OF VERSION 1.4.2
2010-08-31 Added initial cmake configure/build/install
2010-08-31 Set fixes and testing cmake configure/build on MacOSX (Thanks to D. Swain)
2010-08-30 Set calling external tools path independent on MacOSX (Thanks to C. Szepesvari)
2010-08-22 Minor code cleanup
2010-08-21 Fixed wrong author parsing if ForeName is missing in XML PubMed (Thanks to F. Rusconi)
2010-05-24 RELEASE OF VERSION 1.4.1
2010-05-23 Improved journal recognition
2010-05-22 Updated bookmark's file netqinf.txt
2010-05-22 Skip saving void documents when "Download document if available" is checked
2010-05-22 Check for document existence and mimetype prior to downloading
2010-05-22 Refactored network classes
2010-04-24 RELEASE OF VERSION 1.4.0
2010-04-23 Set c2bCiter to remember display format
2010-04-22 Set clipboard connected mode default in c2bCiter
......
#-------------------------------------------------------------------------------
# cb2bib cmake build script
#-------------------------------------------------------------------------------
include(cmake/modules/c2bUtilities.cmake)
#-------------------------------------------------------------------------------
# cb2bib cmake options and defaults
#-------------------------------------------------------------------------------
project(cb2bib)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
if(WIN32)
set(CMAKE_INSTALL_PREFIX "C:\Program Files" CACHE PATH "Default install path prefix" FORCE)
elseif(APPLE)
set(CMAKE_INSTALL_PREFIX "/Applications" CACHE PATH "Default install path prefix" FORCE)
else()
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Default install path prefix" FORCE)
endif()
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
if(CMAKE_BUILD_TYPE STREQUAL "")
set(CMAKE_BUILD_TYPE Release)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-DC2B_DEBUG)
endif()
option(C2B_USE_WEBKIT "Link cb2bib against QtWebKit library." ON)
option(C2B_USE_LZO "Link cb2bib against lzo2 library." ON)
if(UNIX AND NOT APPLE)
option(C2B_USE_CBPOLL "Use clipboardPoll." ON)
path_option(C2B_INSTALL_BIN_DIR "Executables installation directory [default: CMAKE_INSTALL_PREFIX/bin]." "${CMAKE_INSTALL_PREFIX}/bin")
path_option(C2B_INSTALL_DATA_DIR "Data installation directory [default: CMAKE_INSTALL_PREFIX/share/cb2bib]." "${CMAKE_INSTALL_PREFIX}/share/cb2bib")
path_option(C2B_INSTALL_DESKTOP_DIR "Desktop file installation directory [default: CMAKE_INSTALL_PREFIX/share/applications]." "${CMAKE_INSTALL_PREFIX}/share/applications")
path_option(C2B_INSTALL_ICON_DIR "Icon file directory [default: CMAKE_INSTALL_PREFIX/share/pixmaps]." "${CMAKE_INSTALL_PREFIX}/share/pixmaps")
endif(UNIX AND NOT APPLE)
if(APPLE)
set(C2B_USE_CBPOLL OFF)
path_option(C2B_INSTALL_BIN_DIR "Executables installation directory [default: CMAKE_INSTALL_PREFIX/cb2bib.app/Contents/MacOS]." "${CMAKE_INSTALL_PREFIX}/cb2bib.app/Contents/MacOS")
path_option(C2B_INSTALL_DATA_DIR "Data installation directory [default: CMAKE_INSTALL_PREFIX/cb2bib.app/Contents/Resources]." "${CMAKE_INSTALL_PREFIX}/cb2bib.app/Contents/Resources")
endif(APPLE)
if(WIN32)
set(C2B_USE_CBPOLL OFF)
path_option(C2B_INSTALL_BIN_DIR "Executables installation directory [default: CMAKE_INSTALL_PREFIX\cb2bib]." "${CMAKE_INSTALL_PREFIX}\cb2bib")
endif(WIN32)
if(C2B_USE_LZO)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
find_package(LZO REQUIRED)
include_directories(${LZO_INCLUDE_DIR})
add_definitions(-DC2B_USE_LZO)
endif(C2B_USE_LZO)
message("-- cb2bib uses QtWebKit library: ${C2B_USE_WEBKIT}")
message("-- cb2bib uses lzo2 library: ${C2B_USE_LZO}")
message("-- cb2bib executables installation directory: ${C2B_INSTALL_BIN_DIR}")
message("-- cb2bib data installation directory: ${C2B_INSTALL_DATA_DIR}")
if(UNIX AND NOT APPLE)
message("-- cb2bib desktop file installation directory: ${C2B_INSTALL_DESKTOP_DIR}")
message("-- cb2bib icon file installation directory: ${C2B_INSTALL_ICON_DIR}")
endif(UNIX AND NOT APPLE)
message("-- Build type: ${CMAKE_BUILD_TYPE}")
configure_file(${CMAKE_SOURCE_DIR}/src/c2b/cb2bib_conf_parameters.h.in ${CMAKE_CURRENT_BINARY_DIR}/cb2bib_conf_parameters.h @ONLY)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
#-------------------------------------------------------------------------------
# general settings
#-------------------------------------------------------------------------------
cmake_minimum_required(VERSION 2.6)
set(CMAKE_COLOR_MAKEFILE ON)
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CB2BIB_MINIMUM_REQUIRED_QT "4.4.0")
#-------------------------------------------------------------------------------
# build tree structure
#-------------------------------------------------------------------------------
if(WIN32)
subdirs(src/c2b src src/win)
else()
subdirs(src/c2b src)
endif()
#-------------------------------------------------------------------------------
# installs
#-------------------------------------------------------------------------------
if(UNIX AND NOT APPLE)
install(PROGRAMS c2bscripts/c2bciter DESTINATION ${C2B_INSTALL_BIN_DIR})
install(PROGRAMS c2bscripts/c2bimport DESTINATION ${C2B_INSTALL_BIN_DIR})
install(FILES AUTHORS COPYRIGHT LICENSE CHANGELOG DESTINATION ${C2B_INSTALL_DATA_DIR})
install(DIRECTORY data c2btools testPDFImport DESTINATION ${C2B_INSTALL_DATA_DIR})
install(FILES c2bscripts/cb2bib.desktop c2bscripts/c2bciter.desktop c2bscripts/c2bimport.desktop DESTINATION ${C2B_INSTALL_DESKTOP_DIR})
install(FILES src/icons/cb2bib.png DESTINATION ${C2B_INSTALL_ICON_DIR})
endif(UNIX AND NOT APPLE)
if(APPLE)
install(PROGRAMS ./c2bscripts/c2bciter DESTINATION ${C2B_INSTALL_BIN_DIR})
install(PROGRAMS ./c2bscripts/c2bimport DESTINATION ${C2B_INSTALL_BIN_DIR})
install(FILES AUTHORS COPYRIGHT LICENSE CHANGELOG DESTINATION ${C2B_INSTALL_DATA_DIR})
install(DIRECTORY data c2btools testPDFImport DESTINATION ${C2B_INSTALL_DATA_DIR})
set(MACOSX_BUNDLE_BUNDLE_NAME cb2bib)
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.MOLspaces.cb2Bib")
set(MACOSX_BUNDLE_ICON_FILE src/icons/cb2bib.icns)
set(MACOSX_BUNDLE_INFO_STRING "A tool for rapidly extracting unformatted bibliographic references")
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_source_files_properties(${ProjectName_RESOURCES} ${ProjectName_TRANSLATIONS} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
##
### According to http://cmake.org/Wiki/CMake:Bundles_And_Frameworks, appl1_aux1 and appl1_aux2 would be c2bciter and c2bimport
###/Applications/
### appl1.app/
### Contents/
### Info.plist
### MacOS/
### appl1 -> appl1-1
### appl1-1
### appl1_aux1
### appl1_aux2
### Resources/
### appl1_res1
### appl1_res2
##
## # are they set as executable ? how if orig files were executable already ? are they seen as execs from the gui ?
## set_source_files_properties(c2bscripts/c2bciter c2bscripts/c2bimport PROPERTIES MACOSX_PACKAGE_LOCATION MacOS)
## # is this correct ? how about data c2btools testPDFImport directories ?
## set_source_files_properties(AUTHORS COPYRIGHT LICENSE CHANGELOG PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
## # need this to copy icon ?
## set_source_files_properties(MACOSX_BUNDLE_ICON_FILE PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
endif(APPLE)
if(WIN32)
endif(WIN32)
#-------------------------------------------------------------------------------
\ No newline at end of file
......@@ -3,4 +3,3 @@ win32 {
SUBDIRS += src/win
}
TEMPLATE = subdirs
CONFIG += warn_on qt thread
#-------------------------------------------------------------------------------
# cb2bib cmake
#-------------------------------------------------------------------------------
To CONFIGURE cb2bib build, from the base directory, type
cd cmake/build
cmake ../..
To find out and eventually modify the build options, type
cmake -i ../..
To COMPILE cb2bib, type
make
To INSTALL cb2bib, type
make install/strip
For make options, type
make help
#-------------------------------------------------------------------------------
EXAMPLE: Configure, compile, and install to a non-default location
cd cmake/build
cmake ../.. -DCMAKE_INSTALL_PREFIX=/usr/local
make
make install/strip
#-------------------------------------------------------------------------------
\ No newline at end of file
#-------------------------------------------------------------------------------
# cb2bib cmake lzo find module
#-------------------------------------------------------------------------------
# Modified FindLZO.cmake module from the LGPL 3.0 project blobseer
# http://blobseer.gforge.inria.fr/doku.php
#-------------------------------------------------------------------------------
# Find liblzo2
# LZO_FOUND - system has LZO2 library
# LZO_INCLUDE_DIR - LZO2 include directory
# LZO_LIBRARIES - The libraries needed to use LZO2
#-------------------------------------------------------------------------------
if (LZO_INCLUDE_DIR AND LZO_LIBRARIES)
# in cache already
SET(LZO_FOUND TRUE)
else (LZO_INCLUDE_DIR AND LZO_LIBRARIES)
FIND_PATH(LZO_INCLUDE_DIR lzo/lzoconf.h
${LZO_ROOT}/include/lzo/
/usr/include/lzo/
/usr/local/include/lzo/
/sw/lib/lzo/
/sw/local/lib/lzo/
)
if(WIN32 AND MSVC)
else(WIN32 AND MSVC)
FIND_LIBRARY(LZO_LIBRARIES NAMES lzo2
PATHS
${LZO_ROOT}/lib
/sw/lib
/sw/local/lib
/usr/lib
/usr/local/lib
)
endif(WIN32 AND MSVC)
if (LZO_INCLUDE_DIR AND LZO_LIBRARIES)
set(LZO_FOUND TRUE)
endif (LZO_INCLUDE_DIR AND LZO_LIBRARIES)
if (LZO_FOUND)
if (NOT LZO_FIND_QUIETLY)
message(STATUS "Found LZO2: ${LZO_LIBRARIES}")
endif (NOT LZO_FIND_QUIETLY)
else (LZO_FOUND)
if (LZO_FIND_REQUIRED)
message(FATAL_ERROR "Could NOT find LZO2")
endif (LZO_FIND_REQUIRED)
endif (LZO_FOUND)
MARK_AS_ADVANCED(LZO_INCLUDE_DIR LZO_LIBRARIES)
endif (LZO_INCLUDE_DIR AND LZO_LIBRARIES)
#-------------------------------------------------------------------------------
\ No newline at end of file
#-------------------------------------------------------------------------------
# cb2bib cmake build macros
#-------------------------------------------------------------------------------
macro(PATH_OPTION VAR DESCRIPTION DEFAULT)
if(DEFINED ${VAR})
set(${VAR} ${${VAR}} CACHE PATH "${DESCRIPTION}" FORCE)
else()
set(${VAR} ${DEFAULT} CACHE PATH "${DESCRIPTION}" FORCE)
endif()
endmacro(PATH_OPTION)
macro(LIST_SOURCE_FILES_AT CPP H MOCH RPATH)
file(GLOB ${CPP} RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${RPATH}*.cpp")
file(GLOB ${H} RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${RPATH}*.h")
set(${MOCH})
foreach(_file ${${H}})
file(READ ${_file} _contents)
string(REGEX MATCH "[\n\r] *Q_OBJECT" _match "${_contents}")
if(_match)
list(APPEND ${MOCH} ${_file})
endif(_match)
endforeach(_file ${${H}})
endmacro(LIST_SOURCE_FILES_AT)
macro(LIST_SOURCE_FILES CPP H MOCH)
list_source_files_at(${CPP} ${H} ${MOCH} "")
endmacro(LIST_SOURCE_FILES)
#-------------------------------------------------------------------------------
\ No newline at end of file
......@@ -119,7 +119,7 @@ Options:
--bindir dir Executable installation directory
[default: /usr/bin]
--datadir dir Data installation directory
[default: /usr/share/bin/cb2bib]
[default: /usr/share/cb2bib]
--enable-lzo Enable linking with lzo library [default]
--disable-lzo Disable linking with lzo library
--enable-qmake-call Enable configure to call qmake [default]
......
......@@ -162,7 +162,9 @@ BB|Biotechnol. Bioeng.|Biotechnology and Bioengineering
BBE|Biotechnol. Biotechnol. Equip.|Biotechnology and Biotechnological Equipment
BBGPC|Ber. Bunsen-Ges. Phys. Chem.|Berichte der Bunsen-Gesellschaft für Physikalische Chemie
B|Biochemistry|Biochemistry
B|Bioinformatics|Bioinformatics
B|Biomacromolecules|Biomacromolecules
B|Biometrika|Biometrika
BBRC|Biochem. Biophys. Res. Commun.|Biochemical and Biophysical Research Communications
BCB|Biochem. Cell Biol.|Biochemistry and Cell Biology-Biochimie et Biologie Cellulaire
BC|Bioconjugate Chem.|Bioconjugate Chemistry
......@@ -195,6 +197,7 @@ BMBI|Biochem. Mol. Biol. Int.|Biochemistry and Molecular Biology International
BM|Biol. Membr.|Biological Membranes
BM|Biomed. Microdevices|Biomedical Microdevices
BMC|Bioorg. Med. Chem.|Bioorganic and Medicinal Chemistry
BMCB|BMC Bioinformatics|BioMed Central Bioinformatics
BMCL|Bioorg. Med. Chem. Lett.|Bioorganic and Medicinal Chemistry Letters
BMMB|Biochem. Med. Metab. Biol.|Biochemical Medicine and Metabolic Biology
BMM|Biochem. Mol. Med.|Biochemical and Molecular Medicine
......@@ -275,7 +278,7 @@ CGD|Cryst. Growth Des.|Crystal Growth and Design
CHC|Chem. Heterocycl. Compd.|Chemistry of Heterocyclic Compounds
CIC|Comments Inorg. Chem.|Comments on Inorganic Chemistry
CI|Ceram. Int.|Ceramics International
CI|Chem. Ind. (london)|Chemistry and Industry
CI|Chem. Ind. (London)|Chemistry and Industry
CI|Compos. Interfaces|Composite Interfaces
CI|Concr. Int.|Concrete International
CILS|Chemom. Intell. Lab. Syst.|Chemometrics and Intelligent Laborary Systems
......@@ -805,7 +808,6 @@ JNR|J. Neurosci. Res.|Journal of Neuroscience Research
JNST|J. Nucl. Sci. Technol.|Journal of Nuclear Science and Technology
JOC|J. Organomet. Chem.|Journal of Organometallic Chemistry
JOC|J. Org. Chem.|Journal of Organic Chemistry
JOM|JOM|JOM Journal of the Minerals Metals and Materials Society
JOSABOP|J. Opt. Soc. Am. B: Opt. Phys.|Journal of the Optical Society of America B: Optical Physics
JPAMG|J. Phys. A: Math. Gen.|Journal of Physics A: Mathematical and General
JPBA|J. Pharm. Biomed. Anal.|Journal of Pharmaceutical and Biomedical Analysis
......@@ -1074,6 +1076,7 @@ OSE|Ozone Sci. Eng.|Ozone Science and Engineering
OS|Opt. Spectrosc.|Optics and Spectroscopy
OS|Opt. Spektrosk.|Optika i Spektroskopiya
OZ|Opt. Zh.|Opticheskii Zhurnal
P|Peptides|Peptides
PAC|Polycyclic Aromat. Compd.|Polycyclic Aromatic Compounds
PAC|Pure Appl. Chem.|Pure and Applied Chemistry
PACSDPC|Prepr. - Am. Chem. Soc., Div. Pet. Chem.|Preprints - American Chemical Society, Division of Petroleum Chemistry
......@@ -1304,7 +1307,6 @@ TEE|Trace Elem. Electrolytes|Trace Elements and Electrolytes
TE|Tissue Eng.|Tissue Engineering
TFCE|Theor. Found. Chem. Eng.|Theoretical Foundations of Chemical Engineering
TFS|Top. Fluoresc. Spectrosc.|Topics in Fluorescence Spectroscopy
THEOCHEM|THEOCHEM|THEOCHEM Journal of Molecular Structure
TIC|Top. Inorg. Chem.|Topics in Inorganic Chemistry
TIMF|Trans. Inst. Met. Finish.|Transactions of the Institution of Metal Finishing
TIMMSA|Trans. Inst. Min. Metall., Sect. A|Transactions of the Institution of Mining and Metallurgy Section A
......
......@@ -37,7 +37,7 @@ bookmark=Search ISBN Database|http://isbndb.com/search-all.html?kw=<<isbn>>
bookmark=Open DOI Document|http://dx.doi.org/<<doi>>
# CR subscribers might consider its bookmark as:
# bookmark=Current 'Journal-Volume-Page' to DOI|http://doi.crossref.org/resolve?pid=<USR>:<PWD>&aulast=&title=<<journal>>&volume=<<volume>>&issue=&page=<<pages>>&year=&isbn=&comp_num=&series_title=
# See http://www.crossref.org/02publishers/25query_spec.html#Anchor-OpenUR-43032
# See http://www.crossref.org/help/
##################
# EDITOR BOOKMARKS
......@@ -197,8 +197,8 @@ query=http://www.ncbi.nlm.nih.gov/sites/entrez?orig_db=PubMed&db=PubMed&cmd=Sear
capture_from_query=\bPMID: (\d+)\D
referenceurl_prefix=http://www.ncbi.nlm.nih.gov/pubmed/
referenceurl_sufix=?report=xml&format=text
pdfurl_prefix=
pdfurl_sufix=
pdfurl_prefix=http://www.ncbi.nlm.nih.gov/pmc/articles/pmid/
pdfurl_sufix=/pdf/
action=htm2txt_referenceurl
# QUERY INFO FOR PROLA
......@@ -231,8 +231,8 @@ query=http://www.ncbi.nlm.nih.gov/sites/entrez?orig_db=PubMed&db=PubMed&cmd=Sear
capture_from_query=\bPMID: (\d+)\D
referenceurl_prefix=http://www.ncbi.nlm.nih.gov/pubmed/
referenceurl_sufix=?report=xml&format=text
pdfurl_prefix=
pdfurl_sufix=
pdfurl_prefix=http://www.ncbi.nlm.nih.gov/pmc/articles/pmid/
pdfurl_sufix=/pdf/
action=htm2txt_referenceurl
# QUERY INFO FOR PubMed
......@@ -243,8 +243,8 @@ query=http://www.ncbi.nlm.nih.gov/sites/entrez?orig_db=PubMed&db=PubMed&cmd=Sear
capture_from_query=\bPMID: (\d+)\D
referenceurl_prefix=http://www.ncbi.nlm.nih.gov/pubmed/
referenceurl_sufix=?report=xml&format=text
pdfurl_prefix=
pdfurl_sufix=
pdfurl_prefix=http://www.ncbi.nlm.nih.gov/pmc/articles/pmid/
pdfurl_sufix=/pdf/
action=htm2txt_referenceurl
# QUERY INFO FOR ACS
......@@ -306,24 +306,13 @@ journal=Journal of Chemical Physics|JCP
journal=Journal of Applied Physics|JAP
journal=Journal of Mathematical Physics|JMP
query=http://link.aip.org/link/?<<journal>>/<<volume>>/<<pages>>
capture_from_query="SelectCheck" value="([\w\d]+)"
capture_from_query=filetype=pdf&amp;id=([\w\d]+)&amp;
referenceurl_prefix=http://scitation.aip.org/getabs/servlet/GetCitation?fn=view_bibtex2&source=scitation&PrefType=ARTICLE&PrefAction=Add+Selected&SelectCheck=
referenceurl_sufix=&downloadcitation=+Go+
pdfurl_prefix=http://scitation.aip.org/getpdf/servlet/GetPDFServlet?filetype=pdf&id=
pdfurl_sufix=&idtype=cvips
action=
# QUERY INFO FOR Scitation
# Extracts BibTeX reference
journal=
query=http://scitation.aip.org/vsearch/servlet/VerityServlet?KEY=FREESR&possible1=<<doi>>&frommonth=Jan&fromyear=1893&tomonth=May&toyear=2010&x=34&y=10&=search&smode=results&CURRENT=&ONLINE=&SMODE=&possible1zone=article&maxdisp=10
capture_from_query="SelectCheck" value="([\w\d]+)"
referenceurl_prefix=http://scitation.aip.org/getabs/servlet/GetCitation?fn=view_bibtex2&source=scitation&PrefType=ARTICLE&PrefAction=Add+Selected&SelectCheck=
referenceurl_sufix=&downloadcitation=+Go+
pdfurl_prefix=
pdfurl_sufix=
action=
# QUERY INFO FOR DOI
# If DOI is known, and so far the reference is not found, at least browse reference
journal=
......@@ -338,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>>&volume=<<volume>>&issue=&page=<<pages>>&year=&isbn=&comp_num=&series_title=&multi_hit=on&view_records=Search
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
capture_from_query=doi:(.+)</a>
referenceurl_prefix=http://dx.doi.org/
referenceurl_sufix=
......@@ -354,8 +343,8 @@ query=http://www.ncbi.nlm.nih.gov/sites/entrez?orig_db=PubMed&db=pubmed&cmd=Sear
capture_from_query=\bPMID: (\d+)\D
referenceurl_prefix=http://www.ncbi.nlm.nih.gov/pubmed/
referenceurl_sufix=?report=xml&format=text
pdfurl_prefix=
pdfurl_sufix=
pdfurl_prefix=http://www.ncbi.nlm.nih.gov/pmc/articles/pmid/
pdfurl_sufix=/pdf/
action=htm2txt_referenceurl
# QUERY INFO FOR Google Scholar
......
......@@ -48,7 +48,7 @@ background-color: #AEAEA3;
border-color: #72726A;
border-style: solid;
border-width: 1px;
font-family: Bitstream Vera Sans Mono, monospace;
font-family: monospace;
font-size: 80%;
padding: 10px;
}
......
#-------------------------------------------------------------------------------
# cb2bib cmake build script
# - build cb2bib
#-------------------------------------------------------------------------------
list_source_files(CB2BIB_CPP CB2BIB_H CB2BIB_MOCH)
if(C2B_USE_WEBKIT)
find_package(Qt4 ${CB2BIB_MINIMUM_REQUIRED_QT} COMPONENTS QtCore QtNetwork QtGui QtWebKit REQUIRED)
add_definitions(-DC2B_USE_WEBKIT)
else()
find_package(Qt4 ${CB2BIB_MINIMUM_REQUIRED_QT} COMPONENTS QtCore QtNetwork QtGui REQUIRED)
list(REMOVE_ITEM CB2BIB_CPP c2bAnnote.cpp)
list(REMOVE_ITEM CB2BIB_CPP c2bWebBrowser.cpp)
list(REMOVE_ITEM CB2BIB_H c2bAnnote.h)
list(REMOVE_ITEM CB2BIB_H c2bWebBrowser.h)
list(REMOVE_ITEM CB2BIB_MOCH c2bAnnote.h)
list(REMOVE_ITEM CB2BIB_MOCH c2bWebBrowser.h)
endif()
if(C2B_USE_CBPOLL)
add_definitions(-DC2B_USE_CBPOLL)
else()
list(REMOVE_ITEM CB2BIB_CPP clipboardPoll.cpp)
list(REMOVE_ITEM CB2BIB_H clipboardPoll.h)
list(REMOVE_ITEM CB2BIB_MOCH clipboardPoll.h)
endif()
qt4_wrap_cpp(CB2BIB_MOC ${CB2BIB_MOCH})
file(GLOB CB2BIB_UI RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.ui")
qt4_wrap_ui(CB2BIB_UIH ${CB2BIB_UI})
qt4_add_resources(CB2BIB_RCC cb2bib.qrc)
list_source_files_at(MODSINGAPP_CPP MODSINGAPP_H MODSINGAPP_MOCH qtsingleapplication/src/)
if(WIN32)
list(REMOVE_ITEM MODSINGAPP_CPP qtsingleapplication/src/qtlockedfile_unix.cpp)
else()
list(REMOVE_ITEM MODSINGAPP_CPP qtsingleapplication/src/qtlockedfile_win.cpp)
endif()
qt4_wrap_cpp(MODSINGAPP_MOC ${MODSINGAPP_MOCH})
include(${QT_USE_FILE})
include_directories(.)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(c2b)
if(WIN32)
# add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/c2bicon.o COMMAND windres.exe -I${CMAKE_CURRENT_SOURCE_DIR}
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/c2bicon.o COMMAND windres.exe
-i${CMAKE_CURRENT_SOURCE_DIR}/cb2bib.rc -o ${CMAKE_CURRENT_BINARY_DIR}/c2bicon.o )
list(APPEND CB2BIB_CPP ${CMAKE_CURRENT_BINARY_DIR}/c2bicon.o)
endif(WIN32)
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)
endif()
if(C2B_USE_LZO)
target_link_libraries(cb2bib c2b ${LZO_LIBRARIES} ${QT_LIBRARIES})
else()
target_link_libraries(cb2bib c2b ${QT_LIBRARIES})
endif()
if(APPLE)
install(TARGETS cb2bib BUNDLE DESTINATION ${C2B_INSTALL_BIN_DIR})
else()
install(TARGETS cb2bib RUNTIME DESTINATION ${C2B_INSTALL_BIN_DIR})
endif()
#-------------------------------------------------------------------------------
\ No newline at end of file
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.0. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.3. 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
* constans@molspaces.com
* cb2Bib version 1.4.0. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.3. 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
* constans@molspaces.com
* cb2Bib version 1.4.0. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.3. 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
* constans@molspaces.com
* cb2Bib version 1.4.0. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#ifndef C2B_H
......
#-------------------------------------------------------------------------------
# cb2bib cmake build script
# - build libc2b
#-------------------------------------------------------------------------------
find_package(Qt4 ${CB2BIB_MINIMUM_REQUIRED_QT} COMPONENTS QtCore QtNetwork REQUIRED)
list_source_files(LIBC2B_CPP LIBC2B_H LIBC2B_MOCH)
list(APPEND LIBC2B_CPP qtregexp/eqregexp.cpp)
qt4_wrap_cpp(LIBC2B_MOC ${LIBC2B_MOCH})
qt4_add_resources(LIBC2B_RCC c2blib.qrc)
include(${QT_USE_FILE})
include_directories(.)
add_library(c2b STATIC ${LIBC2B_CPP} ${LIBC2B_MOC} ${LIBC2B_RCC})
#-------------------------------------------------------------------------------
\ No newline at end of file
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.0. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.3. 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
* constans@molspaces.com
* cb2Bib version 1.4.0. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.3. 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
* constans@molspaces.com
* cb2Bib version 1.4.0. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#include "authorString.h"
......@@ -200,6 +200,7 @@ QString authorString::toBibTeX(const QString& author, bool full_form)
const int fore_length(fore_name.length());
const bool is_uppercase(!containLowerCaseLetter(fore_name));
if (fore_name_parts.count() == 1 && fore_length > 1 &&
!fore_name.contains(QRegExp("\\b" + author::double_initials + '_', Qt::CaseInsensitive)) &&
!are_authors_in_uppercase && is_uppercase)
{
// Cases 'Last, FST': Always abbreviated, no call to processFirstMiddle
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.0. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.3. 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
* constans@molspaces.com
* cb2Bib version 1.4.0. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#include "bibExtractor.h"
......@@ -91,9 +91,9 @@ int bibExtractor::extract(const QStringList& input_fns, const QString& output_fn
logMessage(tr("Error: Unable to create directory %1.").arg(doc_dirname));
if (doc_dir.exists())
{
const QString CopyMovePdf(_settingsP->value("cb2Bib/CopyMovePdf").toString());
const network::Action action(network::actionType(_settingsP->value("cb2Bib/CopyMovePdf").toString()));
logMessage(tr("Copying/moving to %1...").arg(target_doc_fn));
_networkQP->networkPtr()->getFile(_document_fn, target_doc_fn, CopyMovePdf, this, SLOT(copyMoveEnded(bool)));
_networkQP->networkPtr()->getFile(_document_fn, target_doc_fn, action, this, SLOT(copyMoveEnded(bool)));
_event_loop->exec();
if (_is_copymove_ok)
{
......@@ -169,7 +169,7 @@ void bibExtractor::extract(const QString& text)
{
logMessage(tr("Submitting query..."));
_settingsP->setValue("networkQuery/isSupervised", false);
_networkQP->submitQuery(_bpP->currentReference(), text);
_networkQP->submitQuery(_bpP->currentReference(), text, _input_type == PlainText);
_event_loop->exec();
_settingsP->setValue("networkQuery/isSupervised", true);
}
......@@ -194,9 +194,9 @@ void bibExtractor::_extract(const QString& text)
logMessage(_bpP->autoRecognizedString());
}
void bibExtractor::queryEnded(bool stat, const QString& targetPDF, const QString& targetBib)
void bibExtractor::queryEnded(bool succeeded, const QString& targetPDF, const QString& targetBib)
{
if (stat)
if (succeeded)
{
_extract(targetBib);
if (_input_type == PlainText && _bpP->isAutoRecognized() && !targetPDF.isEmpty())
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.0. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/
#ifndef BIBEXTRACTOR_H
......@@ -60,7 +60,7 @@ private slots:
void copyMoveEnded(bool ok);
void logMessage(const QString& ms) const;
void proxyLogMessage() const;
void queryEnded(bool stat, const QString& targetPDF, const QString& targetBib);
void queryEnded(bool succeeded, const QString& targetPDF, const QString& targetBib);
};
......
/***************************************************************************
* Copyright (C) 2004-2010 by Pere Constans
* constans@molspaces.com
* cb2Bib version 1.4.0. Licensed under the GNU GPL version 3.
* cb2Bib version 1.4.3. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution.
***************************************************************************/