Mobileread
Wiktionary Integration with Koreader
#1  mafein 02-25-2021, 01:56 PM
Dear all,

There are livio dictionary apps, which have their database from wiktionary, and are lightweight (or look up dictionary that connects to livio and shows in popup) . Unfortunately, koreader doesn't work with it. Is it possible to integrate a 3rd party android app with koreader Android version? If not how can I suggest it to developers? Also sharing the dictionary lookup history wihh an anki kind of app, would also be great.

https://play.google.com/store/apps/details?id=livio.pack.lang.en_US

https://play.google.com/store/apps/details?id=gaurav.lookuppro
Reply 

#2  Frenzie 02-25-2021, 02:43 PM
See https://github.com/koreader/koreader/pull/5108 among others.

Once you have something that works you can consider submitting it as a PR.
Reply 

#3  pazos 02-25-2021, 08:34 PM
Quote mafein
Is it possible to integrate a 3rd party android app with koreader Android version?
If the app is meant to be called from other apps then the answer is yes. You need to figure out the name of the package and the kind of action that it handles. It is already documented in the wiki (under android tips and tricks)

If the app works with one of supported actions (intents in android language) you can submit a PR. It is just a matter of adding the new entry to android's thirdparty apps

u/Norbi24 found some dict apps that need to be called from the app picker. These kind of apps are not welcome upstream and should stay as user overrides.
Reply 

#4  kandwo 02-26-2021, 01:16 AM
I use Aard2 with offline wiktionary as my dictionary app in Koreader. It works great. I highlight a word and it opens wiktionary in a new window; when done I press back and continue reading.
Reply 

#5  mafein 02-26-2021, 05:41 AM
Quote pazos
If the app is meant to be called from other apps then the answer is yes. You need to figure out the name of the package and the kind of action that it handles. It is already documented in the wiki (under android tips and tricks)

If the app works with one of supported actions (intents in android language) you can submit a PR. It is just a matter of adding the new entry to android's thirdparty apps

u/Norbi24 found some dict apps that need to be called from the app picker. These kind of apps are not welcome upstream and should stay as user overrides.


Both Livio and Lookup Dictionaries can be called from other apps, eg. google chrome, moon+reader, librera. But as I dont know much programming language, i dont know how to do it. . Thats why I am learning python
Reply 

#6  pazos 02-26-2021, 09:12 AM
Quote mafein
Both Livio and Lookup Dictionaries can be called from other apps, eg. google chrome, moon+reader, librera. But as I dont know much programming language, i dont know how to do it. . Thats why I am learning python
Use the example 3 and test if your desired app is within the app picker options.

If that's the case you can use the package name
Code
gaurav.lookuppro
or
Code
livio.pack.lang.en_US
or whatever
Reply 

#7  mafein 02-26-2021, 01:50 PM
Quote pazos
Use the example 3 and test if your desired app is within the app picker options.

If that's the case you can use the package name
Code
gaurav.lookuppro
or
Code
livio.pack.lang.en_US
or whatever
Thanks for the prompt reply. From the example 3 it works (as a send option),but example 2 doesn't work. Only The send part works, the app cannot be selected.

https://github.com/koreader/koreader/wiki/Android-tips-and-tricks#example-2-like-example-1-but-without-checking-if-colordict-is-available-each-time-the-app-runs
Reply 

#8  mafein 02-26-2021, 02:33 PM
Now could solve the issue. For the ones who want to do it (for lookup dictionary):

create a txt file and change the format name as .lua and copy under koreader/dictionaries.lua
write below in the file:
return {
{ "Look Up", "Look Up", false, "gaurav.lookuppro", "send" }
}
Reply 

#9  pazos 02-27-2021, 11:32 AM
Quote mafein
Now could solve the issue. For the ones who want to do it (for lookup dictionary):

create a txt file and change the format name as .lua and copy under koreader/dictionaries.lua
write below in the file:
return {
{ "Look Up", "Look Up", false, "gaurav.lookuppro", "send" }
}
Good work! PRed in https://github.com/koreader/koreader/pull/7359
Reply 

Today's Posts | Search this Thread | Login | Register