Commit 3db70b6c authored by TheOuterLinux's avatar TheOuterLinux

...

parent fcbf67a8
_ __ ____ ___________ __________ ____ __ _
.________ //_ ANSilOVE _\\ ._____
____/\ ___| _/___/\ __ _____. _ ____/\ _| \ ____
/ .__\\ \ | _ //___ _)_. \_ |____ \\ | // ___/
/ __/ \ \ |__ \/ \ |_ | | \ | \ / __)____
/____| \_|\_____|_________/__ `/ |______ //_______/____/______ /
|______/ _ __ __________ \/ _______ \/ ________ __ _ yop \/
Ansilove/C is developed by:
Stefan Vogt <stefan DOT vogt AT byteproject DOT net>
Brian Cassidy <brian DOT cassidy AT gmail DOT com>
Frederic Cambus <fred AT statdns DOT com>
AnsiLove/C 4.0.0 (2019-01-16)
- Switch to using libansilove
- Add a new switch (-d) to toggle DOS aspect ratio
- Add initial support for PabloDraw 24-bit ANSI sequences
- Ansilove now generates only one output file when -r or -R options
are used
- Display scale factor when -r or -R options are used
- Allow to specify the number of columns for ANSI and Tundra files
- Restrict maximum allowed number of columns to 4096
- Check asprintf() return value and error if allocation fails
- Bugfixes and improvements in the SAUCE parser
- Refactor font selection processing
- Refactor rendering mode processing
- Use OpenBSD style(9) for function prototypes and declaration
- Add missing headers and remove unnecessary ones
- Remove versionInfo(), simply print the header with version information
when invoked with -v
- Remove showHelp(), show synopsis instead when invoked with -h
- Add a new example ANSi (Thanks Nail)
- Remove -e switch, examples are now listed in the man page instead
- Make synopsis() only display SYNOPSIS, as it should be.
- Add an EXAMPLES section in ansilove.1
- PC fonts for code pages other than cp437 are now named using the cpNNN
scheme. Albeit not documented anymore, the previously used names will
keep working
AnsiLove/C 3.0.9 (2018-06-19)
- Add a new example ANSi (Thanks Sylvao)
- Do not use -Werror by default
- Increment maximum ansi sequences length
- Add code to skip PabloDraw 24-bit ANSI sequences
AnsiLove/C 3.0.8 (2017-12-20)
- Adding new example ANSis (Thanks Burps)
- Use asprintf() to create output filenames
- Reflect OpenBSD's pledge() changes
- Add a -R flag allowing to specify a custom retina scale factor
AnsiLove/C 3.0.7 (2017-07-02)
- Print messages to to stderr instead of stdout
- Ensure binary files have an even size
- Better description of supported file formats
- Skip erase in line (EL) sequences (issue reported by Bart Dumon, thanks!)
- Define palettes in config.h
- Use defined palettes instead of hardcoding each color value in the loaders
AnsiLove/C 3.0.6 (2017-04-22)
- Create an output function to unify the way output files are created
- Prevent .png suffix to be appended when using -o flag (*NIX tool
convention compatibility)
AnsiLove/C 3.0.5 (2017-04-16)
- Free memory allocated in the PCBoard loader
- Free font data where appropriate
- Add a trailing NUL character to inputFileBuffer
- Remove the custom substr function, call strndup directly
- Free seqGrab where necessary
- Use the ternary operator when shitfing cursor position
- Use perror when printing errors
- Remove SUBSTITUTE_BREAK and WRAP_COLUMN_80 options
- Use fstat to get the input file size
- Create a retina function instead of duplicating code in all loaders
- Fix OpenBSD's style(9) offenders in compat functions
AnsiLove/C 3.0.4 (2016-07-28)
- Relicensed under the BSD 2-Clause license
- Input file is now loaded in main, prior to calling format loaders
- Use stat to get input file size instead of custom file size function
- Remove now unused file size function
- Refactoring bits and columns argument value handling
AnsiLove/C 3.0.3 (2016-07-14)
- Adding some missing includes
- Define _XOPEN_SOURCE macro (for 'strdup' and 'strndup' functions)
- Switch back to compiling with -std=c99 instead of -std=gnu99
- Adding cast to fix compilation with GCC on NetBSD [-Werror=char-subscripts]
- Use strdup when lowercasing file extension, to avoid modifying input filename
- Define _NETBSD_SOURCE macro to make 'strndup' declaration visible on NetBSD
AnsiLove/C 3.0.2 (2016-01-21)
- Adding a new example XBin (Thanks Enzo)
- Adding install target for man page
- Removing hardcoded paths in 'CMakeLists.txt' for GD library detection
- Add additional include directories for compat functions to avoid
using relative path in includes
- Refactoring of the ANSI loader, and removed support for drawing bold,
italics and underline characters for Amiga fonts, allowing to plot
characters directly to the canvas and drop a lot of code
- Move SAUCE functions into their own file
- Moving all format loaders to their own files + simplifying names
- Removed prototype for 'str_replace' which has been pruned
- Moving ANSI and PCBoard character structures to their respective
loader headers
- AnsiLove is now pledged on OpenBSD
- Renaming a bunch of files and improving the project structure
- Removing all calls to 'atoi' and using OpenBSD's 'strtonum' instead
- Fixing regression in the CED mode rendering
- Removing 'workbench-transparent' rendering mode, it never made sense
- Fixing regression in the Workbench mode rendering
- Adding detailed font options in the manual page
AnsiLove/C 3.0.1 (2016-01-03)
- Initializing some uninitialized variables
- Removing some unused variables and assignments
- Removing optional filters for PCBoard sequences
- Pruning now unused 'str_replace' function
- Remove support for configurable diz extensions
- Remove support for configurable RGB values for CED + WorkBench modes
- Using strncmp instead of strcmp + strndup combo, as strndup is not
part of C99
- Added a manual page
AnsiLove/C 3.0.0 (2015-12-13)
- Switching to getopt for parsing command line options
- Removing bits parameters for ADF, IDF, and XBIN loaders
- Adding a mode option to specify CED, Workbench and transparent rendering modes
- Using mode instead of bits to check for rendering modes to enable
- New 'alSelectFont' function returning a structure with font information
- Adding a compat directory and importing 'strtonum' function from OpenBSD
- Made CMakeList more modular, and linking strtonum conditionally
- Remove .diz pre-filtering as it was a remnant of the PHP version
- Using 'strtonum' to parse and validate bits and columns parameter value
before calling the loaders
- Removing unused parameter 'font_size_x' in alDrawChar
- Enabling the '-Wextra' and '-Werror' flags in CMakeLists.txt
- Group checks for CR + LF in the ANSi and PCBoard loaders
- Documentation cleanups and updates
AnsiLove/C 2.2.1 (2015-06-28)
- Switching to CMake to build the project
- Moving source files to the 'src' directory
- Removing legacy Ubuntu compilation script
- Updated documentation (build requirements + instructions)
- Remove MIN macro and use math.h's 'fmin' instead
- Adding Ansilove artwork, both ASCII and ANSI as example files
- Adding 'AUTHORS', 'FILE_ID.DIZ', and 'THANKS' files
- Fixing file extension detection (Close #2)
- Fixing the PCB loader to use logical AND as it should
____ ____
________|_ (_ _______ _) _|________
_)) - --|/---\\-----//---\|-- - ((_
| ' ________ ` |
: ______ ____\ (_ ______ ___
___\___ /__ _\_ _\\_ :_\ ___/_____\_(_
_\ __ /_\ \\/ \\____ \_ |
\ \: : \\ . :/ | |
\\_____\-------------\____|___/------:_ |
_) |-----\\ . _______ . )__|
| | : \\ (_ :
: | .::. .::. |----\_ _/______ .
. | ::::::::::: | :/ __\ ____/__
_ | `:::::::' | / \ _\ _/
\ |_ `:::' | _. / \: \_
\\_______\\ ' |--/___/-----\_____//
- -----------//______|----------------- -
: :
| |
| Ansilove/C 4.0.0 |
| |
| ANSi=>PNG converter & library |
| |
| Supports 7 textmode formats |
| ANS/PCB/BiN/ADF/iDF/TND/XBiN! |
| |
| Supports 14 MS-DOS charsets |
| 80x25, 80x50 and Amiga fonts! |
|_ Supports SAUCE and iCE colors _|
_|/ Small output size (4-bit PNG) \|_
// \\
/____ _____\
ns. ((_ A N S i L O V E _)) ASL
Copyright (c) 2011-2019, Stefan Vogt, Brian Cassidy, and Frederic Cambus
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
_______ ___________ ___
__\___ \_ ____/ /\ /______ ___\_/__ /\
/ \| \/ _ \ /--\_____ \\ / /\ / \
_/ | / \ \ |/ / \ \ _ _____/ \_______
\ |_____\____/ / / \____ /\/ /
\______| \ \_____/\______ /\ \/ \ /\NSILOVE / C /____ _
\ |_______\__\___ \ \ \ / \___\__/____
\____| /____/\_\/\__ / / __/___ \ /\ ____
\ \ \ / /_/ __ \/ /__\__/ _/ _____ ___
/\ \____\/ / // \ / / / _>/ //__/\
/ \ _/ \ // / / / \/ / \__\/
_ _________ / \_______ _ \___ /_______/ / _/ \____ \ /
\ / \ \___/\ \_______/\\ \ \______/\/
\/ \_\ \ \_______\ \ \\/ \__\ \ \
\__\/ \______\/ h7/dS!\_____\/
# AnsiLove/C
[![Build Status][1]][2]
This is a complete rewrite of [AnsiLove/PHP](https://www.ansilove.org) in the C programming language. It converts ANSi and artscene related file formats into PNG images. The project is considered as stable, current version is `4.0.0`.
# Specs
AnsiLove/C is strictly using the `C99 standard` to achieve high portability to all major operating systems. Supported compilers are `GCC` and `Clang`, others may work but aren't tested. We use Linux and OpenBSD for AnsiLove/C development.
# Why C?
There were many reasons, most notably PHP interpreter independence and performance. A solid C foundation is just perfect for creating libraries and it can easily be embedded into applications. We already mentioned portability. What else? We wanted evolution. AnsiLove/C should not be understood as a port. It takes many different approaches (like processing binary font dumps or generating @2x Retina images), it is overall improved and introduces new features. While results tend to be the same, the codebase does not have much in common with it's ancestor.
# Dependencies
AnsiLove/C uses the `CMake` build system and requires the [libansilove](https://github.com/ansilove/libansilove) library and header files.
# Installing dependencies
- OpenBSD: `pkg_add -r cmake`
- NetBSD: `pkgin install cmake`
- FreeBSD: `pkg install cmake`
- Mac OS X: `brew install cmake`
- Alpine Linux: `apk add cmake gcc make musl-dev`
- Debian / Ubuntu / Mint: `apt-get install cmake`
- Solus: `eopkg install -c system.devel`
For now, `libansilove` has to be installed manually.
# Compiling
mkdir build
cd build
cmake ..
make
# Installation
AnsiLove/C packages are available for:
### OpenBSD
pkg_add ansilove
### Pkgsrc (NetBSD, SmartOS, Mac OS X, etc.)
pkgin install ansilove
### FreeBSD
pkg install ansilove
### Solus
eopkg install ansilove
# Features
The following formats are supported:
- .ANS - ANSi (ANSI escape sequences: ANSI X3.64 standard)
- .PCB - PCBoard Bulletin Board System (BBS) own file format
- .BIN - Binary format (raw memory copy of text mode video memory)
- .ADF - Artworx format, supporting custom character sets and palettes
- .IDF - iCE Draw format, supporting custom character sets and palettes
- .TND - TundraDraw format, supporting 24-bit color mode
- .XB - The eXtended Binary XBin format, supporting custom character sets and palettes
Files with custom suffix default to the ANSi renderer (e.g. ICE or CIA).
AnsiLove/C is capabable of processing:
- SAUCE records
- DOS and Amiga fonts (embedded binary dump)
- iCE colors
Even more:
- Output files are highly optimized 4-bit PNGs.
- Optionally generates additional (and proper) Retina @2x PNG.
- You can use custom options for adjusting output results.
- Built-in support for rendering Amiga ASCII.
# Documentation
## Synopsis
```
ansilove [-dhirsv] [-b bits] [-c columns] [-f font] [-m mode] [-o file]
[-R factor] file
```
## Options
```
-b bits Set to 9 to render 9th column of block characters (default:
8).
-c columns Adjust number of columns for ANSI, BIN, and TND files.
-d Enable DOS aspect ratio.
-f font Select font for supported formats.
-h Show help.
-i Enable iCE colors.
-m mode Set rendering mode for ANS files. Valid options are:
ced Black on gray, with 78 columns.
transparent
Render with transparent background.
workbench
Use Amiga Workbench palette.
-o file Specify output filename/path.
-r Create Retina @2x output file.
-R factor Create Retina output file with custom scale factor.
-s Show SAUCE record without generating output.
-v Show version information.
```
There are certain cases where you need to set options for proper rendering. However, this is occasionally. Results turn out well with the built-in defaults.
## Fonts
We dumped many fonts as binary data right into AnsiLove/C, so the most popular typefaces for rendering ANSi / ASCII art are available at your fingertips.
PC fonts can be (all case-sensitive):
- `80x25` Default (Code page 437)
- `80x50` 80x50 mode (Code page 437)
- `cp737` Greek (Code page 737)
- `cp775` Baltic (Code page 775)
- `cp850` Latin1 (Code page 850)
- `cp852` Latin2 (Code page 852)
- `cp855` Cyrillic (Code page 855)
- `cp857` Turkish (Code page 857)
- `cp860` Portuguese (Code page 860)
- `cp861` Icelandic (Code page 861)
- `cp862` Hebrew (Code page 862)
- `cp863` French Canadian (Code page 863)
- `cp865` Nordic (Code page 865)
- `cp866` Russian (Code page 866)
- `cp869` Greek (Code page 869)
- `terminus` Terminus (Modern font, code page 437)
AMIGA fonts can be (all case-sensitive):
- `amiga` (alias to Topaz)
- `microknight` (Original MicroKnight version)
- `microknight+` (Modified MicroKnight version)
- `mosoul` (Original mO'sOul font)
- `pot-noodle` (Original P0T-NOoDLE font)
- `topaz` (Original Topaz Kickstart 2.x version)
- `topaz+` (Modified Topaz Kickstart 2.x+ version)
- `topaz500` (Original Topaz Kickstart 1.x version)
- `topaz500+` (Modified Topaz Kickstart 1.x version)
## Bits
`bits` can be:
- `8` (8-bit)
- `9` (9-bit)
Setting the bits to `9` will render the 9th column of block characters, so the output will look like it is displayed in real textmode.
## Rendering Mode
`mode` can be (all case-sensitive):
- `ced`
- `transparent`
- `workbench`
Setting the mode to `ced` will cause the input file to be rendered in black on gray, and limit the output to 78 columns (only available for `ANS` files). Used together with an Amiga font, the output will look like it is displayed on Amiga.
Setting the mode to `workbench` will cause the input file to be rendered using Amiga Workbench colors (only available for `ANS` files).
Settings the mode to `transparent` will produce output files with transparent background (only available for `ANS` files).
## iCE Colors
iCE colors are disabled by default, and can be enabled by specifying the `-i` option.
When an ANSi source was created using iCE colors, it was done with a special mode where the blinking was disabled, and you had 16 background colors available. Basically, you had the same choice for background colors as for foreground colors, that's iCE colors.
## Columns
`columns` is only relevant for .ANS, .BIN, and .TND files, and is optional. In most cases conversion will work fine if you don't set this flag, the default value is `160` for .BIN files and `80` otherwise.
## SAUCE records
It's fine to use AnsiLove/C as SAUCE reader without generating any output, just set option `-s` for this purpose.
# Who pulls the strings
AnsiLove/C is developed by Stefan Vogt ([@ByteProject](https://github.com/ByteProject)), Brian Cassidy ([@bricas](https://github.com/bricas)) and Frederic Cambus ([@fcambus](https://github.com/fcambus)).
# License
AnsiLove/C is released under the BSD 2-Clause License. See the file `LICENSE` for details.
# Resources
GitHub: https://github.com/ansilove/ansilove
[1]: https://api.travis-ci.org/ansilove/ansilove.png?branch=master
[2]: https://travis-ci.org/ansilove/ansilove
_ __ ____ ___________ __________ ____ __ _
.________ //_ ANSilOVE _\\ ._____
____/\ ___| _/___/\ __ _____. _ ____/\ _| \ ____
/ .__\\ \ | _ //___ _)_. \_ |____ \\ | // ___/
/ __/ \ \ |__ \/ \ |_ | | \ | \ / __)____
/____| \_|\_____|_________/__ `/ |______ //_______/____/______ /
|______/ _ __ __________ \/ _______ \/ ________ __ _ yop \/
Thanks to the following people for helping the Ansilove project <3
Fonts:
- dMG of Ascii Arena for his Amiga Fonts (https://www.trueschool.se)
- Kosta Kostis (http://www.kostis.net) for his fantastic CPI tools
- Dimitar Zhekov for the Terminus font (http://terminus-font.sourceforge.net)
Code:
- Ted Unangst and Todd Miller for strtonum.c
ASCiis logos used in the releases:
- H7 for the ansilove documentation logo
- Ansichrist for the file_id.diz
- Yop for the Ansilove logo used in the ChangeLog, THANKS and AUTHORS files
Examples ANSis and ASCiis:
- Avenger for the ave-love.ans example ANSi
- Avenging Angel for the avg-alove.ans example ANSi
- Aesthetic for the 43-nslv1.ans example ANSi
- Sephiroth for the sph_love.ans example ANSi
- Yop for the yop-ANSilove.ans example ASCii
- Ansichrist for the ns-bp09.ans example ANSi
- dMG for the dMG-ansilove.asc example ASCii
- Spot for the spot-ansilove.txt example ASCii
- Spidy for the spidy-ansilove.txt example ASCii
- Cubon for the cbn-ansilove.ans example ASCii
- Plur for the plur-ansilove.txt example ASCii
- Knocturnal for the k1-alove.ans example ANSi
- Grymmjack for the gj-ansilove.ans example ANSi
- Noches and Avenging Angel for the us-alov.ans example ANSi
- Enzo for the we-alove.ans example ANSi
- Noches for the no-alove.ans example ANSi
- Filth for the fil-ping.ans example ANSi
- BYM for the bym-ansilove.ans example ANSi
- Spear and Knocturnal for the us-alove.asc example ASCii
- Rad Man for the rad-love.ans example ANSi
- Sk!n for the sk!n-ansilove.txt example ASCii
- Otium for the om-ansilove.ans example ANSi
- Konami for the ko-alove.ans example ASCii
- Andy Herbert for the andyh-ansilove.ans example ANSi
- The Creep Fever for the tcf-ansilove.xb example ANSi
- Enzo for the lu-ansilove.xb example XBin
- Burps for the bs-alove.ans example ANSi
- Burps for the bs-ansilove.ans example ANSi
- Sylvao for the syl-farm.ans example ANSi
- Nail for the n-silove.ans example ANSi
- Import documentation from Ansilove/PHP
- Display mode information in summary, and DOS aspect if enabled
- Wrap lines longer than 80 columns
......@@ -4,6 +4,7 @@
aewan - an ascii-art editor
album - make a web photo album
ansilove - convert ANSi and artscene related file formats into PNG images
base64 - base64 encode/decode data and print to standard output
blender - a 3D modelling and rendering package
cacaview - ASCII image browser
......
......@@ -23,6 +23,7 @@ alienwave - an ncurses-based space invaders clone
alpine - an Alternatively Licensed Program for Internet News and Email
alsamixer - soundcard mixer for ALSA soundcard driver, with ncurses interface
anacron - runs commands periodically
ansilove - convert ANSi and artscene related file formats into PNG images
apropos - search the manual page names and descriptions
apt-listbugs - tool which lists critical bugs before each APT installation
apt-listchanges - show new changelog entries from Debian package archives
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment