From c6c1bd512dfaf22bdf10c9f8a1a74665b27b78e0 Mon Sep 17 00:00:00 2001 From: poire-z Date: Mon, 26 Jun 2017 09:52:43 +0200 Subject: [PATCH] crengine: return description and keywords metadata Only available for EPUB documents for now. crengine bumped (includes css related improvements, fix crash, better handling of gif by frankyfei). Also fix pb with permissions in travis build. --- .ci/build_script.sh | 6 +++--- cre.cpp | 8 ++++++++ thirdparty/kpvcrlib/crengine | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.ci/build_script.sh b/.ci/build_script.sh index ce63f945b..183f79bec 100755 --- a/.ci/build_script.sh +++ b/.ci/build_script.sh @@ -11,19 +11,19 @@ if [ "$TARGET" = kobo ]; then docker run -t \ -v "${HOME}"/.ccache:${DOCKER_HOME}/.ccache \ -v `pwd`:${DOCKER_HOME}/base ${DOCKER_IMG} \ - /bin/bash -c 'source /home/ko/.bashrc && cd /home/ko/base && make TARGET=kobo all' + /bin/bash -c 'source /home/ko/.bashrc && cd /home/ko/base && sudo chown -R ko:ko . && make TARGET=kobo all' elif [ "$TARGET" = kindle ]; then chmod -R 777 $HOME/.ccache docker run -t \ -v "${HOME}"/.ccache:${DOCKER_HOME}/.ccache \ -v `pwd`:${DOCKER_HOME}/base ${DOCKER_IMG} \ - /bin/bash -c 'source /home/ko/.bashrc && cd /home/ko/base && make TARGET=kindle all' + /bin/bash -c 'source /home/ko/.bashrc && cd /home/ko/base && sudo chown -R ko:ko . && make TARGET=kindle all' elif [ "$TARGET" = pocketbook ]; then chmod -R 777 $HOME/.ccache docker run -t \ -v "${HOME}"/.ccache:${DOCKER_HOME}/.ccache \ -v `pwd`:${DOCKER_HOME}/base ${DOCKER_IMG} \ - /bin/bash -c "source /home/ko/.bashrc && cd /home/ko/base && make pocketbook-toolchain && make VERBOSE=1 TARGET=pocketbook all" + /bin/bash -c "source /home/ko/.bashrc && cd /home/ko/base && sudo chown -R ko:ko . && make pocketbook-toolchain && make VERBOSE=1 TARGET=pocketbook all" else make all fi diff --git a/cre.cpp b/cre.cpp index 358bda22e..6264730ba 100644 --- a/cre.cpp +++ b/cre.cpp @@ -466,6 +466,14 @@ static int getDocumentProps(lua_State *L) { lua_pushstring(L, UnicodeToLocal(doc->text_view->getSeries()).c_str()); lua_settable(L, -3); + lua_pushstring(L, "description"); + lua_pushstring(L, UnicodeToLocal(doc->text_view->getDescription()).c_str()); + lua_settable(L, -3); + + lua_pushstring(L, "keywords"); + lua_pushstring(L, UnicodeToLocal(doc->text_view->getKeywords()).c_str()); + lua_settable(L, -3); + return 1; } diff --git a/thirdparty/kpvcrlib/crengine b/thirdparty/kpvcrlib/crengine index 7377040ff..d0854294e 160000 --- a/thirdparty/kpvcrlib/crengine +++ b/thirdparty/kpvcrlib/crengine @@ -1 +1 @@ -Subproject commit 7377040ffb9a3136b0845e033e4eb7b01059fc4a +Subproject commit d0854294e0a9259d9c160b5fe9c91a123a63528b