cmdpxl: a totally practical command-line image editor

Overview

cmdpxl: a totally practical command-line image editor

ezgif com-gif-maker (2)

Features

cmdpxl has many exciting functionalities, including

  • Editing pixels one at a time!
  • Saving images!
  • An undo function!
  • A fill tool!
  • Cool image filters!

Installation

Install the package with:

pip install cmdpxl

Usage

Run with cmdpxl.

You can also specify the file path and resolution: for example, to create a new image that is 20px wide and 10px tall you can use

cmdpxl -f new_image.png -res 20,10

To get the full list of options:

$ cmdpxl --help
Usage: main.py [OPTIONS]

Options:
  -f, --filepath PATH      Path for the file you want to open
  -res, --resolution TEXT  Image height and width separated by a comma, e.g.
                           20,10 for a 20x10 image. Note that no spaces can be
                           used.
  --help                   Show this message and exit.

Why?

Good question.

Comments
  • Broken on Ubuntu

    Broken on Ubuntu

    I tried loading this on Ubuntu 20.04 and get the following result in my terminal. I tried with gnome-terminal and kitty terminal and both had similar results. Not sure if there's something I can do to debug.

    The flashes and partial menu showing is from when I push enter on my keyboard.

    cmdpxl

    opened by rothgar 5
  • Cli, split code, refactoring/reformatting

    Cli, split code, refactoring/reformatting

    Not sure you'll want to merge it since it's a huge PR, but here's what I did:

    • Put the code in a separate folder in preparation to create setup.py later and turn it into a PyPI package.
    • I put getch, clear, hide_cursor and show_cursor in a separate file called cmdpxl_terminal_io to clear up main.py.
    • Made the file cmdpxl_datatypes with the classes Color and Pos. In main.py, every list of 3 ints you were using to refer to rgb values is now a Color object, making the code easier to understand and document. Every reference to an index like color[0] are now color.r, color.g or color.b, also improving readability. Same thing was done to positions with Pos.
    • Added type hints to most functions.
    • Code was reformatted using black to improve readability.
    • Added cli support using click, which is simpler and easier to understand than argv.
    opened by douglascdev 3
  • Update main.py

    Update main.py

    added --clean flag to have the screen refresh on every input: it makes it a bit flashy, but (at least on my linux terminal), it's the only way not to have a partially drawn image on the right of the screen.

    also now it uses the getch module because yes

    opened by umanochiocciola 2
  • Installable project package

    Installable project package

    PyPI package is pretty much ready :)

    • Added Github's default Python gitignores to avoid including files generated by setup and other cache files in VCS
    • Renamed datatypes and terminal_io to remove package name from file names(both are now imported in __init__.py and can be referenced as cmdpxl.module in code).
    • Project package setup almost ready(missing your email)
    • Described new installation and usage process in Readme(referencing my branch for now)

    Still to do before publication:

    • Add your email to author_email in setup.py.
    • Change install command in the Readme to reference the PyPI package name instead of my git branch.
    • Check if anything else is missing, merge to main branch and publish package.
    opened by douglascdev 1
  • Made cmdpxl as package and renamed to pixely

    Made cmdpxl as package and renamed to pixely

    • Refactor of code and uses class and some methods are isolated in different files.
    • CLI more modular, not inside the code itself, only need to be adapted from the Application class.
    • Renamed to pixely, this can be changed as original
    opened by pomaretta 1
  • Add requirements.txt for slightly more standardized installation, updated README for it, and added .gitignore for venv users.

    Add requirements.txt for slightly more standardized installation, updated README for it, and added .gitignore for venv users.

    Hi there, saw your project on Reddit. This is a pretty nice! I've been looking for a nice open-source pixel art editor, so I'm happy I came across something like this.

    This PR contains three changes:

    • A requirements.txt for more standardized setup. What is typical in projects (if they are not pip-installable) is that the dependencies for a project are listed in a requirements.txt file, which is then used by running pip3 install -r requirements.txt.
    • The README has been updated for the above point.
    • A .gitignore has been added for users who use Python virtual environments. I typically use this so that I can have more reproducible environments when I collaborate on projects. You can see what GitHub officially posts as a Python gitignore, but this is overkill IMO.

    Let me know if you want to make any changes, or if some of these changes are unnecessary. I'll drop the corresponding commits and force-push to this branch.

    By the way, I'm running this on Ubuntu 20.04.

    opened by sahansk2 0
  • Add AUR instructions

    Add AUR instructions

    I've created a package for cmdpxl in the Arch User Repository. https://aur.archlinux.org/packages/cmdpxl-git/

    This pull request adds the necessary command to the readme for installing cmdpxl-git from the AUR as an alternative to using pip.

    opened by nrobinson2000 0
Owner
Jieruei Chang
H. sapiens on third planet of Sol
Jieruei Chang
A cd command that learns - easily navigate directories from the command line

NAME autojump - a faster way to navigate your filesystem DESCRIPTION autojump is a faster way to navigate your filesystem. It works by maintaining a d

William Ting 14.5k Jan 3, 2023
AML Command Transfer. A lightweight tool to transfer any command line to Azure Machine Learning Services

AML Command Transfer (ACT) ACT is a lightweight tool to transfer any command from the local machine to AML or ITP, both of which are Azure Machine Lea

Microsoft 11 Aug 10, 2022
Ros command - Unifying the ROS command line tools

Unifying the ROS command line tools One impairment to ROS 2 adoption is that all

null 37 Dec 15, 2022
Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network)

Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network)

Phil Wang 4.4k Jan 9, 2023
A command line tool to remove background from video and image

A command line tool to remove background from video and image, brought to you by BackgroundRemover.app which is an app made by nadermx powered by this tool

Johnathan Nader 1.7k Jan 1, 2023
MasterDuel Image Recognition Translation Command Line Tool

MasterDuelTranslate(Use Ygo Card DataBase,belong win32 window shot & image match)

PatchouliTC 77 Dec 1, 2022
commandpack - A package of modules for working with commands, command packages, files with command packages.

commandpack Help the project financially: Donate: https://smartlegion.github.io/donate/ Yandex Money: https://yoomoney.ru/to/4100115206129186 PayPal:

null 4 Sep 4, 2021
A Python-based command prompt concept which includes windows command emulation.

PythonCMD A Python-based command prompt concept which includes windows command emulation. Current features: echo: Input your message and it will be cl

null 1 Feb 5, 2022
Library and command-line utility for rendering projects templates.

A library for rendering project templates. Works with local paths and git URLs. Your project can include any file and Copier can dynamically replace v

null 808 Jan 4, 2023
A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.

Cookiecutter A command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from a Python

null 18.6k Dec 30, 2022
instant coding answers via the command line

howdoi instant coding answers via the command line Sherlock, your neighborhood command-line sloth sleuth. Are you a hack programmer? Do you find yours

Benjamin Gleitzman 9.8k Jan 8, 2023
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie

HTTPie: human-friendly CLI HTTP client for the API era HTTPie (pronounced aitch-tee-tee-pie) is a command-line HTTP client. Its goal is to make CLI in

HTTPie 25.4k Dec 30, 2022
A supercharged AWS command line interface (CLI).

SAWS Motivation AWS CLI Although the AWS CLI is a great resource to manage your AWS-powered services, it's tough to remember usage of: 70+ top-level c

Donne Martin 5.1k Jan 5, 2023
A command line utility to export Google Keep notes to markdown.

Keep-Exporter A command line utility to export Google Keep notes to markdown files with metadata stored as a frontmatter header. Supports exporting: S

Nathan Beals 85 Dec 17, 2022
Command-line tool for looking up colors and palettes.

Colorpedia Colorpedia is a command-line tool for looking up colors, shades and palettes. Supported color models: HEX, RGB, HSL, HSV, CMYK. Requirement

Joohwan Oh 282 Dec 27, 2022
A command line utility for tracking a stock market portfolio. Primarily featuring high resolution braille graphs.

A command line stock market / portfolio tracker originally insipred by Ericm's Stonks program, featuring unicode for incredibly high detailed graphs even in a terminal.

Conrad Selig 51 Nov 29, 2022
Get latest astronomy job and rumor news in your command line

astrojobs Tired of checking the AAS job register and astro rumor mill for job news? Get the latest updates in the command line! astrojobs automaticall

Philip Mocz 19 Jul 20, 2022
Command line interface for testing internet bandwidth using speedtest.net

speedtest-cli Command line interface for testing internet bandwidth using speedtest.net Versions speedtest-cli works with Python 2.4-3.7 Installation

Matt Martz 12.4k Jan 8, 2023