[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [seul-edu] Hello from Crosswords for Linux maintainer



On Sun, 9 Apr 2000 rnd@sampo.karelia.ru wrote:
> 
> I am impressed!
> 
> >Just, I'd like to know your opinion about this problem I have:
> >people doesn't send me lists of words for doing Crosswords 
> 
> There probably need to be more reminders of this on  web-pages,
> with clear instructions...

Ok, there's instructions in the tarball with all the Crosswords,
perhaps being a bit bore , including instruction in every page
would help.

> 
> For example, if I am about to translate into Russian what do  I
> need to change, etc?

All my scripts are written in python 1.5.1 , basically the structure
is this:
- Lists of words
- Generators of .desc , crosswords in a "normal form", like: 
/Emacs 6 /
 [Manuel Gutierrez Algaba March 2000]
&
-packages------
-e-------------
-r-------------
-f-------------
-o-c-----------
-r-u--p--------
-mark-h--c-o---
-s-r--a--o-u---
---elisp-n-t---
---n-deletel---
---t--s--r-i---
---------oundo-
---emacsclient-
---------------
---------------
&

#
 "(1, 2) DOWN M-1 0 0  _____ 100 times the next command"
 "(5, 4) DOWN C-x = gives information about the ____ char under the
cursor"
 "(6, 7) DOWN M-x ____-of-moon, emacs is incredible !"
 "(7, 10) DOWN C- stands for the _____ key"
 "(7, 12) DOWN Mode that hides some code, useful for python"
 "(1, 2) ACROSS 'C-h p' gives us information about ____"
 "(7, 2) ACROSS Point and ___ delimit the cutting/copying area"
 "(9, 4) ACROSS The 'extension' language of emacs"
 "(10, 6) ACROSS M-d _____ up to the end of a word"
 "(12, 11) ACROSS C-x u ___es what you've just done"
 "(13, 4) ACROSS It requires an active emacs with M-x server-start"
#
$
performs
current
phases
control
outline
packages
mark
elisp
delete
undo
emacsclient
$     

-Then this stuff is parsed and mixed with a pattern.html that
holds the Javascript. And then we've got the final Crossword.

Each character shown in the browser is a .gif, then you'd have
to draw every Cirillic character. And my python script generator
of crosswords doesn't care about alphabets, a possible word
would be :
p("^G^H^I@@#~~", "Foo word"),

So, If I have more  words with such characters, there won't be 
any problem to find the "cross" , that is, find a common char
of two strings. 
Just type whatever you like inside the python string.
Another issue is :
Can netscape read files like "russian-R".gif (ro)?

For a there's a a.gif, for b there's a b.gif, for u-mit-umlaut
there's a ü.gif, for n-tilde  (Spanish enye) there's ñ.gif.
Could netscape load a "russian-R".gif ? or could it be interpreted
as another char in Latin-1? 
I don't know.
Anyway, you can analyze the code of any crossword, just View
Source in the browser, and in :
function load_sources() {
 for (i=0; i<puzzle.length; i++) {
  dummy = puzzle[i];
  if (dummy == '-' ) {
    orig_sources[i] = base + 'black.gif';
    letter_sources[i] = base + 'black.gif';
  } else {
    orig_sources[i] = base + 'white.gif';
    letter_sources[i] = base + dummy + '.gif';
   }
  }
}

You've got the key for translations of chars. There you can map
real representations with file names. I mean , you can have:

-packages------
-e-------------
-r------------- 
...
Imagine that p,a,... are encoded in Cirillic, that is, they're
control codes or whatever, then you can in " function load_sources"
map those control codes into "more-usual" names of files such
as a.gif, or a_russian.gif.

It's not impossible. The biggest problem I see is in names
of the .gif files. Because netscape can show Cirillic and python
strings doesn't care about what's inside them. I think python
has no problem with Cyrillic, I think. Another option would
be to generate and to write the crosswords .desc in Latin characters
-pravda---
-e--------
-r--------
-e--------
-s--------

with some special characters for special letters, and then map
them in the "load_sources" function, probably this is the easiest
solution, only requires:
mapping of latin letters, into drawings of letters stored in .gif,
that is, a different pattern.html for Russian.

and of course the drawing of such letters.

In fact with these method you can work with any alphabetic language,
and handling a bit combinations of words in the .desc , I think
it'd be possible to have crosswords even in Chinese !


> 
> By the way, there is a crossword generator called  "cwc"  which
> could make generation of crosswords easy. Have  you  tried  it?
> (Unfortunately it doesn't support too many non-english chars  -
> that's why I am asking).

URL, pleeeeeease ?? :) 
My generator has been made by me. It uses a bit of brute force and
 a bit of back tracking. It's surprising that actually works! 
I've been thinking about releasing it, so it can get improved,
but if people doesn't care about sending me a line ( a word), how
can I expect help in a back-tracking-random algorithm which is 
the hell for the average user... ? Besides, it works almost by 
chance, ...

> 
> >Probably this is the sort of help easier that anyone can provide
> >to any project, just "raw" help with no previous knowledge, almost
> >effortlessly.
> 
> I could advertize your effort in relcom.education usenet  group
> and some others, where there are lots of active readers.

That'd be great indeed. If these projects ever manage to get
a "critical mass", it'd be one of the most interesting project
out there. Not for the crosswords, but for the lexicons collected.

Python URL : www.python.org Although python is distributed in 
all Linux distros.

Well, to put it short:
It's feasible, it's possible. Just:
- do the russian letters.
- do the mappings of those letters in the function load_sources 

I'm not 100% sure but I think Cirillic strings in python won't
be troublesome,... finally netscape will turn it into readable
Russian. 

Regards/Saludos
Manolo
www.ctv.es/USERS/irmina    /TeEncontreX.html   /texpython.htm
/pyttex.htm /cruo/cruolinux.htm

  I base my fashion taste on what doesn't itch. -- Gilda Radner