Added pre-commit hooks

This commit is contained in:
Michele Cereda
2022-04-24 15:27:47 +02:00
parent e2f2dbfec8
commit 8a255d17fe
12 changed files with 35 additions and 20 deletions

14
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,14 @@
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: trailing-whitespace
args:
- --markdown-linebreak-ext=md # ignore markdown's line break
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

View File

@@ -37,9 +37,9 @@ find . -type f -print0 | xargs -0 -n 1 -P $(nproc) grep 'pattern'
For simple searches, you might want to use [pdfgrep].
Should you need more advanced grep capabilities not incorporated by pdfgrep, you might want to convert the file to text and search there.
You can to this using [`pdftotext`](pdfgrep.md) as shown in this example ([source][stackoverflow answer about how to search contents of multiple pdf files]):
You can to this using [pdftotext](pdfgrep.md) as shown in this example ([source][stackoverflow answer about how to search contents of multiple pdf files]):
```sh
```shell
find /path -name '*.pdf' -exec sh -c 'pdftotext "{}" - | grep --with-filename --label="{}" --color "your pattern"' ';'
```

View File

@@ -1,4 +1,4 @@
# `jdupes`
# Jdupes
## TL;DR

View File

@@ -0,0 +1 @@
# PDFGrep