From 33eb3c91342d1a2c119d0ab1815fb92185b22b77 Mon Sep 17 00:00:00 2001 From: alexcoder04 Date: Mon, 19 Dec 2022 11:19:16 +0100 Subject: [PATCH] update docs --- Makefile | 14 +++++++++++--- README.md | 22 ++++++++++++++++++++-- nspire-merge.1 | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 5 deletions(-) create mode 100644 nspire-merge.1 diff --git a/Makefile b/Makefile index 0eed883..41fa00b 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,17 @@ +NAME = nspire-merge + +SHELL = /bin/sh +RM = rm PREFIX ?= /usr/local +deps: + pip install Pillow + install: - install -Dm755 ./nspire-merge "$(DESTDIR)$(PREFIX)/bin/nspire-merge" + install -Dm755 $(NAME) "$(DESTDIR)$(PREFIX)/bin/$(NAME)" + install -Dm644 $(NAME).1 "$(DESTDIR)$(PREFIX)/share/man/man1/$(NAME).1" uninstall: - $(RM) "$(DESTDIR)$(PREFIX)/bin/nspire-merge" - + $(RM) "$(DESTDIR)$(PREFIX)/bin/$(NAME)" + $(RM) "$(DESTDIR)$(PREFIX)/share/man/man1/$(NAME).1" diff --git a/README.md b/README.md index 94baf69..c50441d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # nspire-merge -This Python script merges multiple Lua source files and images into one file for +This Python script merges multiple Lua source files and images into one Lua file for TI-Nspire projects. This project is inspired by [DaveDuck321](https://github.com/DaveDuck321)'s @@ -36,5 +36,23 @@ and import images manually. ## Installation -`sudo make install` installs this script to `/usr/local/bin`. +### Requirements + - `PIL` / `Pillow` + +Can be installed using `make deps`. + +### Installing through the AUR on Arch Linux + +This project is available on the AUR as [`nspire-merge`](https://aur.archlinux.org/packages/nspire-merge). +Either install it manually or use an AUR helper of your choice. + +### Install using `make` + +Install the script to `/usr/local/bin`: + +> `sudo make install` + +### Uninstalling + +`sudo make uninstall` or `sudo rm -vi /usr/local/bin/nspire-merge /usr/local/share/man/man1/nspire-merge`. diff --git a/nspire-merge.1 b/nspire-merge.1 new file mode 100644 index 0000000..864a499 --- /dev/null +++ b/nspire-merge.1 @@ -0,0 +1,37 @@ +.TH "nspire-merge" "1" + +.SH "NAME" +.PP +nspire-merge - merging multiple Lua source files and images into one Lua file for TI-Nspire projects + +.SH "SYNOPSIS" +.PP +shclrz [OPTIONS] [INPUT FILES ...] + +.SH "OPTIONS" +.SS "-h, --help" +.PP +Print help. +.SS "--resources [RESOURCES]" +.PP +Load images from this folder (default "res/"). +.SS "--out [OUT] +.PP +Specify file to write the output to (default "out.lua"). +.SS "--strip" +.PP +Strips blank lines and comments. +.SS "--api-version [API VERSION]" +Specifies API version (default '2.2'). + +.SH "EXAMPLES" +.SS "nspire-merge --out myproject.lua -- main.lua gui.lua" +.PP +Generates "myproject.lua" from "main.lua" and "gui.lua" (in this order) and images from "res/". +.SS "nspire-merge --api-version 2.1 --strip -- *.lua" +.PP +Generates "out.lua" from all Lua files in the folder, strips all blank lines and comments from it and sets the API version to "2.1". + +.SH "AUTHOR" +.PP +alexcoder04 (\fIhttps://github.com/alexcoder04/nspire-merge\fP) \ No newline at end of file