Simple script making easier to read Lojban

64 views
Skip to first unread message

ianek

unread,
Nov 26, 2010, 2:44:12 PM11/26/10
to lojban
coi
I wrote a very simple script: http://janek37.pastebin.pl/31200
It's used with one parameter – the url of a page in Lojban. It reads
the page and adds titles to all recognized Lojban words. (and prints
the resulting HTML to stdout)
A sample output:
http://students.mimuw.edu.pl/~js/lpp/lpp.html
Hover on any word and you'll see it's definition from jbovlaste.
It's very simple, so it has some faults: it doesn't recognize
javascript, so don't even try it on pages with embed javascript.
Also, it ignores markup, so you'll see all $x_{1}$ etc. Apparently it
also messes with unicode and breaks the «» quotes.
It uses a module jbovlaste.py, which contains only one variable,
'definitions', which is a tuple of pairs (word, definition).
You can download both files at http://students.mimuw.edu.pl/~js/lpp/titletest.zip
I don't have very much time to play with it, so any contributions are
welcome :) It would be nice if it looked more like hover tips in
jbovlaste, and it would be extra nice if it showed definitions for
each rafsi in unrecognized lujvo.

mu'o mi'e ianek

A. PIEKARSKI

unread,
Nov 26, 2010, 10:55:48 PM11/26/10
to loj...@googlegroups.com

This should be really great for newbies!  Why don't you put it on the wiki?

By the way, the second link goes to Error 404.  Nothing to download.

totus

> --
> You received this message because you are subscribed to the Google Groups
>"lojban" group.
> To post to this group, send email to loj...@googlegroups.com.
> To unsubscribe from this group, send email to
>lojban+un...@googlegroups.com.
> For more options, visit this group at
>http://groups.google.com/group/lojban?hl=en.
>
>

Brian Shannon

unread,
Nov 27, 2010, 12:03:35 AM11/27/10
to loj...@googlegroups.com
> This should be really great for newbies!  Why don't you put it on the wiki?
Well... I think it's best for newbies to figure out the sentences
themselves. They'll learn more that way.

ianek

unread,
Nov 27, 2010, 4:51:35 PM11/27/10
to lojban
My bad, it's http://students.mimuw.edu.pl/~js/lpp/title-test.zip
I'm a bit afraid of putting such incomplete things on the wiki...

doi la'o gy Brian gy
Figuring out sentences is one thing, but my util only adds
definitions. Definitions aren't something you can figure out. The
choice here is to jump between the text and vlasisku, or to find a
simpler way.

najrut

unread,
Nov 29, 2010, 5:33:56 AM11/29/10
to lojban
Something out of this world ! Really !

On Nov 28, 12:51 am, ianek <jane...@gmail.com> wrote:
> My bad, it'shttp://students.mimuw.edu.pl/~js/lpp/title-test.zip

ianek

unread,
Jan 7, 2011, 1:20:50 PM1/7/11
to lojban
I've made a new version, the main difference is that now I strip those
$_{}, making x1 of $x_{1}$. The difference is in the dictionary
actually, and I've included my dictionary maker (which uses
jbovlastefile obtained from http://jbovlaste.lojban.org/export/xml.html).
I've also fixed the unicode bug. Pages with embedded javascript still
won't work.
So, here is the source: http://students.mimuw.edu.pl/~js/titles.tar.gz
And here is updated demo: http://students.mimuw.edu.pl/~js/lpp/lpp.html
When I said "It would be nice if it looked more like hover tips in
jbovlaste" I've obviously meant vlasisku.
Reply all
Reply to author
Forward
0 new messages