fix Makefile and README.md for 2014/maffiodo2
This commit is contained in:
1 parent
4bff9109fe
commit
6ed7196a86
2 files changed
+235
-98
No files matched your search
+36
-22
@@ -1,24 +1,28 @@
|
||||
# Most tweetable entry
|
||||
|
||||
Sandro Maffiodo
|
||||
<smaffer@gmail.com>
|
||||
<http://www.assezeta.com/sandromaffiodo>
|
||||
Sandro Maffiodo
|
||||
<smaffer@gmail.com>
|
||||
<http://www.assezeta.com/sandromaffiodo>
|
||||
|
||||
# To build:
|
||||
|
||||
## Judges' comments:
|
||||
### To build:
|
||||
|
||||
make
|
||||
```sh
|
||||
make
|
||||
```
|
||||
|
||||
### To run:
|
||||
|
||||
./prog arg
|
||||
```sh
|
||||
./prog arg
|
||||
```
|
||||
|
||||
### Try:
|
||||
|
||||
cat image.rgb | ./prog ' .,:;!$#@'
|
||||
```sh
|
||||
cat image.rgb | ./prog ' .,:;!$#@'
|
||||
```
|
||||
|
||||
### Selected Judges Remarks:
|
||||
## Judges' comments:
|
||||
|
||||
On the face of it :-) given what this program one might wonder what makes this winner special.
|
||||
But when you realize the source is small enough to tweet on twitter you understand.
|
||||
@@ -27,6 +31,7 @@ Who will be the first to tweet this source? How many re-tweets will such tweet
|
||||
And how many people will really understand the tweet?
|
||||
|
||||
## Author's comments:
|
||||
|
||||
### Remarks
|
||||
|
||||
This program convert an image to an ASCII ART. The program reads a raw RGB image from **stdin** and print the ASCII ART to **stdout**.
|
||||
@@ -42,40 +47,49 @@ The program crash if run without parameters.
|
||||
|
||||
If you have a terminal geometry than if different from the common 80x25 you can modify the *output width* by changing the value of the first variable:
|
||||
|
||||
d=80
|
||||
```c
|
||||
d=80,
|
||||
```
|
||||
|
||||
### Something to try
|
||||
|
||||
Type this:
|
||||
|
||||
cat image.rgb | ./prog " .:;Y0"
|
||||
```sh
|
||||
cat image.rgb | ./prog " .:;Y0"
|
||||
```
|
||||
|
||||
You can use your own image. Convert the image to a raw RGB image, using imagemagick it's very simple:
|
||||
|
||||
convert -geometry 80x source.jpg image.rgb
|
||||
```sh
|
||||
convert -geometry 80x source.jpg image.rgb
|
||||
```
|
||||
|
||||
This program require one parameter, or crash. The parameter of the program is the *convertion ramp*. You can use different ramps or create your own (for ex. using some letters of your name).
|
||||
These are some ramps you can try:
|
||||
|
||||
./prog " :1"
|
||||
./prog " .:;Y0"
|
||||
./prog " .:-=+*#%@"
|
||||
./prog " .,:!-iots&8%#@$"
|
||||
./prog "$@B%8&WM#*oahkbdpqwmZO0QLCJUYXzcvunxrjft/\|()1{}[]?-_+~<>i!lI;:,"^`'. "
|
||||
```sh
|
||||
./prog " :1"
|
||||
./prog " .:;Y0"
|
||||
./prog " .:-=+*#%@"
|
||||
./prog " .,:!-iots&8%#@$"
|
||||
./prog "$@B%8&WM#*oahkbdpqwmZO0QLCJUYXzcvunxrjft/\|()1{}[]?-_+~<>i!lI;:,"^`'. "
|
||||
```
|
||||
|
||||
### 121 byte version
|
||||
|
||||
An alternative version of this program is only 121bytes long:
|
||||
|
||||
d=80,e,j;g(){j+=getchar();}main(){for(;;){j=0;g();if(j<0)break;g(g());putchar(" .:#@"[j/3*5>>8]);if(!(++e%d))puts("");}}
|
||||
```c
|
||||
d=80,e,j;g(){j+=getchar();}main(){for(;;){j=0;g();if(j<0)break;g(g());putchar(" .:#@"[j/3*5>>8]);if(!(++e%d))puts("");}}
|
||||
```
|
||||
|
||||
This alternative version have a **fixed ramp**. It's smaller but it's not so fun to use...
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
<!--
|
||||
## Copyright:
|
||||
|
||||
(c) Copyright 1984-2015, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
|
||||
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
|
||||
|
||||
[judges]: http://www.ioccc.org/judges.html
|
||||
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
|
||||
-->
|
||||
Reference in new issue
Block a user