Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The purpose of the --test option from TODO #331

derVedro started this conversation in Ideas
Discussion options

Hey, I’m curious about the test page TODO. What’s its intended purpose? My idea was to have some kind of dummy image for experimenting with different options and arguments. I todone a prototype just for fun, a new quick and dirty run mode, not a proper new image loader. I’m not sure if it’s worth a pull request, but here it is:

https://github.com/derVedro/chafa/tree/testcard

You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

Oh hey! You read the TODO file, that's awesome. It's a bit terse/cryptic since I've used it to dump ideas that pop up uninvited when I'm supposed to be doing other things.

The test page should make use of the terminal features Chafa thinks your terminal is capable of, so what you've done (basically treat it as any other image, except built-in) is the right approach. We may want to expand it later to also test escape codes for lower fidelity (e.g. if the terminal can do direct color, also print 240 colors, 16 colors and mono versions in a 4x4 grid), but what you've got is a great first cut. The moai is a nice touch!

If you'd like to submit it as a PR, I'll review it as soon as I can. I saw mostly stylistic changes I'd make, and a compiler warning or two.

You must be logged in to vote
1 reply
Comment options

Thanks for the clarification! I'm not sure if I can tackle this in the near future. I have to dig deeper into the project to do it, because I still don’t have the full picture yet. I mostly hack on things like this just for fun, to get a better sense of how stuff works, like the RLE.

I did get rid of both warnings, so I think I'll go ahead and open a PR soon, even if it’s still missing some of the things you suggested. I don't think I'll work on the test expansion for now though, maybe later. First I want to take a closer look at Netpbm, it looks interesting and surprisingly approachable at first glance.

I'd really appreciate a review. I haven’t written any real C in ages, and even back then it wasn’t much beyond small experiments. So I’m sure there will be things I can improve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /