Giter Club home page Giter Club logo

cardbleed's People

Contributors

jrsmith3 avatar

Watchers

 avatar  avatar

cardbleed's Issues

Add command line functionality to strip single row of pixels off specified edge

Overview

I am seeing a single strip of white pixels at the border between the original card image and its bleed. For example, a PDF containing this image:

skids

Ends up looking like (white strip of pixels annotated):

skids

Deliverables

Add a --strip argument to the cli. This argument can be called zero or more times. Each time it is called, it takes one of the following values: "top", "bottom", "left", "right". The presence of this argument will result in a single row of pixels removed from each image of the PDF on the side corresponding to the value of the argument. For example, --strip=right will remove the rightmost row of pixels from the image before adding the bleed. This --strip=right example would fix the problem depicted in the images above. Calling the --strip argument multiple times with the same value is equivalent to calling it once with that value.

References

Images taken from Fantasy Flight Games.

Add CHANGELOG to project

Overview

I should add a CHANGELOG file to this project to keep track of which tickets correspond to which releases.

Create command line interface

Overview

This project needs an interface that isn't an interactive python shell.

Deliverable

Write argparse code that will create the following command-line interface:

python cardbleed --width=WIDTH --height=HEIGHT \
    --bleed_width=BLEED_WIDTH --bleed_height=BLEED_HEIGHT \
    --crop_strategy=STRATEGY FILENAME.PDF OUTPUT_DIRECTORY

Where WIDTH and HEIGHT are the width and height, respectively, of the card as it appears in the image. BLEED_WIDTH and BLEED_HEIGHT is the overall width and height, respectively, of the card including the bleed. CROP_STRATEGY is "smaller" or "larger". FILENAME.PDF is the input file, and OUTPUT_DIRECTORY is the location to which the front and back card images are to be written.

Add logging

Overview

The application does not produce any output during operation, so it may not be clear to the user if it is working.

Deliverables

  1. Print the name of the image file (the one with the bleed added) being written.
  2. Add a -q, --quiet command line argument to suppress all output.

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.