~lucasemmoreira/invoice

a293c06e6479cf7920d5605e0cce85eaa21c8d44 — Lucas E M Moreira 1 year, 2 months ago master
initial commit
5 files changed, 50 insertions(+), 0 deletions(-)

A .gitignore
A LICENSE
A README.md
A invoice
A makefile
A  => .gitignore +1 -0
@@ 1,1 @@
pdfminer/
\ No newline at end of file

A  => LICENSE +13 -0
@@ 1,13 @@
Copyright (c) 2023 Lucas Esperancini Moreira e Moreira <me@lucasemmoreira.xyz>

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

A  => README.md +28 -0
@@ 1,28 @@
# invoice

Extracts the code for the invoice.

# Requirements

+ leiningen (https://leiningen.org/)
+ java
+ xsel
+ rofi

# Install

```
make install
```

# Usage

`invoice file.pdf` will pop a rofi menu with all matching code for the invoice. 

# Invoice type

For now, works only in brazilian invoice.

# Todo

[ ] improve pdfminer running startup.

A  => invoice +1 -0
@@ 1,1 @@
java -jar ~/.config/invoice/pdfminer.jar $1 | grep -Eo '[0-9]{5}.[0-9]{5} [0-9]{5}.[0-9]{6} [0-9]{5}.[0-9]{6} [0-9] [0-9]{14}' | rofi -dmenu -l 10 | xsel -bi

A  => makefile +7 -0
@@ 1,7 @@
install:
	test -d pdfminer/ || git clone https://git.sr.ht/~lucasemmoreira/pdfminer
	cd pdfminer && make uberjar
	mkdir -p ~/.config/invoice/
	cp pdfminer/pdfminer.jar ~/.config/invoice/pdfminer.jar
	chmod +x invoice
	cp invoice ~/bin