iInitial commit. - crossword-generator - A crossword vtv generator. Err bitreich.org 70
hgit clone git://bitreich.org/crossword-generator git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/crossword-generator URL:git://bitreich.org/crossword-generator git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/crossword-generator bitreich.org 70
1Log /scm/crossword-generator/log.gph bitreich.org 70
1Files /scm/crossword-generator/files.gph bitreich.org 70
1Refs /scm/crossword-generator/refs.gph bitreich.org 70
1Tags /scm/crossword-generator/tag bitreich.org 70
1LICENSE /scm/crossword-generator/file/LICENSE.gph bitreich.org 70
i--- Err bitreich.org 70
1commit c0426e7dfbf541d2514d5a541eee948edc7eb96a /scm/crossword-generator/commit/c0426e7dfbf541d2514d5a541eee948edc7eb96a.gph bitreich.org 70
hAuthor: Christoph Lohmann <20h@r-36.net> URL:mailto:20h@r-36.net bitreich.org 70
iDate: Mon, 1 Jan 2024 19:16:41 +0100 Err bitreich.org 70
i Err bitreich.org 70
iInitial commit. Err bitreich.org 70
i Err bitreich.org 70
iDiffstat: Err bitreich.org 70
i A LICENSE | 676 +++++++++++++++++++++++++++++++ Err bitreich.org 70
i A gen-80x25-crossword | 245 +++++++++++++++++++++++++++++++ Err bitreich.org 70
i A get_apropos_entries.sh | 22 ++++++++++++++++++++++ Err bitreich.org 70
i Err bitreich.org 70
i3 files changed, 943 insertions(+), 0 deletions(-) Err bitreich.org 70
i--- Err bitreich.org 70
1diff --git a/LICENSE b/LICENSE /scm/crossword-generator/file/LICENSE.gph bitreich.org 70
i@@ -0,0 +1,676 @@ Err bitreich.org 70
i+© 2023-2024 Christoph Lohmann <20h at r-36 dot net> Err bitreich.org 70
i+ Err bitreich.org 70
i+ GNU GENERAL PUBLIC LICENSE Err bitreich.org 70
i+ Version 3, 29 June 2007 Err bitreich.org 70
i+ Err bitreich.org 70
i+ Copyright (C) 2007 Free Software Foundation, Inc. Err bitreich.org 70
i+ Everyone is permitted to copy and distribute verbatim copies Err bitreich.org 70
i+ of this license document, but changing it is not allowed. Err bitreich.org 70
i+ Err bitreich.org 70
i+ Preamble Err bitreich.org 70
i+ Err bitreich.org 70
i+ The GNU General Public License is a free, copyleft license for Err bitreich.org 70
i+software and other kinds of works. Err bitreich.org 70
i+ Err bitreich.org 70
i+ The licenses for most software and other practical works are designed Err bitreich.org 70
i+to take away your freedom to share and change the works. By contrast, Err bitreich.org 70
i+the GNU General Public License is intended to guarantee your freedom to Err bitreich.org 70
i+share and change all versions of a program--to make sure it remains free Err bitreich.org 70
i+software for all its users. We, the Free Software Foundation, use the Err bitreich.org 70
i+GNU General Public License for most of our software; it applies also to Err bitreich.org 70
i+any other work released this way by its authors. You can apply it to Err bitreich.org 70
i+your programs, too. Err bitreich.org 70
i+ Err bitreich.org 70
i+ When we speak of free software, we are referring to freedom, not Err bitreich.org 70
i+price. Our General Public Licenses are designed to make sure that you Err bitreich.org 70
i+have the freedom to distribute copies of free software (and charge for Err bitreich.org 70
i+them if you wish), that you receive source code or can get it if you Err bitreich.org 70
i+want it, that you can change the software or use pieces of it in new Err bitreich.org 70
i+free programs, and that you know you can do these things. Err bitreich.org 70
i+ Err bitreich.org 70
i+ To protect your rights, we need to prevent others from denying you Err bitreich.org 70
i+these rights or asking you to surrender the rights. Therefore, you have Err bitreich.org 70
i+certain responsibilities if you distribute copies of the software, or if Err bitreich.org 70
i+you modify it: responsibilities to respect the freedom of others. Err bitreich.org 70
i+ Err bitreich.org 70
i+ For example, if you distribute copies of such a program, whether Err bitreich.org 70
i+gratis or for a fee, you must pass on to the recipients the same Err bitreich.org 70
i+freedoms that you received. You must make sure that they, too, receive Err bitreich.org 70
i+or can get the source code. And you must show them these terms so they Err bitreich.org 70
i+know their rights. Err bitreich.org 70
i+ Err bitreich.org 70
i+ Developers that use the GNU GPL protect your rights with two steps: Err bitreich.org 70
i+(1) assert copyright on the software, and (2) offer you this License Err bitreich.org 70
i+giving you legal permission to copy, distribute and/or modify it. Err bitreich.org 70
i+ Err bitreich.org 70
i+ For the developers' and authors' protection, the GPL clearly explains Err bitreich.org 70
i+that there is no warranty for this free software. For both users' and Err bitreich.org 70
i+authors' sake, the GPL requires that modified versions be marked as Err bitreich.org 70
i+changed, so that their problems will not be attributed erroneously to Err bitreich.org 70
i+authors of previous versions. Err bitreich.org 70
i+ Err bitreich.org 70
i+ Some devices are designed to deny users access to install or run Err bitreich.org 70
i+modified versions of the software inside them, although the manufacturer Err bitreich.org 70
i+can do so. This is fundamentally incompatible with the aim of Err bitreich.org 70
i+protecting users' freedom to change the software. The systematic Err bitreich.org 70
i+pattern of such abuse occurs in the area of products for individuals to Err bitreich.org 70
i+use, which is precisely where it is most unacceptable. Therefore, we Err bitreich.org 70
i+have designed this version of the GPL to prohibit the practice for those Err bitreich.org 70
i+products. If such problems arise substantially in other domains, we Err bitreich.org 70
i+stand ready to extend this provision to those domains in future versions Err bitreich.org 70
i+of the GPL, as needed to protect the freedom of users. Err bitreich.org 70
i+ Err bitreich.org 70
i+ Finally, every program is threatened constantly by software patents. Err bitreich.org 70
i+States should not allow patents to restrict development and use of Err bitreich.org 70
i+software on general-purpose computers, but in those that do, we wish to Err bitreich.org 70
i+avoid the special danger that patents applied to a free program could Err bitreich.org 70
i+make it effectively proprietary. To prevent this, the GPL assures that Err bitreich.org 70
i+patents cannot be used to render the program non-free. Err bitreich.org 70
i+ Err bitreich.org 70
i+ The precise terms and conditions for copying, distribution and Err bitreich.org 70
i+modification follow. Err bitreich.org 70
i+ Err bitreich.org 70
i+ TERMS AND CONDITIONS Err bitreich.org 70
i+ Err bitreich.org 70
i+ 0. Definitions. Err bitreich.org 70
i+ Err bitreich.org 70
i+ "This License" refers to version 3 of the GNU General Public License. Err bitreich.org 70
i+ Err bitreich.org 70
i+ "Copyright" also means copyright-like laws that apply to other kinds of Err bitreich.org 70
i+works, such as semiconductor masks. Err bitreich.org 70
i+ Err bitreich.org 70
i+ "The Program" refers to any copyrightable work licensed under this Err bitreich.org 70
i+License. Each licensee is addressed as "you". "Licensees" and Err bitreich.org 70
i+"recipients" may be individuals or organizations. Err bitreich.org 70
i+ Err bitreich.org 70
i+ To "modify" a work means to copy from or adapt all or part of the work Err bitreich.org 70
i+in a fashion requiring copyright permission, other than the making of an Err bitreich.org 70
i+exact copy. The resulting work is called a "modified version" of the Err bitreich.org 70
i+earlier work or a work "based on" the earlier work. Err bitreich.org 70
i+ Err bitreich.org 70
i+ A "covered work" means either the unmodified Program or a work based Err bitreich.org 70
i+on the Program. Err bitreich.org 70
i+ Err bitreich.org 70
i+ To "propagate" a work means to do anything with it that, without Err bitreich.org 70
i+permission, would make you directly or secondarily liable for Err bitreich.org 70
i+infringement under applicable copyright law, except executing it on a Err bitreich.org 70
i+computer or modifying a private copy. Propagation includes copying, Err bitreich.org 70
i+distribution (with or without modification), making available to the Err bitreich.org 70
i+public, and in some countries other activities as well. Err bitreich.org 70
i+ Err bitreich.org 70
i+ To "convey" a work means any kind of propagation that enables other Err bitreich.org 70
i+parties to make or receive copies. Mere interaction with a user through Err bitreich.org 70
i+a computer network, with no transfer of a copy, is not conveying. Err bitreich.org 70
i+ Err bitreich.org 70
i+ An interactive user interface displays "Appropriate Legal Notices" Err bitreich.org 70
i+to the extent that it includes a convenient and prominently visible Err bitreich.org 70
i+feature that (1) displays an appropriate copyright notice, and (2) Err bitreich.org 70
i+tells the user that there is no warranty for the work (except to the Err bitreich.org 70
i+extent that warranties are provided), that licensees may convey the Err bitreich.org 70
i+work under this License, and how to view a copy of this License. If Err bitreich.org 70
i+the interface presents a list of user commands or options, such as a Err bitreich.org 70
i+menu, a prominent item in the list meets this criterion. Err bitreich.org 70
i+ Err bitreich.org 70
i+ 1. Source Code. Err bitreich.org 70
i+ Err bitreich.org 70
i+ The "source code" for a work means the preferred form of the work Err bitreich.org 70
i+for making modifications to it. "Object code" means any non-source Err bitreich.org 70
i+form of a work. Err bitreich.org 70
i+ Err bitreich.org 70
i+ A "Standard Interface" means an interface that either is an official Err bitreich.org 70
i+standard defined by a recognized standards body, or, in the case of Err bitreich.org 70
i+interfaces specified for a particular programming language, one that Err bitreich.org 70
i+is widely used among developers working in that language. Err bitreich.org 70
i+ Err bitreich.org 70
i+ The "System Libraries" of an executable work include anything, other Err bitreich.org 70
i+than the work as a whole, that (a) is included in the normal form of Err bitreich.org 70
i+packaging a Major Component, but which is not part of that Major Err bitreich.org 70
i+Component, and (b) serves only to enable use of the work with that Err bitreich.org 70
i+Major Component, or to implement a Standard Interface for which an Err bitreich.org 70
i+implementation is available to the public in source code form. A Err bitreich.org 70
i+"Major Component", in this context, means a major essential component Err bitreich.org 70
i+(kernel, window system, and so on) of the specific operating system Err bitreich.org 70
i+(if any) on which the executable work runs, or a compiler used to Err bitreich.org 70
i+produce the work, or an object code interpreter used to run it. Err bitreich.org 70
i+ Err bitreich.org 70
i+ The "Corresponding Source" for a work in object code form means all Err bitreich.org 70
i+the source code needed to generate, install, and (for an executable Err bitreich.org 70
i+work) run the object code and to modify the work, including scripts to Err bitreich.org 70
i+control those activities. However, it does not include the work's Err bitreich.org 70
i+System Libraries, or general-purpose tools or generally available free Err bitreich.org 70
i+programs which are used unmodified in performing those activities but Err bitreich.org 70
i+which are not part of the work. For example, Corresponding Source Err bitreich.org 70
i+includes interface definition files associated with source files for Err bitreich.org 70
i+the work, and the source code for shared libraries and dynamically Err bitreich.org 70
i+linked subprograms that the work is specifically designed to require, Err bitreich.org 70
i+such as by intimate data communication or control flow between those Err bitreich.org 70
i+subprograms and other parts of the work. Err bitreich.org 70
i+ Err bitreich.org 70
i+ The Corresponding Source need not include anything that users Err bitreich.org 70
i+can regenerate automatically from other parts of the Corresponding Err bitreich.org 70
i+Source. Err bitreich.org 70
i+ Err bitreich.org 70
i+ The Corresponding Source for a work in source code form is that Err bitreich.org 70
i+same work. Err bitreich.org 70
i+ Err bitreich.org 70
i+ 2. Basic Permissions. Err bitreich.org 70
i+ Err bitreich.org 70
i+ All rights granted under this License are granted for the term of Err bitreich.org 70
i+copyright on the Program, and are irrevocable provided the stated Err bitreich.org 70
i+conditions are met. This License explicitly affirms your unlimited Err bitreich.org 70
i+permission to run the unmodified Program. The output from running a Err bitreich.org 70
i+covered work is covered by this License only if the output, given its Err bitreich.org 70
i+content, constitutes a covered work. This License acknowledges your Err bitreich.org 70
i+rights of fair use or other equivalent, as provided by copyright law. Err bitreich.org 70
i+ Err bitreich.org 70
i+ You may make, run and propagate covered works that you do not Err bitreich.org 70
i+convey, without conditions so long as your license otherwise remains Err bitreich.org 70
i+in force. You may convey covered works to others for the sole purpose Err bitreich.org 70
i+of having them make modifications exclusively for you, or provide you Err bitreich.org 70
i+with facilities for running those works, provided that you comply with Err bitreich.org 70
i+the terms of this License in conveying all material for which you do Err bitreich.org 70
i+not control copyright. Those thus making or running the covered works Err bitreich.org 70
i+for you must do so exclusively on your behalf, under your direction Err bitreich.org 70
i+and control, on terms that prohibit them from making any copies of Err bitreich.org 70
i+your copyrighted material outside their relationship with you. Err bitreich.org 70
i+ Err bitreich.org 70
i+ Conveying under any other circumstances is permitted solely under Err bitreich.org 70
i+the conditions stated below. Sublicensing is not allowed; section 10 Err bitreich.org 70
i+makes it unnecessary. Err bitreich.org 70
i+ Err bitreich.org 70
i+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law. Err bitreich.org 70
i+ Err bitreich.org 70
i+ No covered work shall be deemed part of an effective technological Err bitreich.org 70
i+measure under any applicable law fulfilling obligations under article Err bitreich.org 70
i+11 of the WIPO copyright treaty adopted on 20 December 1996, or Err bitreich.org 70
i+similar laws prohibiting or restricting circumvention of such Err bitreich.org 70
i+measures. Err bitreich.org 70
i+ Err bitreich.org 70
i+ When you convey a covered work, you waive any legal power to forbid Err bitreich.org 70
i+circumvention of technological measures to the extent such circumvention Err bitreich.org 70
i+is effected by exercising rights under this License with respect to Err bitreich.org 70
i+the covered work, and you disclaim any intention to limit operation or Err bitreich.org 70
i+modification of the work as a means of enforcing, against the work's Err bitreich.org 70
i+users, your or third parties' legal rights to forbid circumvention of Err bitreich.org 70
i+technological measures. Err bitreich.org 70
i+ Err bitreich.org 70
i+ 4. Conveying Verbatim Copies. Err bitreich.org 70
i+ Err bitreich.org 70
i+ You may convey verbatim copies of the Program's source code as you Err bitreich.org 70
i+receive it, in any medium, provided that you conspicuously and Err bitreich.org 70
i+appropriately publish on each copy an appropriate copyright notice; Err bitreich.org 70
i+keep intact all notices stating that this License and any Err bitreich.org 70
i+non-permissive terms added in accord with section 7 apply to the code; Err bitreich.org 70
i+keep intact all notices of the absence of any warranty; and give all Err bitreich.org 70
i+recipients a copy of this License along with the Program. Err bitreich.org 70
i+ Err bitreich.org 70
i+ You may charge any price or no price for each copy that you convey, Err bitreich.org 70
i+and you may offer support or warranty protection for a fee. Err bitreich.org 70
i+ Err bitreich.org 70
i+ 5. Conveying Modified Source Versions. Err bitreich.org 70
i+ Err bitreich.org 70
i+ You may convey a work based on the Program, or the modifications to Err bitreich.org 70
i+produce it from the Program, in the form of source code under the Err bitreich.org 70
i+terms of section 4, provided that you also meet all of these conditions: Err bitreich.org 70
i+ Err bitreich.org 70
i+ a) The work must carry prominent notices stating that you modified Err bitreich.org 70
i+ it, and giving a relevant date. Err bitreich.org 70
i+ Err bitreich.org 70
i+ b) The work must carry prominent notices stating that it is Err bitreich.org 70
i+ released under this License and any conditions added under section Err bitreich.org 70
i+ 7. This requirement modifies the requirement in section 4 to Err bitreich.org 70
i+ "keep intact all notices". Err bitreich.org 70
i+ Err bitreich.org 70
i+ c) You must license the entire work, as a whole, under this Err bitreich.org 70
i+ License to anyone who comes into possession of a copy. This Err bitreich.org 70
i+ License will therefore apply, along with any applicable section 7 Err bitreich.org 70
i+ additional terms, to the whole of the work, and all its parts, Err bitreich.org 70
i+ regardless of how they are packaged. This License gives no Err bitreich.org 70
i+ permission to license the work in any other way, but it does not Err bitreich.org 70
i+ invalidate such permission if you have separately received it. Err bitreich.org 70
i+ Err bitreich.org 70
i+ d) If the work has interactive user interfaces, each must display Err bitreich.org 70
i+ Appropriate Legal Notices; however, if the Program has interactive Err bitreich.org 70
i+ interfaces that do not display Appropriate Legal Notices, your Err bitreich.org 70
i+ work need not make them do so. Err bitreich.org 70
i+ Err bitreich.org 70
i+ A compilation of a covered work with other separate and independent Err bitreich.org 70
i+works, which are not by their nature extensions of the covered work, Err bitreich.org 70
i+and which are not combined with it such as to form a larger program, Err bitreich.org 70
i+in or on a volume of a storage or distribution medium, is called an Err bitreich.org 70
i+"aggregate" if the compilation and its resulting copyright are not Err bitreich.org 70
i+used to limit the access or legal rights of the compilation's users Err bitreich.org 70
i+beyond what the individual works permit. Inclusion of a covered work Err bitreich.org 70
i+in an aggregate does not cause this License to apply to the other Err bitreich.org 70
i+parts of the aggregate. Err bitreich.org 70
i+ Err bitreich.org 70
i+ 6. Conveying Non-Source Forms. Err bitreich.org 70
i+ Err bitreich.org 70
i+ You may convey a covered work in object code form under the terms Err bitreich.org 70
i+of sections 4 and 5, provided that you also convey the Err bitreich.org 70
i+machine-readable Corresponding Source under the terms of this License, Err bitreich.org 70
i+in one of these ways: Err bitreich.org 70
i+ Err bitreich.org 70
i+ a) Convey the object code in, or embodied in, a physical product Err bitreich.org 70
i+ (including a physical distribution medium), accompanied by the Err bitreich.org 70
i+ Corresponding Source fixed on a durable physical medium Err bitreich.org 70
i+ customarily used for software interchange. Err bitreich.org 70
i+ Err bitreich.org 70
i+ b) Convey the object code in, or embodied in, a physical product Err bitreich.org 70
i+ (including a physical distribution medium), accompanied by a Err bitreich.org 70
i+ written offer, valid for at least three years and valid for as Err bitreich.org 70
i+ long as you offer spare parts or customer support for that product Err bitreich.org 70
i+ model, to give anyone who possesses the object code either (1) a Err bitreich.org 70
i+ copy of the Corresponding Source for all the software in the Err bitreich.org 70
i+ product that is covered by this License, on a durable physical Err bitreich.org 70
i+ medium customarily used for software interchange, for a price no Err bitreich.org 70
i+ more than your reasonable cost of physically performing this Err bitreich.org 70
i+ conveying of source, or (2) access to copy the Err bitreich.org 70
i+ Corresponding Source from a network server at no charge. Err bitreich.org 70
i+ Err bitreich.org 70
i+ c) Convey individual copies of the object code with a copy of the Err bitreich.org 70
i+ written offer to provide the Corresponding Source. This Err bitreich.org 70
i+ alternative is allowed only occasionally and noncommercially, and Err bitreich.org 70
i+ only if you received the object code with such an offer, in accord Err bitreich.org 70
i+ with subsection 6b. Err bitreich.org 70
i+ Err bitreich.org 70
i+ d) Convey the object code by offering access from a designated Err bitreich.org 70
i+ place (gratis or for a charge), and offer equivalent access to the Err bitreich.org 70
i+ Corresponding Source in the same way through the same place at no Err bitreich.org 70
i+ further charge. You need not require recipients to copy the Err bitreich.org 70
i+ Corresponding Source along with the object code. If the place to Err bitreich.org 70
i+ copy the object code is a network server, the Corresponding Source Err bitreich.org 70
i+ may be on a different server (operated by you or a third party) Err bitreich.org 70
i+ that supports equivalent copying facilities, provided you maintain Err bitreich.org 70
i+ clear directions next to the object code saying where to find the Err bitreich.org 70
i+ Corresponding Source. Regardless of what server hosts the Err bitreich.org 70
i+ Corresponding Source, you remain obligated to ensure that it is Err bitreich.org 70
i+ available for as long as needed to satisfy these requirements. Err bitreich.org 70
i+ Err bitreich.org 70
i+ e) Convey the object code using peer-to-peer transmission, provided Err bitreich.org 70
i+ you inform other peers where the object code and Corresponding Err bitreich.org 70
i+ Source of the work are being offered to the general public at no Err bitreich.org 70
i+ charge under subsection 6d. Err bitreich.org 70
i+ Err bitreich.org 70
i+ A separable portion of the object code, whose source code is excluded Err bitreich.org 70
i+from the Corresponding Source as a System Library, need not be Err bitreich.org 70
i+included in conveying the object code work. Err bitreich.org 70
i+ Err bitreich.org 70
i+ A "User Product" is either (1) a "consumer product", which means any Err bitreich.org 70
i+tangible personal property which is normally used for personal, family, Err bitreich.org 70
i+or household purposes, or (2) anything designed or sold for incorporation Err bitreich.org 70
i+into a dwelling. In determining whether a product is a consumer product, Err bitreich.org 70
i+doubtful cases shall be resolved in favor of coverage. For a particular Err bitreich.org 70
i+product received by a particular user, "normally used" refers to a Err bitreich.org 70
i+typical or common use of that class of product, regardless of the status Err bitreich.org 70
i+of the particular user or of the way in which the particular user Err bitreich.org 70
i+actually uses, or expects or is expected to use, the product. A product Err bitreich.org 70
i+is a consumer product regardless of whether the product has substantial Err bitreich.org 70
i+commercial, industrial or non-consumer uses, unless such uses represent Err bitreich.org 70
i+the only significant mode of use of the product. Err bitreich.org 70
i+ Err bitreich.org 70
i+ "Installation Information" for a User Product means any methods, Err bitreich.org 70
i+procedures, authorization keys, or other information required to install Err bitreich.org 70
i+and execute modified versions of a covered work in that User Product from Err bitreich.org 70
i+a modified version of its Corresponding Source. The information must Err bitreich.org 70
i+suffice to ensure that the continued functioning of the modified object Err bitreich.org 70
i+code is in no case prevented or interfered with solely because Err bitreich.org 70
i+modification has been made. Err bitreich.org 70
i+ Err bitreich.org 70
i+ If you convey an object code work under this section in, or with, or Err bitreich.org 70
i+specifically for use in, a User Product, and the conveying occurs as Err bitreich.org 70
i+part of a transaction in which the right of possession and use of the Err bitreich.org 70
i+User Product is transferred to the recipient in perpetuity or for a Err bitreich.org 70
i+fixed term (regardless of how the transaction is characterized), the Err bitreich.org 70
i+Corresponding Source conveyed under this section must be accompanied Err bitreich.org 70
i+by the Installation Information. But this requirement does not apply Err bitreich.org 70
i+if neither you nor any third party retains the ability to install Err bitreich.org 70
i+modified object code on the User Product (for example, the work has Err bitreich.org 70
i+been installed in ROM). Err bitreich.org 70
i+ Err bitreich.org 70
i+ The requirement to provide Installation Information does not include a Err bitreich.org 70
i+requirement to continue to provide support service, warranty, or updates Err bitreich.org 70
i+for a work that has been modified or installed by the recipient, or for Err bitreich.org 70
i+the User Product in which it has been modified or installed. Access to a Err bitreich.org 70
i+network may be denied when the modification itself materially and Err bitreich.org 70
i+adversely affects the operation of the network or violates the rules and Err bitreich.org 70
i+protocols for communication across the network. Err bitreich.org 70
i+ Err bitreich.org 70
i+ Corresponding Source conveyed, and Installation Information provided, Err bitreich.org 70
i+in accord with this section must be in a format that is publicly Err bitreich.org 70
i+documented (and with an implementation available to the public in Err bitreich.org 70
i+source code form), and must require no special password or key for Err bitreich.org 70
i+unpacking, reading or copying. Err bitreich.org 70
i+ Err bitreich.org 70
i+ 7. Additional Terms. Err bitreich.org 70
i+ Err bitreich.org 70
i+ "Additional permissions" are terms that supplement the terms of this Err bitreich.org 70
i+License by making exceptions from one or more of its conditions. Err bitreich.org 70
i+Additional permissions that are applicable to the entire Program shall Err bitreich.org 70
i+be treated as though they were included in this License, to the extent Err bitreich.org 70
i+that they are valid under applicable law. If additional permissions Err bitreich.org 70
i+apply only to part of the Program, that part may be used separately Err bitreich.org 70
i+under those permissions, but the entire Program remains governed by Err bitreich.org 70
i+this License without regard to the additional permissions. Err bitreich.org 70
i+ Err bitreich.org 70
i+ When you convey a copy of a covered work, you may at your option Err bitreich.org 70
i+remove any additional permissions from that copy, or from any part of Err bitreich.org 70
i+it. (Additional permissions may be written to require their own Err bitreich.org 70
i+removal in certain cases when you modify the work.) You may place Err bitreich.org 70
i+additional permissions on material, added by you to a covered work, Err bitreich.org 70
i+for which you have or can give appropriate copyright permission. Err bitreich.org 70
i+ Err bitreich.org 70
i+ Notwithstanding any other provision of this License, for material you Err bitreich.org 70
i+add to a covered work, you may (if authorized by the copyright holders of Err bitreich.org 70
i+that material) supplement the terms of this License with terms: Err bitreich.org 70
i+ Err bitreich.org 70
i+ a) Disclaiming warranty or limiting liability differently from the Err bitreich.org 70
i+ terms of sections 15 and 16 of this License; or Err bitreich.org 70
i+ Err bitreich.org 70
i+ b) Requiring preservation of specified reasonable legal notices or Err bitreich.org 70
i+ author attributions in that material or in the Appropriate Legal Err bitreich.org 70
i+ Notices displayed by works containing it; or Err bitreich.org 70
i+ Err bitreich.org 70
i+ c) Prohibiting misrepresentation of the origin of that material, or Err bitreich.org 70
i+ requiring that modified versions of such material be marked in Err bitreich.org 70
i+ reasonable ways as different from the original version; or Err bitreich.org 70
i+ Err bitreich.org 70
i+ d) Limiting the use for publicity purposes of names of licensors or Err bitreich.org 70
i+ authors of the material; or Err bitreich.org 70
i+ Err bitreich.org 70
i+ e) Declining to grant rights under trademark law for use of some Err bitreich.org 70
i+ trade names, trademarks, or service marks; or Err bitreich.org 70
i+ Err bitreich.org 70
i+ f) Requiring indemnification of licensors and authors of that Err bitreich.org 70
i+ material by anyone who conveys the material (or modified versions of Err bitreich.org 70
i+ it) with contractual assumptions of liability to the recipient, for Err bitreich.org 70
i+ any liability that these contractual assumptions directly impose on Err bitreich.org 70
i+ those licensors and authors. Err bitreich.org 70
i+ Err bitreich.org 70
i+ All other non-permissive additional terms are considered "further Err bitreich.org 70
i+restrictions" within the meaning of section 10. If the Program as you Err bitreich.org 70
i+received it, or any part of it, contains a notice stating that it is Err bitreich.org 70
i+governed by this License along with a term that is a further Err bitreich.org 70
i+restriction, you may remove that term. If a license document contains Err bitreich.org 70
i+a further restriction but permits relicensing or conveying under this Err bitreich.org 70
i+License, you may add to a covered work material governed by the terms Err bitreich.org 70
i+of that license document, provided that the further restriction does Err bitreich.org 70
i+not survive such relicensing or conveying. Err bitreich.org 70
i+ Err bitreich.org 70
i+ If you add terms to a covered work in accord with this section, you Err bitreich.org 70
i+must place, in the relevant source files, a statement of the Err bitreich.org 70
i+additional terms that apply to those files, or a notice indicating Err bitreich.org 70
i+where to find the applicable terms. Err bitreich.org 70
i+ Err bitreich.org 70
i+ Additional terms, permissive or non-permissive, may be stated in the Err bitreich.org 70
i+form of a separately written license, or stated as exceptions; Err bitreich.org 70
i+the above requirements apply either way. Err bitreich.org 70
i+ Err bitreich.org 70
i+ 8. Termination. Err bitreich.org 70
i+ Err bitreich.org 70
i+ You may not propagate or modify a covered work except as expressly Err bitreich.org 70
i+provided under this License. Any attempt otherwise to propagate or Err bitreich.org 70
i+modify it is void, and will automatically terminate your rights under Err bitreich.org 70
i+this License (including any patent licenses granted under the third Err bitreich.org 70
i+paragraph of section 11). Err bitreich.org 70
i+ Err bitreich.org 70
i+ However, if you cease all violation of this License, then your Err bitreich.org 70
i+license from a particular copyright holder is reinstated (a) Err bitreich.org 70
i+provisionally, unless and until the copyright holder explicitly and Err bitreich.org 70
i+finally terminates your license, and (b) permanently, if the copyright Err bitreich.org 70
i+holder fails to notify you of the violation by some reasonable means Err bitreich.org 70
i+prior to 60 days after the cessation. Err bitreich.org 70
i+ Err bitreich.org 70
i+ Moreover, your license from a particular copyright holder is Err bitreich.org 70
i+reinstated permanently if the copyright holder notifies you of the Err bitreich.org 70
i+violation by some reasonable means, this is the first time you have Err bitreich.org 70
i+received notice of violation of this License (for any work) from that Err bitreich.org 70
i+copyright holder, and you cure the violation prior to 30 days after Err bitreich.org 70
i+your receipt of the notice. Err bitreich.org 70
i+ Err bitreich.org 70
i+ Termination of your rights under this section does not terminate the Err bitreich.org 70
i+licenses of parties who have received copies or rights from you under Err bitreich.org 70
i+this License. If your rights have been terminated and not permanently Err bitreich.org 70
i+reinstated, you do not qualify to receive new licenses for the same Err bitreich.org 70
i+material under section 10. Err bitreich.org 70
i+ Err bitreich.org 70
i+ 9. Acceptance Not Required for Having Copies. Err bitreich.org 70
i+ Err bitreich.org 70
i+ You are not required to accept this License in order to receive or Err bitreich.org 70
i+run a copy of the Program. Ancillary propagation of a covered work Err bitreich.org 70
i+occurring solely as a consequence of using peer-to-peer transmission Err bitreich.org 70
i+to receive a copy likewise does not require acceptance. However, Err bitreich.org 70
i+nothing other than this License grants you permission to propagate or Err bitreich.org 70
i+modify any covered work. These actions infringe copyright if you do Err bitreich.org 70
i+not accept this License. Therefore, by modifying or propagating a Err bitreich.org 70
i+covered work, you indicate your acceptance of this License to do so. Err bitreich.org 70
i+ Err bitreich.org 70
i+ 10. Automatic Licensing of Downstream Recipients. Err bitreich.org 70
i+ Err bitreich.org 70
i+ Each time you convey a covered work, the recipient automatically Err bitreich.org 70
i+receives a license from the original licensors, to run, modify and Err bitreich.org 70
i+propagate that work, subject to this License. You are not responsible Err bitreich.org 70
i+for enforcing compliance by third parties with this License. Err bitreich.org 70
i+ Err bitreich.org 70
i+ An "entity transaction" is a transaction transferring control of an Err bitreich.org 70
i+organization, or substantially all assets of one, or subdividing an Err bitreich.org 70
i+organization, or merging organizations. If propagation of a covered Err bitreich.org 70
i+work results from an entity transaction, each party to that Err bitreich.org 70
i+transaction who receives a copy of the work also receives whatever Err bitreich.org 70
i+licenses to the work the party's predecessor in interest had or could Err bitreich.org 70
i+give under the previous paragraph, plus a right to possession of the Err bitreich.org 70
i+Corresponding Source of the work from the predecessor in interest, if Err bitreich.org 70
i+the predecessor has it or can get it with reasonable efforts. Err bitreich.org 70
i+ Err bitreich.org 70
i+ You may not impose any further restrictions on the exercise of the Err bitreich.org 70
i+rights granted or affirmed under this License. For example, you may Err bitreich.org 70
i+not impose a license fee, royalty, or other charge for exercise of Err bitreich.org 70
i+rights granted under this License, and you may not initiate litigation Err bitreich.org 70
i+(including a cross-claim or counterclaim in a lawsuit) alleging that Err bitreich.org 70
i+any patent claim is infringed by making, using, selling, offering for Err bitreich.org 70
i+sale, or importing the Program or any portion of it. Err bitreich.org 70
i+ Err bitreich.org 70
i+ 11. Patents. Err bitreich.org 70
i+ Err bitreich.org 70
i+ A "contributor" is a copyright holder who authorizes use under this Err bitreich.org 70
i+License of the Program or a work on which the Program is based. The Err bitreich.org 70
i+work thus licensed is called the contributor's "contributor version". Err bitreich.org 70
i+ Err bitreich.org 70
i+ A contributor's "essential patent claims" are all patent claims Err bitreich.org 70
i+owned or controlled by the contributor, whether already acquired or Err bitreich.org 70
i+hereafter acquired, that would be infringed by some manner, permitted Err bitreich.org 70
i+by this License, of making, using, or selling its contributor version, Err bitreich.org 70
i+but do not include claims that would be infringed only as a Err bitreich.org 70
i+consequence of further modification of the contributor version. For Err bitreich.org 70
i+purposes of this definition, "control" includes the right to grant Err bitreich.org 70
i+patent sublicenses in a manner consistent with the requirements of Err bitreich.org 70
i+this License. Err bitreich.org 70
i+ Err bitreich.org 70
i+ Each contributor grants you a non-exclusive, worldwide, royalty-free Err bitreich.org 70
i+patent license under the contributor's essential patent claims, to Err bitreich.org 70
i+make, use, sell, offer for sale, import and otherwise run, modify and Err bitreich.org 70
i+propagate the contents of its contributor version. Err bitreich.org 70
i+ Err bitreich.org 70
i+ In the following three paragraphs, a "patent license" is any express Err bitreich.org 70
i+agreement or commitment, however denominated, not to enforce a patent Err bitreich.org 70
i+(such as an express permission to practice a patent or covenant not to Err bitreich.org 70
i+sue for patent infringement). To "grant" such a patent license to a Err bitreich.org 70
i+party means to make such an agreement or commitment not to enforce a Err bitreich.org 70
i+patent against the party. Err bitreich.org 70
i+ Err bitreich.org 70
i+ If you convey a covered work, knowingly relying on a patent license, Err bitreich.org 70
i+and the Corresponding Source of the work is not available for anyone Err bitreich.org 70
i+to copy, free of charge and under the terms of this License, through a Err bitreich.org 70
i+publicly available network server or other readily accessible means, Err bitreich.org 70
i+then you must either (1) cause the Corresponding Source to be so Err bitreich.org 70
i+available, or (2) arrange to deprive yourself of the benefit of the Err bitreich.org 70
i+patent license for this particular work, or (3) arrange, in a manner Err bitreich.org 70
i+consistent with the requirements of this License, to extend the patent Err bitreich.org 70
i+license to downstream recipients. "Knowingly relying" means you have Err bitreich.org 70
i+actual knowledge that, but for the patent license, your conveying the Err bitreich.org 70
i+covered work in a country, or your recipient's use of the covered work Err bitreich.org 70
i+in a country, would infringe one or more identifiable patents in that Err bitreich.org 70
i+country that you have reason to believe are valid. Err bitreich.org 70
i+ Err bitreich.org 70
i+ If, pursuant to or in connection with a single transaction or Err bitreich.org 70
i+arrangement, you convey, or propagate by procuring conveyance of, a Err bitreich.org 70
i+covered work, and grant a patent license to some of the parties Err bitreich.org 70
i+receiving the covered work authorizing them to use, propagate, modify Err bitreich.org 70
i+or convey a specific copy of the covered work, then the patent license Err bitreich.org 70
i+you grant is automatically extended to all recipients of the covered Err bitreich.org 70
i+work and works based on it. Err bitreich.org 70
i+ Err bitreich.org 70
i+ A patent license is "discriminatory" if it does not include within Err bitreich.org 70
i+the scope of its coverage, prohibits the exercise of, or is Err bitreich.org 70
i+conditioned on the non-exercise of one or more of the rights that are Err bitreich.org 70
i+specifically granted under this License. You may not convey a covered Err bitreich.org 70
i+work if you are a party to an arrangement with a third party that is Err bitreich.org 70
i+in the business of distributing software, under which you make payment Err bitreich.org 70
i+to the third party based on the extent of your activity of conveying Err bitreich.org 70
i+the work, and under which the third party grants, to any of the Err bitreich.org 70
i+parties who would receive the covered work from you, a discriminatory Err bitreich.org 70
i+patent license (a) in connection with copies of the covered work Err bitreich.org 70
i+conveyed by you (or copies made from those copies), or (b) primarily Err bitreich.org 70
i+for and in connection with specific products or compilations that Err bitreich.org 70
i+contain the covered work, unless you entered into that arrangement, Err bitreich.org 70
i+or that patent license was granted, prior to 28 March 2007. Err bitreich.org 70
i+ Err bitreich.org 70
i+ Nothing in this License shall be construed as excluding or limiting Err bitreich.org 70
i+any implied license or other defenses to infringement that may Err bitreich.org 70
i+otherwise be available to you under applicable patent law. Err bitreich.org 70
i+ Err bitreich.org 70
i+ 12. No Surrender of Others' Freedom. Err bitreich.org 70
i+ Err bitreich.org 70
i+ If conditions are imposed on you (whether by court order, agreement or Err bitreich.org 70
i+otherwise) that contradict the conditions of this License, they do not Err bitreich.org 70
i+excuse you from the conditions of this License. If you cannot convey a Err bitreich.org 70
i+covered work so as to satisfy simultaneously your obligations under this Err bitreich.org 70
i+License and any other pertinent obligations, then as a consequence you may Err bitreich.org 70
i+not convey it at all. For example, if you agree to terms that obligate you Err bitreich.org 70
i+to collect a royalty for further conveying from those to whom you convey Err bitreich.org 70
i+the Program, the only way you could satisfy both those terms and this Err bitreich.org 70
i+License would be to refrain entirely from conveying the Program. Err bitreich.org 70
i+ Err bitreich.org 70
i+ 13. Use with the GNU Affero General Public License. Err bitreich.org 70
i+ Err bitreich.org 70
i+ Notwithstanding any other provision of this License, you have Err bitreich.org 70
i+permission to link or combine any covered work with a work licensed Err bitreich.org 70
i+under version 3 of the GNU Affero General Public License into a single Err bitreich.org 70
i+combined work, and to convey the resulting work. The terms of this Err bitreich.org 70
i+License will continue to apply to the part which is the covered work, Err bitreich.org 70
i+but the special requirements of the GNU Affero General Public License, Err bitreich.org 70
i+section 13, concerning interaction through a network will apply to the Err bitreich.org 70
i+combination as such. Err bitreich.org 70
i+ Err bitreich.org 70
i+ 14. Revised Versions of this License. Err bitreich.org 70
i+ Err bitreich.org 70
i+ The Free Software Foundation may publish revised and/or new versions of Err bitreich.org 70
i+the GNU General Public License from time to time. Such new versions will Err bitreich.org 70
i+be similar in spirit to the present version, but may differ in detail to Err bitreich.org 70
i+address new problems or concerns. Err bitreich.org 70
i+ Err bitreich.org 70
i+ Each version is given a distinguishing version number. If the Err bitreich.org 70
i+Program specifies that a certain numbered version of the GNU General Err bitreich.org 70
i+Public License "or any later version" applies to it, you have the Err bitreich.org 70
i+option of following the terms and conditions either of that numbered Err bitreich.org 70
i+version or of any later version published by the Free Software Err bitreich.org 70
i+Foundation. If the Program does not specify a version number of the Err bitreich.org 70
i+GNU General Public License, you may choose any version ever published Err bitreich.org 70
i+by the Free Software Foundation. Err bitreich.org 70
i+ Err bitreich.org 70
i+ If the Program specifies that a proxy can decide which future Err bitreich.org 70
i+versions of the GNU General Public License can be used, that proxy's Err bitreich.org 70
i+public statement of acceptance of a version permanently authorizes you Err bitreich.org 70
i+to choose that version for the Program. Err bitreich.org 70
i+ Err bitreich.org 70
i+ Later license versions may give you additional or different Err bitreich.org 70
i+permissions. However, no additional obligations are imposed on any Err bitreich.org 70
i+author or copyright holder as a result of your choosing to follow a Err bitreich.org 70
i+later version. Err bitreich.org 70
i+ Err bitreich.org 70
i+ 15. Disclaimer of Warranty. Err bitreich.org 70
i+ Err bitreich.org 70
i+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY Err bitreich.org 70
i+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT Err bitreich.org 70
i+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY Err bitreich.org 70
i+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, Err bitreich.org 70
i+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR Err bitreich.org 70
i+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM Err bitreich.org 70
i+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF Err bitreich.org 70
i+ALL NECESSARY SERVICING, REPAIR OR CORRECTION. Err bitreich.org 70
i+ Err bitreich.org 70
i+ 16. Limitation of Liability. Err bitreich.org 70
i+ Err bitreich.org 70
i+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING Err bitreich.org 70
i+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS Err bitreich.org 70
i+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY Err bitreich.org 70
i+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE Err bitreich.org 70
i+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF Err bitreich.org 70
i+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD Err bitreich.org 70
i+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), Err bitreich.org 70
i+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF Err bitreich.org 70
i+SUCH DAMAGES. Err bitreich.org 70
i+ Err bitreich.org 70
i+ 17. Interpretation of Sections 15 and 16. Err bitreich.org 70
i+ Err bitreich.org 70
i+ If the disclaimer of warranty and limitation of liability provided Err bitreich.org 70
i+above cannot be given local legal effect according to their terms, Err bitreich.org 70
i+reviewing courts shall apply local law that most closely approximates Err bitreich.org 70
i+an absolute waiver of all civil liability in connection with the Err bitreich.org 70
i+Program, unless a warranty or assumption of liability accompanies a Err bitreich.org 70
i+copy of the Program in return for a fee. Err bitreich.org 70
i+ Err bitreich.org 70
i+ END OF TERMS AND CONDITIONS Err bitreich.org 70
i+ Err bitreich.org 70
i+ How to Apply These Terms to Your New Programs Err bitreich.org 70
i+ Err bitreich.org 70
i+ If you develop a new program, and you want it to be of the greatest Err bitreich.org 70
i+possible use to the public, the best way to achieve this is to make it Err bitreich.org 70
i+free software which everyone can redistribute and change under these terms. Err bitreich.org 70
i+ Err bitreich.org 70
i+ To do so, attach the following notices to the program. It is safest Err bitreich.org 70
i+to attach them to the start of each source file to most effectively Err bitreich.org 70
i+state the exclusion of warranty; and each file should have at least Err bitreich.org 70
i+the "copyright" line and a pointer to where the full notice is found. Err bitreich.org 70
i+ Err bitreich.org 70
i+ Err bitreich.org 70
i+ Copyright (C) Err bitreich.org 70
i+ Err bitreich.org 70
i+ This program is free software: you can redistribute it and/or modify Err bitreich.org 70
i+ it under the terms of the GNU General Public License as published by Err bitreich.org 70
i+ the Free Software Foundation, either version 3 of the License, or Err bitreich.org 70
i+ (at your option) any later version. Err bitreich.org 70
i+ Err bitreich.org 70
i+ This program is distributed in the hope that it will be useful, Err bitreich.org 70
i+ but WITHOUT ANY WARRANTY; without even the implied warranty of Err bitreich.org 70
i+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Err bitreich.org 70
i+ GNU General Public License for more details. Err bitreich.org 70
i+ Err bitreich.org 70
i+ You should have received a copy of the GNU General Public License Err bitreich.org 70
i+ along with this program. If not, see . Err bitreich.org 70
i+ Err bitreich.org 70
i+Also add information on how to contact you by electronic and paper mail. Err bitreich.org 70
i+ Err bitreich.org 70
i+ If the program does terminal interaction, make it output a short Err bitreich.org 70
i+notice like this when it starts in an interactive mode: Err bitreich.org 70
i+ Err bitreich.org 70
i+ Copyright (C) Err bitreich.org 70
i+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. Err bitreich.org 70
i+ This is free software, and you are welcome to redistribute it Err bitreich.org 70
i+ under certain conditions; type `show c' for details. Err bitreich.org 70
i+ Err bitreich.org 70
i+The hypothetical commands `show w' and `show c' should show the appropriate Err bitreich.org 70
i+parts of the General Public License. Of course, your program's commands Err bitreich.org 70
i+might be different; for a GUI interface, you would use an "about box". Err bitreich.org 70
i+ Err bitreich.org 70
i+ You should also get your employer (if you work as a programmer) or school, Err bitreich.org 70
i+if any, to sign a "copyright disclaimer" for the program, if necessary. Err bitreich.org 70
i+For more information on this, and how to apply and follow the GNU GPL, see Err bitreich.org 70
i+. Err bitreich.org 70
i+ Err bitreich.org 70
i+ The GNU General Public License does not permit incorporating your program Err bitreich.org 70
i+into proprietary programs. If your program is a subroutine library, you Err bitreich.org 70
i+may consider it more useful to permit linking proprietary applications with Err bitreich.org 70
i+the library. If this is what you want to do, use the GNU Lesser General Err bitreich.org 70
i+Public License instead of this License. But first, please read Err bitreich.org 70
i+. Err bitreich.org 70
1diff --git a/gen-80x25-crossword b/gen-80x25-crossword /scm/crossword-generator/file/gen-80x25-crossword.gph bitreich.org 70
i@@ -0,0 +1,245 @@ Err bitreich.org 70
i+#!/usr/bin/env python Err bitreich.org 70
i+# coding=utf-8 Err bitreich.org 70
i+# Err bitreich.org 70
i+# © 2023 Christoph Lohmann <20h@r-36.net> Err bitreich.org 70
i+# Err bitreich.org 70
i+# This file is published under the terms of the GPLv3. Err bitreich.org 70
i+# Err bitreich.org 70
i+ Err bitreich.org 70
i+import os Err bitreich.org 70
i+import sys Err bitreich.org 70
i+import getopt Err bitreich.org 70
i+import random Err bitreich.org 70
i+ Err bitreich.org 70
i+def print_field(field): Err bitreich.org 70
i+ for line in field: Err bitreich.org 70
i+ for cell in line: Err bitreich.org 70
i+ print("%s" % (cell), end="") Err bitreich.org 70
i+ print("") Err bitreich.org 70
i+ Err bitreich.org 70
i+def usage(app): Err bitreich.org 70
i+ app = os.path.basename(app) Err bitreich.org 70
i+ print("usage: %s [-h] file.txt" % (app), file=sys.stderr) Err bitreich.org 70
i+ sys.exit(1) Err bitreich.org 70
i+ Err bitreich.org 70
i+def main(args): Err bitreich.org 70
i+ try: Err bitreich.org 70
i+ opts, largs = getopt.getopt(args[1:], "h") Err bitreich.org 70
i+ except getopt.GetoptError as err: Err bitreich.org 70
i+ print(str(err)) Err bitreich.org 70
i+ usage(args[0]) Err bitreich.org 70
i+ Err bitreich.org 70
i+ for o, a in opts: Err bitreich.org 70
i+ if o == "-h": Err bitreich.org 70
i+ usage(args[0]) Err bitreich.org 70
i+ else: Err bitreich.org 70
i+ assert False, "unhandled option" Err bitreich.org 70
i+ Err bitreich.org 70
i+ if len(largs) < 1: Err bitreich.org 70
i+ usage(args[0]) Err bitreich.org 70
i+ crossfile = largs[0] Err bitreich.org 70
i+ entries = {} Err bitreich.org 70
i+ Err bitreich.org 70
i+ with open(crossfile) as fd: Err bitreich.org 70
i+ for line in fd: Err bitreich.org 70
i+ line = line.strip() Err bitreich.org 70
i+ if len(line) == 0: Err bitreich.org 70
i+ continue Err bitreich.org 70
i+ if line[0] == "#": Err bitreich.org 70
i+ continue Err bitreich.org 70
i+ try: Err bitreich.org 70
i+ (word, hint) = line.split(" ", 1) Err bitreich.org 70
i+ except ValueError: Err bitreich.org 70
i+ continue Err bitreich.org 70
i+ entries[word] = hint Err bitreich.org 70
i+ if entries == {}: Err bitreich.org 70
i+ usage(args[0]) Err bitreich.org 70
i+ #print(entries) Err bitreich.org 70
i+ Err bitreich.org 70
i+ def check_word(field, x, y, word, vertical): Err bitreich.org 70
i+ #print("check_word(field, %s, %s, %s, %s)" % \ Err bitreich.org 70
i+ # (x, y, word, vertical)) Err bitreich.org 70
i+ if y < 1 or x < 1: Err bitreich.org 70
i+ return False Err bitreich.org 70
i+ for c in word: Err bitreich.org 70
i+ #print("check '%s' vs '%s' at (%s,%s)" % \ Err bitreich.org 70
i+ # (field[y][x], c, x, y)) Err bitreich.org 70
i+ if y > 24: Err bitreich.org 70
i+ return False Err bitreich.org 70
i+ if x > 79: Err bitreich.org 70
i+ return False Err bitreich.org 70
i+ if field[y][x] == '#': Err bitreich.org 70
i+ return False Err bitreich.org 70
i+ if field[y][x] != c and field[y][x] != '.': Err bitreich.org 70
i+ return False Err bitreich.org 70
i+ if vertical: Err bitreich.org 70
i+ y += 1 Err bitreich.org 70
i+ else: Err bitreich.org 70
i+ x += 1 Err bitreich.org 70
i+ return True Err bitreich.org 70
i+ Err bitreich.org 70
i+ def add_word(field, x, y, word, vertical): Err bitreich.org 70
i+ #print("add_word %s %s %s %s %s" % (x, y, word, len(word), Err bitreich.org 70
i+ # vertical)) Err bitreich.org 70
i+ for c in word: Err bitreich.org 70
i+ try: Err bitreich.org 70
i+ field[y][x] = c Err bitreich.org 70
i+ except IndexError: Err bitreich.org 70
i+ print("x = %s, y = %s" % (x, y)) Err bitreich.org 70
i+ sys.exit(1) Err bitreich.org 70
i+ if c not in char2pos: Err bitreich.org 70
i+ char2pos[c] = [] Err bitreich.org 70
i+ char2pos[c] += [[x, y, vertical]] Err bitreich.org 70
i+ if vertical: Err bitreich.org 70
i+ y += 1 Err bitreich.org 70
i+ else: Err bitreich.org 70
i+ x += 1 Err bitreich.org 70
i+ Err bitreich.org 70
i+ def replace_word(field, x, y, word, vertical, c): Err bitreich.org 70
i+ #print("replace_word %s %s %s %s %s %s" % (x, y, word, len(word), Err bitreich.org 70
i+ # vertical, c)) Err bitreich.org 70
i+ for b in word: Err bitreich.org 70
i+ try: Err bitreich.org 70
i+ if c == "=": Err bitreich.org 70
i+ field[y][x] = c Err bitreich.org 70
i+ elif field[y][x] != "=": Err bitreich.org 70
i+ field[y][x] = "X" Err bitreich.org 70
i+ else: Err bitreich.org 70
i+ field[y][x] = c Err bitreich.org 70
i+ except IndexError: Err bitreich.org 70
i+ print("x = %s, y = %s" % (x, y)) Err bitreich.org 70
i+ sys.exit(1) Err bitreich.org 70
i+ if vertical: Err bitreich.org 70
i+ y += 1 Err bitreich.org 70
i+ else: Err bitreich.org 70
i+ x += 1 Err bitreich.org 70
i+ Err bitreich.org 70
i+ def print_description(field, x, y, description): Err bitreich.org 70
i+ for c in description: Err bitreich.org 70
i+ try: Err bitreich.org 70
i+ field[y][x] = c Err bitreich.org 70
i+ except IndexError: Err bitreich.org 70
i+ print("x = %s, y = %s" % (x, y)) Err bitreich.org 70
i+ sys.exit(1) Err bitreich.org 70
i+ x += 1 Err bitreich.org 70
i+ if x > 78: Err bitreich.org 70
i+ break Err bitreich.org 70
i+ Err bitreich.org 70
i+ maxtries = 10 Err bitreich.org 70
i+ tries = 0 Err bitreich.org 70
i+ entriesbackup = entries.copy() Err bitreich.org 70
i+ while tries < maxtries: Err bitreich.org 70
i+ # 80x25 for term output. Err bitreich.org 70
i+ field = [] Err bitreich.org 70
i+ field.append(["#"]*80) Err bitreich.org 70
i+ for i in range(1, 24): Err bitreich.org 70
i+ field.append(["#"] + ["."]*78 + ["#"]) Err bitreich.org 70
i+ field.append(["#"]*80) Err bitreich.org 70
i+ char2pos = {} Err bitreich.org 70
i+ Err bitreich.org 70
i+ field.append(["#"]*80) Err bitreich.org 70
i+ for i in range(1, 24): Err bitreich.org 70
i+ field.append(["#"] + ["."]*78 + ["#"]) Err bitreich.org 70
i+ field.append(["#"]*80) Err bitreich.org 70
i+ Err bitreich.org 70
i+ entries = entriesbackup.copy() Err bitreich.org 70
i+ print_description(field, 45, 3, "A funny crossword from man pages.") Err bitreich.org 70
i+ print_description(field, 47, 5, "Have fun solving it!") Err bitreich.org 70
i+ print_description(field, 42, 7, "[a-z0-9] -> find the manpage") Err bitreich.org 70
i+ print_description(field, 49, 8, "X -> crossover of names") Err bitreich.org 70
i+ print_description(field, 30, 10, "= manpage description (hint: grep it)") Err bitreich.org 70
i+ outputentries = {} Err bitreich.org 70
i+ markerstr = "abcdefghijklmnopqrstuvwxyz0123456789" Err bitreich.org 70
i+ ypos = 11 Err bitreich.org 70
i+ xpos = 30 Err bitreich.org 70
i+ markeri = 0 Err bitreich.org 70
i+ for entry in entries.keys(): Err bitreich.org 70
i+ entries[entry] = [entries[entry], markerstr[markeri]] Err bitreich.org 70
i+ if ypos == 24: Err bitreich.org 70
i+ xpos = 2 Err bitreich.org 70
i+ ypos += 2 Err bitreich.org 70
i+ if ypos < len(field) - 1: Err bitreich.org 70
i+ print_description(field, xpos, ypos, \ Err bitreich.org 70
i+ "%s %s" % (entries[entry][1], \ Err bitreich.org 70
i+ entries[entry][0])) Err bitreich.org 70
i+ ypos += 1 Err bitreich.org 70
i+ markeri += 1 Err bitreich.org 70
i+ Err bitreich.org 70
i+ entry = random.choice(list(entries.keys())) Err bitreich.org 70
i+ vertical = random.choice([True, False]) Err bitreich.org 70
i+ x = 5 Err bitreich.org 70
i+ y = 12 Err bitreich.org 70
i+ #x = random.randint(0 + 5, 5 + 20 - len(entry) * int(not vertical)) Err bitreich.org 70
i+ #y = random.randint(0 + 5, 5 + 10 - len(entry) * int(vertical)) Err bitreich.org 70
i+ add_word(field, x, y, entry, vertical) Err bitreich.org 70
i+ del entries[entry] Err bitreich.org 70
i+ Err bitreich.org 70
i+ tryouts = [] Err bitreich.org 70
i+ while len(entries.keys()) > 0: Err bitreich.org 70
i+ ex = 0 Err bitreich.org 70
i+ ey = 0 Err bitreich.org 70
i+ vertical = True Err bitreich.org 70
i+ entryfound = False Err bitreich.org 70
i+ entry = random.choice(list(entries.keys())) Err bitreich.org 70
i+ #print("Trying %s ..." % (entry), end="") Err bitreich.org 70
i+ if entry in tryouts: Err bitreich.org 70
i+ #print("") Err bitreich.org 70
i+ break Err bitreich.org 70
i+ Err bitreich.org 70
i+ sentry = "".join(random.sample(entry, len(entry))) Err bitreich.org 70
i+ for c in sentry: Err bitreich.org 70
i+ if c not in char2pos: Err bitreich.org 70
i+ continue Err bitreich.org 70
i+ (beg, remain) = entry.split(c, 1) Err bitreich.org 70
i+ randpos = random.sample(char2pos[c], len(char2pos[c])) Err bitreich.org 70
i+ for pos in randpos: Err bitreich.org 70
i+ vertical = not pos[2] Err bitreich.org 70
i+ ex = pos[0] - len(beg) * int(not vertical) Err bitreich.org 70
i+ ey = pos[1] - len(beg) * int(vertical) Err bitreich.org 70
i+ if check_word(field, ex, ey, entry, vertical) == True: Err bitreich.org 70
i+ #print(" entryfound", end="") Err bitreich.org 70
i+ entryfound = True Err bitreich.org 70
i+ break Err bitreich.org 70
i+ if entryfound == True: Err bitreich.org 70
i+ break Err bitreich.org 70
i+ #print("") Err bitreich.org 70
i+ if entryfound == True: Err bitreich.org 70
i+ add_word(field, ex, ey, entry, vertical) Err bitreich.org 70
i+ outputentries[entry] = \ Err bitreich.org 70
i+ [entries[entry][0], \ Err bitreich.org 70
i+ entries[entry][1], \ Err bitreich.org 70
i+ ex, ey, vertical] Err bitreich.org 70
i+ del entries[entry] Err bitreich.org 70
i+ else: Err bitreich.org 70
i+ tryouts.append(entry) Err bitreich.org 70
i+ if len(entries) == 0: Err bitreich.org 70
i+ for entry in outputentries.keys(): Err bitreich.org 70
i+ replace_word(field, \ Err bitreich.org 70
i+ outputentries[entry][2], \ Err bitreich.org 70
i+ outputentries[entry][3], \ Err bitreich.org 70
i+ entry, \ Err bitreich.org 70
i+ outputentries[entry][4], \ Err bitreich.org 70
i+ "=") Err bitreich.org 70
i+ Err bitreich.org 70
i+ for entry in outputentries.keys(): Err bitreich.org 70
i+ replace_word(field, \ Err bitreich.org 70
i+ outputentries[entry][2], \ Err bitreich.org 70
i+ outputentries[entry][3], \ Err bitreich.org 70
i+ entry, \ Err bitreich.org 70
i+ outputentries[entry][4], \ Err bitreich.org 70
i+ outputentries[entry][1]) Err bitreich.org 70
i+ break Err bitreich.org 70
i+ tries += 1 Err bitreich.org 70
i+ Err bitreich.org 70
i+ if tries >= maxtries: Err bitreich.org 70
i+ sys.stderr.write("Crossword not possible.\n") Err bitreich.org 70
i+ #print(char2pos) Err bitreich.org 70
i+ print_field(field) Err bitreich.org 70
i+ return 1 Err bitreich.org 70
i+ Err bitreich.org 70
i+ print_field(field) Err bitreich.org 70
i+ return 0 Err bitreich.org 70
i+ Err bitreich.org 70
i+if __name__ == "__main__": Err bitreich.org 70
i+ sys.exit(main(sys.argv)) Err bitreich.org 70
i+ Err bitreich.org 70
1diff --git a/get_apropos_entries.sh b/get_apropos_entries.sh /scm/crossword-generator/file/get_apropos_entries.sh.gph bitreich.org 70
i@@ -0,0 +1,22 @@ Err bitreich.org 70
i+#!/bin/sh Err bitreich.org 70
i+ Err bitreich.org 70
i+if [ $# -gt 1 ]; Err bitreich.org 70
i+then Err bitreich.org 70
i+ randomchar="$1" Err bitreich.org 70
i+else Err bitreich.org 70
i+ chars="abcdefghijklmnopqrstuvwxyz" Err bitreich.org 70
i+ randomchar="$(printf "%s\n" "${chars}" \ Err bitreich.org 70
i+ | sed 's,\(.\),\1\n,g' \ Err bitreich.org 70
i+ | shuf -n 1)" Err bitreich.org 70
i+fi Err bitreich.org 70
i+ Err bitreich.org 70
i+# One char should be the same. This makes sure we have some connection Err bitreich.org 70
i+# point for the crossword. Err bitreich.org 70
i+apropos -l "$randomchar" \ Err bitreich.org 70
i+ | grep '(3)' \ Err bitreich.org 70
i+ | grep "^.\{3,10\} " \ Err bitreich.org 70
i+ | grep -v _ \ Err bitreich.org 70
i+ | shuf -n 36 \ Err bitreich.org 70
i+ | sed 's,^\([^ ]*\) (3).* - \(.*\)$,\1 \2,' \ Err bitreich.org 70
i+ | tr '[:upper:]' '[:lower:]' Err bitreich.org 70
i+ Err bitreich.org 70
.