mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
Added pre-commit hooks
This commit is contained in:
14
.pre-commit-config.yaml
Normal file
14
.pre-commit-config.yaml
Normal 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
|
||||
@@ -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"' ';'
|
||||
```
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# `jdupes`
|
||||
# Jdupes
|
||||
|
||||
## TL;DR
|
||||
|
||||
|
||||
1
knowledge base/pdfgrep.md
Normal file
1
knowledge base/pdfgrep.md
Normal file
@@ -0,0 +1 @@
|
||||
# PDFGrep
|
||||
Reference in New Issue
Block a user