Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
8bitmcu committed Jan 8, 2024
1 parent 9843201 commit 9abb220
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

SRC = main.c Turbo-Base64/turbob64d.c
SRC = gcode-preview.c Turbo-Base64/turbob64d.c
OBJ = ${SRC:.c=.o}

all: options gcode-preview
Expand All @@ -14,10 +14,10 @@ options:
${CC} -c ${CFLAGS} $<

gcode-preview: ${OBJ}
${CC} -o $@ main.o turbob64d.o ${LDFLAGS}
${CC} -o $@ gcode-preview.o turbob64d.o ${LDFLAGS}

clean:
rm -f gcode-preview main.o turbob64d.o
rm -f gcode-preview gcode-preview.o turbob64d.o

install: all
mkdir -p ${DESTDIR}${PREFIX}/bin
Expand Down
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
gcode-preview
=============

Extract images as png/jpg from .gcode files with C or Bash
Extract thumbnail images as png/jpg from .gcode files with C or Bash


Building and installing the C version
Expand All @@ -10,30 +10,33 @@ Building and installing the C version
1. clone this repository locally on your machine
2. run `make clean && sudo make install` from within the repository folder

Example usage
-------------

`gcode-preview -i benchy.gcode -o thumb.png`

`gcode-preview-bash benchy.gcode thumb.png`

Performance
-----------
Quick benchmark of `gcode-preview` vs `gcode-preview-bash` extracting a 800x600 png image from a gcode file:

`gcode-preview-bash`:
```
$ time gcode-preview-bash benchy.gcode thumb.png
real 0m0.014s
user 0m0.016s
sys 0m0.004s
```

`gcode-preview`:
```
$ time gcode-preview benchy.gcode thumb.png
real 0m0.002s
user 0m0.001s
sys 0m0.000s
```

Example usage
-------------

`gcode-preview -i benchy.gcode -o thumb.png`

`gcode-preview-bash benchy.gcode thumb.png`

Ranger / lf integration
-----------------------
Expand Down
File renamed without changes.

0 comments on commit 9abb220

Please sign in to comment.