[sword-devel] TotalReqall

Troy A. Griffitts scribe at crosswire.org
Sun Dec 27 15:44:36 EST 2020


Thank you, Loren! Merry Christmas!

So, my experience with a Fedora box:

Cloning the repository and following your instructions to compile...

I first needed to install cmake... That was obvious, but then was
failing to find "module ECM."

Doing some searching around, I found that ECM = extra cmake modules, and
sure enough there was fedora package by that name, which got me past
that one.

I then needed to learn about all the qt and "KF5" packages I aneeded to
install. These seemed to do the trick but I was still getting this error
even when passing -DTTS_ENABLED=OFF:

CMake Warning at CMakeLists.txt:30 (find_package): Found package
configuration file: /usr/lib64/cmake/Qt5/Qt5Config.cmake but it set
Qt5_FOUND to FALSE so package "Qt5" is considered to be NOT FOUND.
Reason given by package: Failed to find Qt5 component "TextToSpeech"
config file at
"/usr/lib64/cmake/Qt5TextToSpeech/Qt5TextToSpeechConfig.cmake" So,
anyway, I figured I would just install the tts package. This package
seemed to do the trick: qt5-qtspeech-devel

At this point, I could run from the 'build' subfolder, cmake
-DTTS_ENABLED=OFF ..

Here is the final dependency install command which worked for me on a
Fedora 33 box:

dnf install cmake extra-cmake-modules qt5-qtbase-devel kf5-ki18n-devel
kf5-kxmlgui-devel qt5-qtspeech-devel

On to cmake --build .

This failed for me because it did not add link libraries for any of the
SWORD dependencies.

I then added this patch to the CMakefile.txt which uses pkg-config to
get SWORD dependencies:

-------------------------------

diff --git a/CMakeLists.txt b/CMakeLists.txt index bb246fa..0d8efac
100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,8 @@
include(FeatureSummary) option(TTS_ENABLED "Compile with text-to-speech
support" ON) +find_package(PkgConfig REQUIRED) +pkg_check_modules(SWORD
REQUIRED IMPORTED_TARGET sword) find_package(Qt5 ${QT_MIN_VERSION}
CONFIG REQUIRED COMPONENTS Core Gui Widgets LinguistTools)
find_package(sword REQUIRED) find_package(KF5 ${KF5_DEP_VERSION} @@
-60,6 +62,7 @@ target_link_libraries(totalreqall KF5::CoreAddons
KF5::XmlGui KF5::I18n + PkgConfig::SWORD ) if(TTS_ENABLED)

----------------------------

I then had a totalreqall/build/bin/totalreqall binary! Wooohoooo!

So, running the app, I received:

"Choose what to memorize," I picked "Bible verse".

I then chose John 3:16-21 KJV, which showed the text correctly in the
memo box.

Then when I pressed "Memorize verse," I received:

ASSERT failure in QList<T>::operator[]: "index out of range", file
/usr/include/qt5/QtCore/qlist.h, line 579 Aborted (core dumped)

Having a brief look, this patch keeps split[j + 1] inbounds.

------------------------------------

diff --git a/src/MemorizeWidget.cpp b/src/MemorizeWidget.cpp index
542560a..60fef5a 100644 --- a/src/MemorizeWidget.cpp +++
b/src/MemorizeWidget.cpp @@ -234,7 +234,7 @@
MemorizeWidget::MemorizeWidget(QString memorizeContent, QWidget *parent)
QString sep = "\n"; QStringList split = m_content.at(i).split(sep);
m_content.removeAt(i); - for (int j = 0; j < split.size(); ++j) + for
(int j = 0; j < split.size() - 1; ++j) { if (split[j].size() <
settings->chunkSize() && QString(split[j] + split[j + 1]).size() <
settings->chunkSize()) {

----------------------------------

Now when I press "Memorize verse," it doesn't, but doesn't show any text
in the next screen.

I then changed to a single verse: John 3:16-16. When I now press
"Memorize verse," I get the text of the verse greyed out on the next
screen, but I didn't know what to do. I read in the README on your
github that I am suppose to type the first letter of each word... but
nothing I type does anything.

I am excited for your work! I hope this gives some helpful feedback!

Blessings in your work,

Troy

On 12/26/20 5:00 PM, Loren Burkholder wrote:
>
> As a (belated) Christmas gift, I'd like to present to all of you my
> app that I build using Sword: TotalReqall
> (https://invent.kde.org/utilities/totalreqall
> <https://invent.kde.org/utilities/totalreqall>). It's a
> general-purpose app for memorizing chunks of data (which can be
> anything from the Bible to a poem to the manpage for clang). It uses
> Sword for accessing Bible verses in various translations, which is a
> huge step up from the original method of accessing a text file of the
> KJV. I've been working on a TTS feature as well. Items can be saved
> for later access. They are saved in a human-readable JSON file. Soon,
> I intend to add support for importing and exporting saved items.
>
>  
>
> TotalReqall is built with Qt, but it's also built with the KDE
> frameworks since it is becoming an official KDE app. (The back story
> on this: I was reading an article about KDE and was inspired to merge
> my app into KDE, since I am a KDE user.)
>
>  
>
> Building TotalReqall requires Qt 5 (6 has not been tested), KDE
> Frameworks, and Sword.
>
>  
>
> Questions, comments, and contributions are welcome.
>
>  
>
> Loren
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://crosswire.org/pipermail/sword-devel/attachments/20201227/86dae6fd/attachment.html>


More information about the sword-devel mailing list