Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle files with leading at signs, update README #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,6 @@ GitHub.
will be removed once xterm can handle images greater than 1000x1000.
[Last tested with XTerm(344)].

* Filenames that begin with "@" are special to ImageMagick and it'll
freak out if you don't prepend a directory. (`lsix ./@foo.png`)
(This is a bug in ImageMagick, not lsix).

* Specifying the empty string `""` as a filename makes ImageMagick hang.
(This appears to be an ImageMagick bug / misfeature).

* Long filenames are wrapped, but not intelligently. Would it
complicate this script too much to make it prefer to wrap on whites
space, dashes, underscores, and periods? Maybe.
Expand Down Expand Up @@ -274,4 +267,4 @@ GitHub.

* [VT340 Test](https://github.com/hackerb9/vt340test), a project to document the actual behaviour of the DEC VT340 hardware.

* [Digital ANSI-Compliant Printing Protocol: Level 2 Programming Reference Manual](http://www.vaxhaven.com/images/f/f7/EK-PPLV2-PM-B01.pdf), Chapter 5: Sixel Graphics. An excellent and reasonably clear discussion for anyone who wants to generate or parse sixel graphics.
* [Digital ANSI-Compliant Printing Protocol: Level 2 Programming Reference Manual](http://www.vaxhaven.com/images/f/f7/EK-PPLV2-PM-B01.pdf), Chapter 5: Sixel Graphics. An excellent and reasonably clear discussion for anyone who wants to generate or parse sixel graphics.
9 changes: 7 additions & 2 deletions lsix
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,19 @@ main() {
len=${#onerow[@]}
onerow[len++]="-label"
onerow[len++]=$(processlabel "$1")
onerow[len++]="file://$1"
onerow[len++]="file://$(imescape $1)"
shift
done
montage "${onerow[@]}" $imoptions gif:- \

montage "${onerow[@]}" $imoptions gif:- \
| convert - -colors $numcolors sixel:-
done
}

imescape() {
echo "$@" | sed -e 's|^@|./@|g;'
}

processlabel() {
# This routine is all about appeasing ImageMagick.
# 1. Remove silly [0] suffix and : prefix.
Expand Down