From 9c53bd28a8ba5e54e07e4e286904d168c1b04789 Mon Sep 17 00:00:00 2001

From: Anonymous anonymous@zokni.xyz

Date: Thu, 11 Apr 2024 16:07:24 -0400

Subject: [PATCH 1/1] Merge version 0.2


textart | 337 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++

1 file changed, 337 insertions(+)

create mode 100755 textart

diff --git a/textart b/textart

new file mode 100755

index 0000000..c7815a5

--- /dev/null

+++ b/textart

@@ -0,0 +1,337 @@

+#!/usr/bin/php -q

+<?php

+/**

+$version = "textart-cli version 0.2";

+if(!isset($argv[3])) {

+$version

+Usage: textart [<max columns]

+

+EOL;

+}

+// Default maximum columns

+$maxcol = 100;

+// Supported text art formats

+$formats = array("5color", "5colorsq", "braille", "1x2block", "2x2block", "2x3block");

+// 5color art palettes

+$rec = array("█", "▓", "▒", "░", " ");

+$squ = array("██", "▓▓", "▒▒", "░░", " ");

+// Block art elements

+$blk1x2 = array(" ", "▀", "▄", "█");

+$blk2x2 = array(" ", "▘", "▖", "▌", "▝", "▀", "▞", "▛", "▗", "▚", "▄", "▙", "▐", "▜", "▟", "█");

+$blk2x3 = array(" ", "🬀", "🬃", "🬄", "🬏", "🬐", "🬓", "▌", "🬁", "🬂", "🬅", "🬆", "🬑", "🬒", "🬔", "🬕",

+// Process input

+$format = $argv[1];

+$img = $argv[2];

+$out = $argv[3];

+if(isset($argv[4]) && is_numeric($argv[4]))

+elseif(isset($argv[4]))

+// Validate format

+if(!in_array($format, $formats))

+// Create temp file and download file to it

+$tmp = tempnam("", "textart");

+if($tmp === false)

+copy($img, $tmp);

+// Preprocess image to the target colorspace

+list($w, $h) = getimagesize($tmp);

+switch($format) {

+}

+file_put_contents($out, $o);

+unlink($tmp);

+print "$version\nMode: $format\n$o";

+// Do fatal error

+function fatal_error($msg) {

+}

+// Convert 2x4 pixel area to braille

+function get_braille_tile($im, $x, $y) {

+}

+// Convert 1x2 pixel area to block

+function get_1x2_tile($im, $x, $y) {

+}

+// Convert 2x2 pixel area to block

+function get_2x2_tile($im, $x, $y) {

+}

+// Convert 2x3 pixel area to block

+function get_2x3_tile($im, $x, $y) {

+}

+// Return ON/OFF state using 0x80 as midpoint

+function pixel($color) {

+}

+function import_grayscale($file) {

+}

+// Pad image to size needed for clean conversion

+function pad_image($im, $col, $row) {

+}

+?>

\ No newline at end of file

--

2.34.1

Proxy Information
Original URL
gemini://git.brainsocks.xyz/textart/master/patch/9c53bd28a8ba5e54e07e4e286904d168c1b04789.patch
Status Code
Success (20)
Meta
text/plain
Capsule Response Time
728.709165 milliseconds
Gemini-to-HTML Time
3.566515 milliseconds

This content has been proxied by September (3851b).