Online Etymology Dictionary API query demo

746 views
Skip to first unread message

Scott Ferguson

unread,
Dec 2, 2012, 7:21:53 PM12/2/12
to app-inventor-de...@googlegroups.com
See attached project...

 

I did a Google search for 'query filetype:php' and the Online Etymology Dictionary was the first link returned. It looked interesting and has only one parameter 'term' which takes a word and returns the origin and meaning of the word.

Using the Web component, the returned html text was parsed for the 'definition' text, removing unnecessary html codes.

 

 

 

Thanks to Taifun Baer of Pura Vida Apps who suggested using the SplitText block to simplify parsing the page. The revised blocks are included in the zip project.

 

AI ZIP project: https://groups.google.com/group/app-inventor-shared-utilities-repository/attach/168e9fd0dbc4d912/OnlineEtymologyDictionary2.zip?part=4&authuser=0


OnlineEtymologyDictionary2.zip

atobiren atobiren

unread,
Feb 12, 2013, 4:17:59 PM2/12/13
to app-inventor-de...@googlegroups.com
amazing program, but how do you make link clickable?  for example when searching word: house, this appears in the middle of text:
<a href="/index.php?term=hide&allowed_in_frame=0" class="crossreference">hide</a>
 Notice, that ?term=hide
So you can't just simple use replace text.

Scott Ferguson

unread,
Feb 12, 2013, 11:52:47 PM2/12/13
to
This revised version 3 cleans up the output somewhat, removing <BR><BR> pairs, substituting \n------...\n for <blockquote> and </blockquote> and removing a hidden link.
---sfs
OnlineEtymologyDictionary3.zip
Message has been deleted

Scott Ferguson

unread,
Feb 12, 2013, 11:54:18 PM2/12/13
to app-inventor-de...@googlegroups.com
In order to make a link clickable, the http://... text would have to be extracted from between the <a and ></a> tags. This could be placed in a listpicker or in one or more buttons, but links in AI text labels is not allowed.
You could, also have two or more labels with transparent buttons in between that hold text. When the user would click on the button link the WebViewer component would open with the link.
---sfs
Reply all
Reply to author
Forward
0 new messages