riverrun / genxword Goto Github PK
View Code? Open in Web Editor NEWCrossword generator written in Python.
License: GNU General Public License v3.0
Crossword generator written in Python.
License: GNU General Public License v3.0
Hi.
I faced this error under Windows, using Cygwin, after installing the package with pip
:
$ genxword --help
Traceback (most recent call last):
File "/usr/bin/genxword", line 7, in <module>
from genxword.cli import main
File "/usr/lib/python3.6/site-packages/genxword/cli.py", line 21, in <module>
from .control import _, Genxword, PY2
File "/usr/lib/python3.6/site-packages/genxword/control.py", line 24, in <module>
from .calculate import Crossword, Exportfiles
File "/usr/lib/python3.6/site-packages/genxword/calculate.py", line 22, in <module>
from gi.repository import Pango, PangoCairo
ModuleNotFoundError: No module named 'gi'
When I run pip3 install genxword, it fails with an error message referring to the French PO/MO file. See error log below:
Complete output (33 lines):
/bin/sh: msgfmt: command not found
/bin/sh: msgfmt: command not found
/bin/sh: msgfmt: command not found
/bin/sh: msgfmt: command not found
/bin/sh: msgfmt: command not found
/bin/sh: msgfmt: command not found
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/genxword
copying genxword/complexstring2.py -> build/lib/genxword
copying genxword/complexstring.py -> build/lib/genxword
copying genxword/calculate.py -> build/lib/genxword
copying genxword/control.py -> build/lib/genxword
copying genxword/__init__.py -> build/lib/genxword
copying genxword/cli.py -> build/lib/genxword
copying genxword/gui.py -> build/lib/genxword
running egg_info
writing genxword.egg-info/PKG-INFO
writing dependency_links to genxword.egg-info/dependency_links.txt
writing entry points to genxword.egg-info/entry_points.txt
writing top-level names to genxword.egg-info/top_level.txt
reading manifest file 'genxword.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'genxword.egg-info/SOURCES.txt'
creating build/lib/genxword/data
copying genxword/data/gumby.lang -> build/lib/genxword/data
copying genxword/data/help_page -> build/lib/genxword/data
running install_lib
running install_data
error: can't copy 'mo/fr/genxword.mo': doesn't exist or not a regular file
Thanks for your program!
It would be great to have an ability to add some letters on crossword to get some additional clues.
Love your program. As a sign of my gratitude I translated it into dutch (nl).
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2014-05-25 19:47+0100\n"
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: Koen Wybo [email protected]\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
msgid ""
"The word list file contains the words and clues, or just words, that you want in your crossword. \n"
"For further information on how to format the word list file and about the other options, please consult the man page.\n"
msgstr ""
"De lijst met woorden bevat ofwel de woorden en de sleutels of enkel de woorden, die je in je kruiswoordraadsel wenst \n"
"Aanvullende informatie over de indeling van de woordenlijst en andere opties vind je terug in de hulp(man)-pagina. \n"
msgid "Enter grid size ("
msgstr "Voer rastergrootte in ("
msgid " is the default): "
msgstr "is de standaardwaarde):"
msgid "Calculating your crossword..."
msgstr "Berekenen van het kruiswoordraadsel..."
msgid "Are you happy with this solution? [Y/n] "
msgstr "Ben je tevreden met deze oplossing? [Y/n]"
msgid "n"
msgstr "n"
msgid "And increase the grid size? [Y/n] "
msgstr "Rasterafmetingen groter maken?[Y/n]"
msgid "Across/Down"
msgstr "Verticaal"
msgid "The following files have been saved to your current working directory:\n"
msgstr "Deze bestanden werden opgeslagen in je huidige werkmap:\n"
msgid "Crossword generator."
msgstr "Kruiswoordraadsel generator."
msgid "Name of word list file."
msgstr "Naam van het woordenlijstbestand."
msgid "Save files as A4 pdf (p), letter size pdf (l), png (n) and/or svg (s)."
msgstr "Bestand opslaan als A4 pdf (p), letter us pdf (l), png (n) en/of svg (s)."
msgid "Automated (non-interactive) option."
msgstr "Automatische (niet-interactieve) optie. "
msgid "Create anagrams for the clues"
msgstr "Aanmaken van anagrammen voor de oplossingen. "
msgid "Number of words to be used."
msgstr "Aantal te gebruiken woorden."
msgid "Name of crossword."
msgstr "Naam van het kruiswoordraadsel."
msgid "_Word list"
msgstr "_Woordenlijst"
msgid "_New word list"
msgstr "_Nieuwe woordenlijst"
msgid "Create a new word list or go back to the already open word list"
msgstr "Maak nieuwe woordenlijst aan of terug naar openstaande woordenlijst"
msgid "_Open word list"
msgstr "_Open woordenlijst"
msgid "Open a word list"
msgstr "Open een nieuwe woordenlijst"
msgid "_Sort word list"
msgstr "_Sorteer woordenlijst"
msgid "Sort the word list and remove words with non-alphabetic characters"
msgstr "Sorteer de woordenlijst en verwijder woorden met niet-alfabetische karakters. "
msgid "Quit"
msgstr "Afsluiten"
msgid "_Crossword"
msgstr "_Kruiswoordraadsel"
msgid "_Calculate crossword"
msgstr "_Bereken kruiswoordraadsel"
msgid "Calculate the crossword"
msgstr "Bereken kruiswoordraadsel"
msgid "_Recalculate"
msgstr "_Herbereken"
msgid "Increase the grid size and recalculate the crossword"
msgstr "Vergroot de rastergrootte en herbereken het kruiswoordraadsel"
msgid "_Save"
msgstr "_Opslaan"
msgid "Save crossword"
msgstr "Sla kruiswoordraadsel op"
msgid "_Help"
msgstr "_Help"
msgid "Open the help page"
msgstr "Open de helppagina"
msgid "_About"
msgstr "_Over"
msgid "About"
msgstr "Over..."
msgid "Anagram clues"
msgstr "Anagram sleutels"
msgid "Choose the grid size"
msgstr "Kies de rastergrootte"
msgid "Save the crossword as"
msgstr "Sla kruiswoordraadsel op als"
msgid "A4 pdf"
msgstr "A4 pdf"
msgid "letter pdf"
msgstr "Letter (us) pdf"
msgid "Name of crossword"
msgstr "Naam kruiswoordraadsel"
msgid "Choose the name of your crossword"
msgstr "Kies de naam van het kruiswoordraadsel"
msgid "Number of words"
msgstr "Aantal woorden"
msgid "Choose the number of words you want to use"
msgstr "Kies het aantal woorden die je wenst te gebruiken"
msgid "Grid size"
msgstr "Rastergrootte"
msgid ""
"Choose the crossword grid size\n"
"Go to the Crossword menu to enable this option"
msgstr ""
"Kies de rastergrootte \n"
"Ga naar het kruiswoordraadselmenu om deze optie te activeren. "
msgid "Please choose a file"
msgstr "Selecteer bestand"
msgid "Please choose a folder"
msgstr "Selecteer een map"
msgid "Your crossword files have been saved in "
msgstr "De kruiswoordraadselbestanden zijn opgeslagen in"
msgid ""
"Please fill in the name of the crossword and the format you want it saved in (A4 size pdf, letter size pdf, png or svg).\n"
"Then click on the Save button again."
msgstr ""
"Vul de naam van het kruiswoordraadsel in en het bestandstype om in op te slaan (A4 pdf, letter (us) pdf, png of svg). \n"
"Klik opnieuw op de opslaan-knop."
msgid "A crossword generator"
msgstr "Een kruiswoordraadsel generator"
The latest version available on pypi/pip is 1.2.0, where the current version is 2.0.0.
Also, the description on here mentions the gettext dependency whereas the description in pypi has it missing like it used to on here.
Thanks
Hi.
Here is the error I get:
$ pip --version
pip 10.0.1 from /usr/lib/python3.6/site-packages/pip (python 3.6)
$ pip install genxword >out.log 2>&1
Collecting genxword
Using cached https://files.pythonhosted.org/packages/78/b3/db348c150f79edcadf1cdc3e25ac4a6a4e74ed6d675689c6855f37952629/genxword-1.2.0.tar.gz
Building wheels for collected packages: genxword
Running setup.py bdist_wheel for genxword: started
Running setup.py bdist_wheel for genxword: finished with status 'error'
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ezquh6jv/genxword/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-wwpsgl8n --python-tag cp36:
/bin/sh: msgfmt : commande introuvable
/bin/sh: msgfmt : commande introuvable
/bin/sh: msgfmt : commande introuvable
/bin/sh: msgfmt : commande introuvable
/bin/sh: msgfmt : commande introuvable
/bin/sh: msgfmt : commande introuvable
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/genxword
copying genxword/calculate.py -> build/lib/genxword
copying genxword/cli.py -> build/lib/genxword
copying genxword/complexstring.py -> build/lib/genxword
copying genxword/complexstring2.py -> build/lib/genxword
copying genxword/control.py -> build/lib/genxword
copying genxword/gui.py -> build/lib/genxword
copying genxword/__init__.py -> build/lib/genxword
running egg_info
writing genxword.egg-info/PKG-INFO
writing dependency_links to genxword.egg-info/dependency_links.txt
writing entry points to genxword.egg-info/entry_points.txt
writing top-level names to genxword.egg-info/top_level.txt
reading manifest file 'genxword.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'genxword.egg-info/SOURCES.txt'
creating build/lib/genxword/data
copying genxword/data/gumby.lang -> build/lib/genxword/data
copying genxword/data/help_page -> build/lib/genxword/data
installing to build/bdist.cygwin-2.10.0-x86_64/wheel
running install
running install_lib
creating build/bdist.cygwin-2.10.0-x86_64
creating build/bdist.cygwin-2.10.0-x86_64/wheel
creating build/bdist.cygwin-2.10.0-x86_64/wheel/genxword
copying build/lib/genxword/calculate.py -> build/bdist.cygwin-2.10.0-x86_64/wheel/genxword
copying build/lib/genxword/cli.py -> build/bdist.cygwin-2.10.0-x86_64/wheel/genxword
copying build/lib/genxword/complexstring.py -> build/bdist.cygwin-2.10.0-x86_64/wheel/genxword
copying build/lib/genxword/complexstring2.py -> build/bdist.cygwin-2.10.0-x86_64/wheel/genxword
copying build/lib/genxword/control.py -> build/bdist.cygwin-2.10.0-x86_64/wheel/genxword
creating build/bdist.cygwin-2.10.0-x86_64/wheel/genxword/data
copying build/lib/genxword/data/gumby.lang -> build/bdist.cygwin-2.10.0-x86_64/wheel/genxword/data
copying build/lib/genxword/data/help_page -> build/bdist.cygwin-2.10.0-x86_64/wheel/genxword/data
copying build/lib/genxword/gui.py -> build/bdist.cygwin-2.10.0-x86_64/wheel/genxword
copying build/lib/genxword/__init__.py -> build/bdist.cygwin-2.10.0-x86_64/wheel/genxword
running install_data
creating build/bdist.cygwin-2.10.0-x86_64/wheel/genxword-1.2.0.data
creating build/bdist.cygwin-2.10.0-x86_64/wheel/genxword-1.2.0.data/data
creating build/bdist.cygwin-2.10.0-x86_64/wheel/genxword-1.2.0.data/data/share
creating build/bdist.cygwin-2.10.0-x86_64/wheel/genxword-1.2.0.data/data/share/applications
copying extra/genxword-gtk.desktop -> build/bdist.cygwin-2.10.0-x86_64/wheel/genxword-1.2.0.data/data/share/applications
creating build/bdist.cygwin-2.10.0-x86_64/wheel/genxword-1.2.0.data/data/share/pixmaps
copying extra/genxword-gtk.png -> build/bdist.cygwin-2.10.0-x86_64/wheel/genxword-1.2.0.data/data/share/pixmaps
creating build/bdist.cygwin-2.10.0-x86_64/wheel/genxword-1.2.0.data/data/share/locale
creating build/bdist.cygwin-2.10.0-x86_64/wheel/genxword-1.2.0.data/data/share/locale/ca
creating build/bdist.cygwin-2.10.0-x86_64/wheel/genxword-1.2.0.data/data/share/locale/ca/LC_MESSAGES
error: can't copy 'mo/ca/genxword.mo': doesn't exist or not a regular file
----------------------------------------
Failed building wheel for genxword
Running setup.py clean for genxword
Failed to build genxword
Installing collected packages: genxword
Running setup.py install for genxword: started
Running setup.py install for genxword: finished with status 'error'
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ezquh6jv/genxword/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-282d62fw/install-record.txt --single-version-externally-managed --compile:
/bin/sh: msgfmt : commande introuvable
/bin/sh: msgfmt : commande introuvable
/bin/sh: msgfmt : commande introuvable
/bin/sh: msgfmt : commande introuvable
/bin/sh: msgfmt : commande introuvable
/bin/sh: msgfmt : commande introuvable
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/genxword
copying genxword/calculate.py -> build/lib/genxword
copying genxword/cli.py -> build/lib/genxword
copying genxword/complexstring.py -> build/lib/genxword
copying genxword/complexstring2.py -> build/lib/genxword
copying genxword/control.py -> build/lib/genxword
copying genxword/gui.py -> build/lib/genxword
copying genxword/__init__.py -> build/lib/genxword
running egg_info
writing genxword.egg-info/PKG-INFO
writing dependency_links to genxword.egg-info/dependency_links.txt
writing entry points to genxword.egg-info/entry_points.txt
writing top-level names to genxword.egg-info/top_level.txt
reading manifest file 'genxword.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'genxword.egg-info/SOURCES.txt'
creating build/lib/genxword/data
copying genxword/data/gumby.lang -> build/lib/genxword/data
copying genxword/data/help_page -> build/lib/genxword/data
running install_lib
running install_data
error: can't copy 'mo/ca/genxword.mo': doesn't exist or not a regular file
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ezquh6jv/genxword/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-282d62fw/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-ezquh6jv/genxword/
Same thing with Python 2.
It would be really cool if you could add a feature to combine the grid and the clues (without the word bank) and export them to a PDF!
Thanks!
Scott
does this script need to be updated ?
Is there a more current version of the same tool using python code ?
It is hard to get all the graphics libraries to work properly on different systems. For example, it really took me a while to install and configure pygobject3 and cairo on mac osx to just get it barely working.
On the other hand, the most needed is the crosswords themselves. I can simply use an Excel sheet to create my own styling as long as I can have the pure text console outputs. So it would be really good if there is an option to generate a pure text output without the need to import any graphics related libraries.
I think it's dead
Hey, both the python2 and python3 versions fail when trying to run the gui with errors like:
ERROR:root:Could not find any typelib for GtkSource
Traceback (most recent call last):
File "/usr/bin/genxword3-gtk", line 4, in <module>
from genxword3 import gui
File "/usr/lib/python3.3/site-packages/genxword3/gui.py", line 23, in <module>
from gi.repository import Gtk, GtkSource, Pango
ImportError: cannot import name GtkSource
python-gobject and python-cairo (and their python2 equivalents) are installed.
Thanks!
Scott
Hi, thank you for this wonderful program.
I'm trying to make a hebrew crossword, I used the python3 version which allowed me to write the words in hebrew. However, when genxword generated the crossword, it did it in a reverse order.
To explain: hebrew language is written and read from right to left. So genxword should generate the crossword taking into account that the vertical words should go from top to bottom (as they already do, that's fine) and the horizontal words should go from right to left.
That is, to make it more graphical: the word HELLO, if genxword thinks should go in the horizontal way, should be put OLLEH. However in the vertical way it should treat it as it does right now, no change needed.
Do you think this is possible? I'd love to help doing it but I'm not an experienced python programmer, maybe if you give me some tips of where should this be taken care of, I can try to see and solve it... but I'm just a computer loving rabbi...
Thank you!!
Rabbi Tuvia Serber.
Thanks for this excellent program.
Currently, the boxes that are printed in pdf/png are all individual boxes, inside their own grid. this makes some lines appear thick, if there is a box next to it, and some of them thin. Can we mark the boundaries as standard, and if required overwrite the lines between boxes, so as to give a more beautiful look to the output crossword.
For example, in calculate.py, draw_img, if we change to the following, the png generated is much more print friendly.
context.set_line_width(3.0)
context.set_source_rgb(0.3, 0.3, 0.3)
Thanks.
It would be greate to add the ability to only build the CLI interface/program. Personally, I mostly use this program/package at work through Cygwin/WSL on windows without any GUI and have no need for the GTK side of things.
I'd like the ability to build the program to not have that part and to not need the GTK dependencies. An obvious workaround is just have it build with the deps then delete the files I don't need, but I'd prefer the ability to have it trimmed down when I build it to begin with.
Thanks
Failed to build PyGObject
ERROR: Could not build wheels for PyGObject which use PEP 517 and cannot be installed directly
Steps to reproduce:
pip3 install genxword
In the PDF exported, the output has it showing the across clues followed beneath by the down clues. I'd prefer being able to have them listed side-by-side manner.
Here is example output from a crossword I created earlier:
Across
2. 파란색
4. 분홍색
6. 보라색
8. 초록색
10. 노란색
11. 회색
Down
1. 빨간색
2. 검은색
3. 하얀색
5. 주황색
7. 갈색
9. 색깔
And this is how I'd prefer the same to look:
Across Down
2. 파란색 1. 빨간색
4. 분홍색 2. 검은색
6. 보라색 3. 하얀색
8. 초록색 5. 주황색
10. 노란색 7. 갈색
11. 회색 9. 색깔
Thank you.
Genxword 1.0.9 and version 0.95 in terminal and genxwordt-gtk version python and python3 makes a grid but does not save clues and keys.
Only version 0.55 works correctly.
Is there a way I can debug this to make the newer versions work?
Seems the 2.0.1 release was only released to pypi. On here, github, the most recent release is 2.0.0
I only noticed it because I wrote a gentoo ebuild that would download the sourcecode from github and when I changed it to 2.0.1, it couldn't find the sources.
Note: I fixed the ebuild I was working on by pointing it to the source code uploaded to pypi, so this is more an FYI than anything.
No errors/warnings provided upon entering an invalid output format
outputs that the following files were saved and below outputs a blank line because nothing was saved.
Should issue an error instead, imo.
$ genxword -o what words.list b
...
4 out of 4
Are you happy with this solution? [Y/n] y
The following files have been saved to your current working directory:
Getting this error when using python 3.7.4.
Hi riverrun,
Installing genxword on debian stretch with the command
pip3 install genxword
failed. The packages listed on https://github.com/riverrun/genxword#dependencies were all installed.
There is an additional package to be installed on debian stretch: gettext.
apt-get install gettext
After this, installation worked.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.