Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] Text link with search term to open in Aedict #858

Closed
ckaden opened this Issue Feb 1, 2019 · 6 comments

Comments

Projects
None yet
2 participants
@ckaden
Copy link

ckaden commented Feb 1, 2019

Hey there,

I would like to ask if there's a syntax available to create text link which will open directly in Aedict with a search term (on Android smartphones, of course).

Background:
I started to use Anki again, as I noticed how great of a combo Aedict and Anki are. When changing from Anki to Aedict, it's normally to check up additionally information about the specific card vocable. The quicker the app change the better. Currently it's already possible by marking the word, hit on 'share' and choose Aedict. The problem is, it takes quite a lot of steps and especially on slower(?) smartphones, the unasked for feature called 'direct share' adds a really annoying delay (-> https://www.xda-developers.com/remove-direct-share-share-menu-root/ ).

So, a text link like 'app:aedict=[search term]' (totally random markup) that I can built into Anki cards would be really appreciated for a quick look up.

Changing back from Aedict to Anki is a no brainer, simply hitting square twice.

Thanks!

@mvysny mvysny self-assigned this Feb 4, 2019

@mvysny mvysny added the enhancement label Feb 4, 2019

@mvysny

This comment has been minimized.

Copy link
Owner

mvysny commented Feb 4, 2019

Hey, that's a really neat idea! Let me experiment on what kind of links are possible with Android.

@mvysny

This comment has been minimized.

Copy link
Owner

mvysny commented Feb 4, 2019

According to https://developer.android.com/guide/topics/manifest/data-element Aedict can only respond to links such as aedict://search%20term, for example aedict://はは. I need to investigate the following:

  • I guess the search string will be passed in as the 'host' parameter perhaps
  • How are the whitespaces handled? I guess %20 but this needs to be examined.

The search query might be passable also as the query part of the URL spec: e.g. aedict://a?q=はは - this form will be necessary if the host part can't handle %20 or spaces.

@mvysny

This comment has been minimized.

Copy link
Owner

mvysny commented Feb 4, 2019

A couple of example testing links (these should work also from the browser when Aedict will pick up this functionality):

  • aedict://はは
  • aedict://はは%20は
  • aedict://a?q=はは%20
  • http://aedict?q=はは - for certain sites that would reject to render any links not starting with http:// or https://
@mvysny

This comment has been minimized.

Copy link
Owner

mvysny commented Feb 4, 2019

Implemented in Aedict 3.50.11

@mvysny mvysny closed this Feb 4, 2019

@ckaden

This comment has been minimized.

Copy link
Author

ckaden commented Mar 4, 2019

I've received the update finally a few days and it works really great!

When using it with whole sentences, though, I noticed that my data set uses html tags to emphasize the vocable and sadly, this breaks the search in Aedict.

If you could make an update which filters the html tags out that would be really appreciated, thanks.

screenshot_20190304-192016

screenshot_20190304-191922

@mvysny

This comment has been minimized.

Copy link
Owner

mvysny commented Mar 4, 2019

Hi, thanks for the idea! Could you please open a new bug report regarding this idea, and describe in more detail where exactly should aedict attempt to remove the html formatting? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.