Git Product home page Git Product logo

shit-happens's People

Contributors

siemdejong avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

krixby87 matdriks

shit-happens's Issues

Command line arguments are unclear

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

Implement internationalization/localization

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.

Add bleed to the cards

Currently, the cards have sizes 62x88 mm (standard poker cards), but when cutting the cards to shape, a bleed with cutting marks is necessary.

Add a bleed of 5 mm with crop marks.

image

create standalone

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.

Speed up card plotting

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?

Move to CMYK

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.

Managing fonts is ugly

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?

After sorting, situations can have the same score

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?

Move from argparse to click

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

Efficient sorting

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:

  1. In every score group r1 is paired with r2 and r3 with r4, etc. (10s per comparison, effectively 5s per card.)
  2. Winners get one point, losers none.
  3. Recalculate score groups. Rank determined by score and previous rank as tiebreaker.
  4. Repeat N times (in total 5xNs per card)
    The complete procedure takes approx. 1 minute per card for N=9. Tiebreaker: sum of all opponent's scores (Bucholz chess rating)

Rules:

  • no rematches.

Additional context
https://en.wikipedia.org/wiki/Swiss-system_tournament

Relative imports only fetch from a locally pip installed version

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:

  1. pip uninstall shithappens
  2. python src/shithappens/create_cards.py examples/example -r
  3. See error

Expected behavior
No ModuleNotFoundError given.

Additional context
Is a possible solution to use importlib.resources?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.