GithubHelp home page GithubHelp logo

finefindus / artem Goto Github PK

View Code? Open in Web Editor NEW
278.0 2.0 9.0 8.89 MB

Convert images from multiple formats (jpg, png, webp, etc…) to ASCII art, written in Rust

License: Mozilla Public License 2.0

Rust 36.46% HTML 62.82% Shell 0.72%
rust ascii-art ascii-graphics cli command-line-tool ascii command-line terminal

artem's Introduction

Welcome

About Me

  • Linux and FOSS enthusiast
  • Member of the GNOME Foundation
  • Feel free to reach out for any questions

Projects

Actively Developed

  • Eyedropper Pick and format color, built with GTK and Rust
  • Co-maintainer of Metronome Keep the tempo

Maintained

  • artem Convert images from multiple formats (jpg, png, webp, etc…) to ASCII art, written in Rust

Not maintained

Used Languages and Tools

Languages and Frameworks

Current

Languages and Frameworks I currently use

Past

Languages and Frameworks I've used

Future

Languages and Frameworks I want to work with

Tools

Tools

Stats

Stats

Contact Me

artem's People

Contributors

figsoda avatar finefindus avatar gregorni avatar sandacode avatar talwat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

artem's Issues

zsh completion not functioning correctly

Describe the bug
Shell completion is not working with zsh.

To Reproduce
Install from aur. Then try to use it complete an command. Whilst it completes the file path it does not complete inbuild commands.

Expected behavior
Using two dashes --it should be able to complete commands.

Information

  • OS: Archlinux
  • Shell: zsh
  • Version: 1.1.3

replace "<span style="color: #000000"> </span>" with space character in html output.

Is your feature request related to a problem? Please describe.
its not a real problem, nor a feature request, just a slight improvement... maybe. consider it.

Describe the solution you'd like
"</span style="color: #000000"> </ span>" is 37 characters to express 1 character (space) in a pre tag in html.
with one image I'm sure its minimal. In my use case, Im creating frames in an animation, and those characters add up to extra megabytes.
uses
Describe alternatives you've considered
I write my animation frames as normal, and when I'm done I do system search & replace " </span style="color: #000000"> </ span>"
with " ", which yields the exact same visual but at a significantly reduced file size. I cut 34 frames down from 4.3MB to 2.3MB just now.
Its a space in a pre tag, pre will hand the spacing, and space character is clear, it doesn't need a span with color.

  • Ubuntu 20.04
  • Shell: Bash
  • Version: 1.15
    I dont know how to comment out html so I added a / and a space.

docs: Change ans to ansi

Instructions contain two typos in the following lines:

# or alternatively, use an .asn file for colored ascii text
artem PATH --output ascii.ans

filetype should be .ansi or the resulting art is mono

Manpages missing

Hi! I noticed that the doc directory is missing, which is where the manpage is supposed to be according to the README. Is this a mistake or is this intentional?

EXIF rotation is ignored

When converting images shot on a smartphone in portrait mode, the output is rotated anti-clockwise by 90°. This might have to do with the image metadata not being read properly, or at least not the part that tells that the image is rotated 90°.

jp2a and ascii-image-converter have the same issue

output html: make pre end tag below text body

Is your feature request related to a problem? Please describe.
It would be nice if the pre tag close was below the last line of text
making the text body its own block

Describe the solution you'd like
A clear and concise description of what you want to happen.
this: "" to be on a line below the last line of the text body. Or:
this: "" like this:
""
""
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
learn enough rust to edit this code.

Additional context
I'm going to use this to make animated ascii art frames in the animation where the
tags are makes that less easy

Information

  • OS: [e.g. Ubuntu 20.04
  • Shell: Bash
  • Version: 5.0.17(1)-release

Unit test fails on AUR install

Describe the bug
Using paru to build artem (non-bin) from Aur gives

test target::ansi::test_colored_string::rust_color_with_background ... FAILED

with
test result: FAILED. 84 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s

error: test failed, to rerun pass '--lib'
==> ERROR: A failure occurred in check().
Aborting...
error: failed to build 'artem-1.1.3-1':
error: packages failed to build: artem-1.1.3-1

Treat transparency like black

Treat transparency like black

Describe the solution you'd like
Treat transparency like black
Program is neat, works great,but it would be helpful if transparent image sections were converted to blank spaces the same way black spaces are.

Describe alternatives you've considered
Edit the code myself (really busy rn, 14 hr nights 30 day shut down cant take more projects right now)
Maybe caca or toilet can do it.
manually editing the file, it would be boring, but I could do it.
manually editing the images also boring, also doable.

Additional context
Doing A cli animated ascii art thing. I used to do this all the time like 12 years ago, in college, but I forgot how.

Information
OS Ubuntu 20.04
Shell Bash

  • OS: [e.g. Ubuntu 20.10]
  • Shell: Bash
  • Version: 5.0.17(1)-release

Issues with black-on-alpha png images

Describe the bug
When attempting to convert an image that has exclusively black content with an alpha (transparent) background, artem considers black and alpha to be the same colour, resulting in no output.

To Reproduce
Image that is black-on-alpha:
icon

Output (yes, it's blank):





































Expected behavior
This is the same file, but saved with no alpha, which becomes a white background:
icon_noalpha

Output:

MMMMMMMMMMMMMMMMMMMMMMMMMMMMMNKOdl:'.      .':lxOKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMXkc.                      .lONMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMKo.                              'xXMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMWx.                                    ;OMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMNo                                         'kMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMk                                             ,KMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMW;                .lk0XNWWWWNX0xc.                dMMMMMMMMMMMMMMM
MMMMMMMMMMMMMN,              .xXMMMMMMMMMMMMMMMMKd               oMMMMMMMMMMMMMM
MMMMMMMMMMMMW'             .kWMMMMMMMMMMMMMMMMMMMMWx              oMMMMMMMMMMMMM
MMMMMMMMMMMMd             :WMMMMMMMMMMMMMMMMMMMMMMMMN,             0MMMMMMMMMMMM
MMMMMMMMMMMN             :MMMMMMMMMMMMMMMMMMMMMMMMMMMW,            ,MMMMMMMMMMMM
MMMMMMMMMMMO             NMMMMMMMMMMMMMMMMMMMMMMMMMMMMK             XMMMMMMMMMMM
MMMMMMMMMMMd             MMMMMMMMMMMMMMMMMMMMMMMMMMMMMW             OMMMMMMMMMMM
MMMMMMMMMMMd             MMMMMMMMMMMMMMMMMMMMMMMMMMMMMN             OMMMMMMMMMMM
MMMMMMMMMMM0             0MMMMMMMMMMMMMMMMMMMMMMMMMMMMk             XMMMMMMMMMMM
MMMMMMMMMMMM.            .XMMMMMMMMMMMMMMMMMMMMMMMMMMK             'MMMMMMMMMMMM
MMMMMMMMMMMMO             .0MMMMMMMMMMMMMMMMMMMMMMMMk              OMMMMMMMMMMMM
MMMMMMMMMMMMM:              cKMMMMMMMMMMMMMMMMMMMM0;              ;MMMMMMMMMMMMM
MMMMMMMMMMMMMM:               .dKWMMMMMMMMMMMMW0o.               ,WMMMMMMMMMMMMM
MMMMMMMMMMMMMMM:                  'ldkOOOOkdl.                  'WMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMo                                              :WMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMO                                            dMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMX:                                        '0MMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMx                                      lWMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMNc                                  ,KMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMO.                               dWMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMWl                            :NMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMX;                        ,KMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMO.                    .kMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMWc                  cWMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM0'              '0MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWo            dWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK.        .XMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWc      lWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMd    kMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMO.'0MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

It would be nice if artem would be able to autodetect the black-on-alpha condition and make the alpha equivilant to white, instead of black. There are many icon-type images that are formatted like this, and it's a bit tedious to have to convert each to a non-alpha image first.

Information

MacOS Monterey, zsh, artem 1.1.5

Output

Output
> artem icon.png
[INFO ] Checking inputs
[DEBUG] Input icon.png is a file
[INFO ] Using default characters
[DEBUG] Characters used: "MWNXK0Okxdolc:;,'...   "
[DEBUG] Target Size: 80
[DEBUG] Scale: 0.42
[DEBUG] Invert is set to: false
[DEBUG] BackgroundColor is set to: false
[INFO ] Using colored ascii
[INFO ] Using truecolor ascii
[INFO ] Using border: false
[DEBUG] Flipping X-Axis: false
[DEBUG] Flipping Y-Axis: false
[DEBUG] Centering X-Axis: false
[DEBUG] Center Y-Axis: false
[DEBUG] Outline: false
[DEBUG] Target: Shell
[INFO ] Opening image
[INFO ] Converting img: icon.png
[DEBUG] Using inverted color: false
[DEBUG] Input Image Width: 512
[DEBUG] Input Image Height: 512
[DEBUG] Columns: 80
[DEBUG] Rows: 36
[DEBUG] Tile Width: 6
[DEBUG] Tile Height: 14
[INFO ] Resizing image to fit new dimensions
[DEBUG] Resized Image Width: 480
[DEBUG] Resized Image Height: 504
[INFO ] Starting conversion to ascii
[INFO ] Printing output
[[blank output, as shown above]]

Install fail on Garuda Dr460nized (arch)

Describe the bug
Tried to install via paru, failed with

install: cannot stat 'completions/_artem': No such file or directory

(issue also raised on Reddit, posted here for official purposes)

Information

  • OS: Garuda Dr460nized, kernel 5.18.0-258-tkg-cfs
  • Shell: zsh
  • Version: ?

Compile via Brew

Is your feature request related to a problem? Please describe.
Not a problem per se.

Describe the solution you'd like
Ability for this to be installed by "brew"

Describe alternatives you've considered

Additional context

Information

  • OS: [e.g. Ubuntu 20.10]
  • Shell: [e.g. Bash, PowerShell]
  • Version: [e.g. 22]

For MacOS, but it could be used by other Linuxes too.

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.