siemdejong / shit-happens Goto Github PK
View Code? Open in Web Editor NEWCreate your own Shit Happens playing cards!
License: GNU General Public License v3.0
Create your own Shit Happens playing cards!
License: GNU General Public License v3.0
Some text like the misery descriptions are placed with weird bounding boxes. Possibly has the same fix as for #19
it should show usage: shithappens
not usage: create_cards.py
.
Is your feature request related to a problem? Please describe.
There are many different arguments available. Also, if -r/--rank is set, some other arguments are ignored.
Describe alternatives you've considered
Does it make sense to use subcommands? sort
and create
for sorting and creating the cards
Misery index is English. If it is desired to make cards in another language, it could be done with a command line option, like
python create_cards.py -l nl
for Dutch (nl).
Can be implemented with the std library gettext
.
and default to .
The images plotted on the back are required. Make them optional in case user forgets them as input.
Currently, the package can be installed using pip, but it would be even nicer to freeze the package to use is a standalone script, packaged with all the dependencies.
and not in percentages respective to the full figure (which includes bleeds).
Plotting the cards and exporting them to pdfs takes a long time. Every card is independent, is it possible to make them concurrently, using multiple cores or threads?
Is your feature request related to a problem? Please describe.
A black background will not be printed as black. The printing company suggest a very specific CMYK color for black. PIL allows for drawing images in CMYK mode, and thus specifying specific colors.
Describe the solution you'd like
A move to another library like PIL that can draw cards in CMYK mode, choosing specific CMYK colors for use with printing. Ideally with a CLI switch to turn CMYK color off/on.
Describe alternatives you've considered
PIL.Image.new() has a mode
parameter that accepts cmyk. All colors can be specified with a cmyk tuple of four numbers.
Additional context
For larger areas with black, the CMYK color designer black (C70 M50 Y30 K100) is recommended by printenbind.nl.
The current way of managing fonts is ugly, it requires a new fm.FontProperties
for everything that needs another weight of the Open Sans font. Is there a way to only specify one family (Open Sans) and use local files to find the font files?
Setuptools does not install the Open Sans font (which is necessary to get reproducible output) to the matplotlib font library.
Can possibly be done using https://stackoverflow.com/questions/34193900/how-do-i-distribute-fonts-with-my-python-package
Is your feature request related to a problem? Please describe.
After sorting, situations can have the same score
Describe the solution you'd like
After sorting, situations all have different scores. Ideally, within a short amount of time.
Describe alternatives you've considered
Is Elo rating a good way to achieve this?
Is your feature request related to a problem? Please describe.
Sorting the cards can be done with the command line, which is accessed by the sorting flag.
All other settings still need to be set, but will be disregarded.
Describe the solution you'd like
Using a cli where I do not need to set settings which will not be used anyway, because I want to sort the cards, not create them.
Describe alternatives you've considered
It is easier to separate sorting from creating cards with argparse
subcommands.
This will make usage more straightforward.
Additional context
argparse.add_subparsers
Is your feature request related to a problem? Please describe.
With 200 cards, sorting becomes a very labour intensive with the currently implemented round-robin format. 100 comparisons need to be made to only divide the set in 2...
Describe the solution you'd like
An acceptable solution would be where sorting takes 1 minute per card maximum, but possibly quicker. Simple insertion sort would take about 1 minute.
Describe alternatives you've considered
Preseed:
Categorize every situation into 9 score groups. Random seed for situations per score group. (10s per card)
Monrad Swiss system:
Rules:
Additional context
https://en.wikipedia.org/wiki/Swiss-system_tournament
Describe the bug
import shithappens.sort_situations
imports from a pip installed version, but during development, it is useful to let it do relative imports from a local tree.
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\siemd\mambaforge\envs\shithappens\Scripts\shithappens.exe\__main__.py", line 7, in <module>
File "C:\Users\siemd\mambaforge\envs\shithappens\Lib\site-packages\shithappens\create_cards.py", line 648, in main_cli
main()
File "C:\Users\siemd\mambaforge\envs\shithappens\Lib\site-packages\shithappens\create_cards.py", line 604, in main
from sort_situations import sort
ModuleNotFoundError: No module named 'sort_situations'
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No ModuleNotFoundError
given.
Additional context
Is a possible solution to use importlib.resources
?
The original card game has images at the front. Currently, images are not placed on the front of the card.
https://matplotlib.org/stable/api/backend_pgf_api.html#matplotlib.backends.backend_pgf.PdfPages
This may drop the pypdf2 dependency
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.