Setting up the Pleco --> Anki link meaningfully

heijopai

秀才
Hi,

I searched the internet and reddit but it did not lead me anywhere! I also posted it on chinese forums: but i think here is were it really belongs.
I stumbled across the possibility to add pleco entries to ankidroid, which was eye-opening.
Now I am look for a way to improve these flashcards.
I have to major and one minor issue:
1. I want to export the cards as two types (CN->EN, EN->CN) with one click. How is that possible.
2. I want to add sound to the card. so that the pronunciation plays when I turn the card.

Minor:
1. I would like to export an example sentence... only characters would do.

I would not mind putting in some extra work on the Pc...

Are there any ways to achieve that?

Thanks a lot in advance!
 

mikelove

皇帝
Staff member
1) For that you'd want to pick a note type that automatically generates cards in both directions.

2) If you check your AnkiDroid settings, there's support for integrating with Android's built-in Chinese TTS engines for audio playback. (doesn't work on the PC version as far as I know)

3) Turn on Settings / Definition Screen / "+ for each example."
 

mikelove

皇帝
Staff member
Unfortunately no, iOS doesn't really offer the ability for apps to talk to each other via custom APIs like that at the moment so even if Anki wanted to offer such an API on iOS they wouldn't be able to.
 
Hi,

I have a follow up question to your last reply, about the lack of connectivity between apps on iPad.

Do you imagine a possible workaround, using html/js on Anki, to create buttons allowing to trigger a search automatically in Pleco?
I use both apps in split screen which is already a huge gain of time, but sometimes I which I could just save on writing time during reviews and get to a definition page in one push.

right now I can go through the clipboard reader but it takes roughly the same time as typing, the time the Pleco side refreshes itself.
but it doesn’t seem to work so consistentl.

thanks in advance for your help !

Julien
 

Attachments

  • 045176D9-7B45-43E3-B3F9-605ED100F3E1.png
    045176D9-7B45-43E3-B3F9-605ED100F3E1.png
    725.6 KB · Views: 449

mikelove

皇帝
Staff member
Searching in Pleco should be doable without any workarounds, since for that you can just use our URL API:

plecoapi://x-callback-url/s?q=(search term)

No different from pulling up a website. The sort of communication we do with Anki on Android is much more complicated - lots of requests happening silently in the background and returning responses to our app.
 

claybeboy

Member
Searching in Pleco should be doable without any workarounds, since for that you can just use our URL API:

plecoapi://x-callback-url/s?q=(search term)

No different from pulling up a website. The sort of communication we do with Anki on Android is much more complicated - lots of requests happening silently in the background and returning responses to our app.

Hello, sorry where do I put the "plecoapi://x-callback-url/s?q=(search term)" in my anki card in order to search pleco?
 
Here's how I did.
On the bottom of my answer cards I have this :

HTML:
<hr />
<div id="moreInfoSidebar" class="more-info-sidebar">
    <a id="plecoMobile" href="plecoapi://x-callback-url/s?q={{Hanzi}}" class="more-info-btn">
        <img src="_pleco.png"></img>
    </a>
</div>

Of course you need to replace the {{Hanzi}} with whatever field you need to search in Pleco.

The "_pleco.png" file is just a png file with the icon of Pleco I took online.

I had the impression the div was referring to some kind of styling code but I have not reference to "more-info-sidebar" in my styling page.
It should just work like this, let me know. For me it works great on iPhone and iPad.
 
Last edited:

claybeboy

Member
Here's how I did.
On the bottom of my answer cards I have this :

HTML:
<hr />
<div id="moreInfoSidebar" class="more-info-sidebar">
    <a id="plecoMobile" href="plecoapi://x-callback-url/s?q={{Hanzi}}" class="more-info-btn">
        <img src="_pleco.png"></img>
    </a>
</div>

Of course you need to replace the {{Hanzi}} with whatever field you need to search in Pleco.

The "_pleco.png" file is just a png file with the icon of Pleco I took online.

I had the impression the div was referring to some kind of styling code but I have not reference to "more-info-sidebar" in my styling page.
It should just work like this, let me know. For me it works great on iPhone and iPad.

Thank you so much!
 

Pinyo01

Member
Here's how I did.
On the bottom of my answer cards I have this :

HTML:
<hr />
<div id="moreInfoSidebar" class="more-info-sidebar">
    <a id="plecoMobile" href="plecoapi://x-callback-url/s?q={{Hanzi}}" class="more-info-btn">
        <img src="_pleco.png"></img>
    </a>
</div>

Of course you need to replace the {{Hanzi}} with whatever field you need to search in Pleco.

The "_pleco.png" file is just a png file with the icon of Pleco I took online.

I had the impression the div was referring to some kind of styling code but I have not reference to "more-info-sidebar" in my styling page.
It should just work like this, let me know. For me it works great on iPhone and iPad.
Hello! May I ask you, is there any option to not let my phone enlarge the png icon? I tried to make it work, it opens pleco amazingly, but on my phone it looks like that, what i put into the attachment. I am pretty now in the whole anki thing, just trying to set up my deck system now.
Thank you in advance!
 

Attachments

  • Screenshot_20240211_130816_AnkiDroid.jpg
    Screenshot_20240211_130816_AnkiDroid.jpg
    368.1 KB · Views: 23
Top