diff --git a/src/kde/kioslave/recoll/00README.txt b/src/kde/kioslave/recoll/00README.txt index 7e7c8c7e..c9064d84 100644 --- a/src/kde/kioslave/recoll/00README.txt +++ b/src/kde/kioslave/recoll/00README.txt @@ -1,6 +1,4 @@ -(this used to work but last time I tried with konqueror (kde3, 11-2007), it failed with "protocol not authorized" or such. Didn't investigate more). - This is a small experiment with a recoll kio_slave A kio_slave was implemented, supporting the "get" operation. Ie, you type @@ -15,25 +13,38 @@ quite useful in this case. Implementation notes: ----------------------- +- There are two main ways to do this: + - a-la kio_beagle, using listDir() to list entries pointing to the + different operations or objects (help, status, search result + entries, bookmarks, whatever...). The nice thing is that the + results really look like file object in a directory (probably, + didn't try it actually), no need for look and feel, it's provided by kde + + - Or a la strigi: all interactions are through html pages and get() + operations. Looks less like a normal konqueror file-system + listing, and needs more html coding but all in all probably + simpler. + + Recoll is currently doing the html thing. As far as I understand, the + way to trigger a listdir is to have a inode/directory default mime + type in the protocol file, and return inode/directory when + appropriate in mimetype() (look at kio_beagle). Some kde daemon needs + to be restarted when doing this (the protocol file is cached + somewhere). + +Also would need a page header, configuration polish etc... Not done for +the same reason, this is a proof of concept. + +KDE3 notes - Not using libtool. Probably should. compilation flags in the Makefile were copy-pasted from a kdebase compilation tree on FreeBSD (kio/man). - - You MUST install a kio_recoll.la in lib/kde3 along with kio_recoll.so, else kdeinit won't be able to load the lib (probably uses the libltdl thingy?). The one in this directory was duplicated/adjusted from kio_man.la. The contents don't seem too critical, just needs to exist. - -- Currently retrieves all results on one page. Need to add state and - previous/next buttons. As I didn't find this thing to be particularly - useful, I didn't bothered to. - -- Also would need a page header, configuration polish etc... Not done for - the same reason, this is a proof of concept. - - If you want to try, compile, then install kio_recoll.la kio_recoll.so wherever kde keeps its plugins (ie: lib/kde3), and recoll.protocol in the services directory (share/services ? look for other .protocol file). - - I saw after doing the build/config mockup that kdevelop can generate a kio_slave project. This might be the next thing to do. otoh would need to separate the kio from the main source to avoid having to distribute 2megs diff --git a/src/kde/kioslave/recoll/CMakeLists.txt b/src/kde/kioslave/recoll/CMakeLists.txt index 07a50677..f67c9c84 100644 --- a/src/kde/kioslave/recoll/CMakeLists.txt +++ b/src/kde/kioslave/recoll/CMakeLists.txt @@ -7,40 +7,44 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules ) include(InstallRequiredSystemLibraries) -#set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Recoll KIO Slave") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Recoll KIO Slave") #set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") #set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING") -#set(CPACK_PACKAGE_VERSION "${VERSION}") -#set(CPACK_GENERATOR TGZ) -#set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION}" CACHE INTERNAL " -#tarball basename") -#SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME} ${CPACK_PACKAGE_VERSION}") -#include(CPack) +set(CPACK_PACKAGE_VERSION "${VERSION}") +set(CPACK_GENERATOR TGZ) +set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION}" CACHE INTERNAL "tarball basename") +SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME} ${CPACK_PACKAGE_VERSION}") +include(CPack) # search packages used by KDE find_package(KDE4 REQUIRED) -include (UsePkgConfig) -include (KDE4Defaults) -include (MacroLibrary) +include(UsePkgConfig) +include(KDE4Defaults) +include(MacroLibrary) include(MacroOptionalAddSubdirectory) -add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) +add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) +add_definitions(-DKDE_DEFAULT_DEBUG_AREA=7130) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}") set(depth ../../../) +set(rcltop ${CMAKE_CURRENT_SOURCE_DIR}/${depth}) include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} -${depth}/utils ${depth}/rcldb ${depth}/query ${depth}/unac -${depth}/common ${depth}/internfile ${depth}/index ${depth}/bincimapmime + ${rcltop}/utils ${rcltop}/rcldb ${rcltop}/query ${rcltop}/unac + ${rcltop}/common ${rcltop}/internfile ${rcltop}/index ${rcltop}/bincimapmime ) -set(kio_recoll_SRCS - kio_recoll.cpp -) +set(kio_recoll_SRCS kio_recoll.cpp) kde4_add_plugin(kio_recoll ${kio_recoll_SRCS}) -link_directories(/home/dockes/projets/fulltext/recoll/src/lib) -target_link_libraries(kio_recoll rcl xapian ${KDE4_KIO_LIBS}) +target_link_libraries(kio_recoll + ${rcltop}/lib/librcl.a + ${rcltop}/bincimapmime/libmime.a + xapian ${KDE4_KIO_LIBS}) install(TARGETS kio_recoll DESTINATION ${PLUGIN_INSTALL_DIR}) -install(FILES recoll.protocol DESTINATION ${SERVICES_INSTALL_DIR} ) +install(FILES recoll.protocol DESTINATION ${SERVICES_INSTALL_DIR}) +install(FILES data/welcome.html + DESTINATION ${DATA_INSTALL_DIR}/kio_recoll) diff --git a/src/kde/kioslave/recoll/data/welcome.html b/src/kde/kioslave/recoll/data/welcome.html new file mode 100644 index 00000000..b13ff2b7 --- /dev/null +++ b/src/kde/kioslave/recoll/data/welcome.html @@ -0,0 +1,20 @@ + +
+ +