Skip to content

viresh-ratnakar/xlufz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Xlufz

A simple PHP script that highlights selected words in a web page

Author: Viresh Ratnakar

This is a simple PHP script used by a web service that I host at xlufz.ratnakar.org/xlufz.php for use in the Exet crossword construction web app.

The web service allows highlighting words (such as synonyms of something) on selected web pages. For example:

As can be seen from the examples above, you pass the URL of the web page as a URLEncoded parameter named srcurl. All other parameters that you pass are used for word selection in the Datamuse words API.

Only a small set of web pages can be processed by Xlufz. You can easily modify the code to change this set and run your own instance of Xlufz. This set currently consists of the following URL roots:

  • cryptics.georgeho.org
  • www.crosswordunclued.com
  • www.highlightpress.com.au
  • en.wikipedia.org
  • longair.net

Xlufz uses the excellent and versatile Datamuse words API. Please refer to its documentation to see how you can modify the word selection parameters to highlight words that have a certain letter pattern, or rhyme with something, etc.

You can serve the index.html file as a simple frontend to the service, if you want to use it directly instead of using it through Exet.

About

Highlight selected words on a web page

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published