Skip to content

Commit

Permalink
extend README.md, provide German translation
Browse files Browse the repository at this point in the history
  • Loading branch information
joheli committed Feb 16, 2024
1 parent 5bef9b2 commit ad406a3
Show file tree
Hide file tree
Showing 3 changed files with 119 additions and 14 deletions.
63 changes: 50 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,67 @@

![Python Packaging](https://github.com/joheli/rosinenpicker/workflows/Packaging/badge.svg) ![PyPI](https://img.shields.io/pypi/v/rosinenpicker?label=PyPI) ![PyPI - Downloads](https://img.shields.io/pypi/dm/rosinenpicker)

'Rosinenpicker' is German for 'cherry picker' (never mind that 'Rosine' actually means *raisin*). Be it as it may - cherry picking is what `rosinenpicker` has been designed to do. It goes through a list of documents to extract *just those juicy bits* **you** are interested in. It uses regular expressions to accomplish this. But please do read on to learn how to use the program.
[Deutsch](README_DE.md)

# Installation
# Manual

Please fire up your console and type:
Welcome to `rosinenpicker`! This tool is like a magical sieve that helps you find golden nuggets (or "Rosinen") of information within a mountain of documents. It's designed for anyone who needs to extract specific pieces of information without diving deep into the technicalities.

```
pip install rosinenpicker
```
## Understanding Key Terms

This should add the executable `rosinenpicker` to `PATH`, making it accessible from the console.
- **Command Line**: A text-based interface to operate your computer. Imagine telling your computer exactly what to do by typing in commands.
- **YAML**: A simple configuration file format used by `rosinenpicker` to understand your instructions. It's easy to read and write.
- **Arguments**: Special instructions you provide to `rosinenpicker` when you start it, telling it where to find its instructions (YAML file) and where to store its findings.

# Usage
## Getting Started

Please type
1. **Installation**: First, let's bring `rosinenpicker` to your computer. Open your command line and type:

```
pip install rosinenpicker
```

2. **Running the Program**: To launch `rosinenpicker`, enter the following:

```
rosinenpicker -c path/to/your_config.yml -d path/to/your_database.db
```

Replace `path/to/your_config.yml` with the actual path to your configuration file, and `path/to/your_database.db` with where you'd like to save the findings. (If not specified, the configuration and database files are assumed to be `config.yml` and `matches.db` in your current directory; also, the database is automatically created if it is not present on your system.)

## Creating Your YAML Configuration

Here's a sample configuration to guide `rosinenpicker`:

```yaml
title: 'My Document Search'
strategies:
strategy1:
processed_directory: '/path/to/documents'
file_name_pattern: '.*\.pdf'
file_format: 'pdf'
terms:
term1: 'apple pie'
export_format: 'csv'
export_path: '/path/to/export.csv'
```
rosinenpicker -c config_file -d database_file
```
where `config_file` (default: `config.yml`) and `database_file` (default: `matches.db`) represent a yml-formatted configuration file (please see sample [config.yml](configs/config.yml), which is more or less self-explanatory) and a sqlite database file (automatically created if not present), respectively.
This tells `rosinenpicker` to look in `/path/to/documents` for PDF files containing "apple pie" and save results in a CSV file at `/path/to/export.csv`. Fur further information, check out the [sample configuration file](configs/config.yml) in this repository - the file contains additional comments you may find useful.

## Using `rosinenpicker`

With your `config.yml` ready, go back to the command line and run `rosinenpicker` with the `-c` and `-d` arguments as shown above.

## Help and Options

For help type
For a list of commands and options, type:

```
rosinenpicker -h
```

This command displays all you need to know to navigate `rosinenpicker`.

## Conclusion

You're all set to explore and extract valuable information with `rosinenpicker`. Happy information hunting!
68 changes: 68 additions & 0 deletions README_DE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# rosinenpicker

![Python Packaging](https://github.com/joheli/rosinenpicker/workflows/Packaging/badge.svg) ![PyPI](https://img.shields.io/pypi/v/rosinenpicker?label=PyPI) ![PyPI - Downloads](https://img.shields.io/pypi/dm/rosinenpicker)

[English](README.md)

# Handbuch

Willkommen bei `rosinenpicker`! Dieses Werkzeug ist wie ein magisches Sieb, das Ihnen hilft, goldene Informationsnuggets (oder "Rosinen") in einem Berg von Dokumenten zu finden. Es ist für jeden gedacht, der spezifische Informationen extrahieren muss, ohne sich in technische Details zu vertiefen.

## Schlüsselbegriffe verstehen

- **Kommandozeile**: Eine textbasierte Schnittstelle, um Ihren Computer zu bedienen. Stellen Sie sich vor, Ihrem Computer genau zu sagen, was er tun soll, indem Sie Befehle eingeben.
- **YAML**: Ein einfaches Konfigurationsdateiformat, das von `rosinenpicker` verwendet wird, um Ihre Anweisungen zu verstehen. Es ist leicht zu lesen und zu schreiben.
- **Argumente**: Spezielle Anweisungen, die Sie `rosinenpicker` beim Start geben, um ihm zu sagen, wo es seine Anweisungen (YAML-Datei) finden und wo es seine Funde speichern soll.

## Erste Schritte

1. **Installation**: Zuerst bringen wir `rosinenpicker` auf Ihren Computer. Öffnen Sie Ihre Kommandozeile und tippen Sie:

```
pip install rosinenpicker
```

2. **Das Programm ausführen**: Um `rosinenpicker` zu starten, geben Sie folgendes ein:

```
rosinenpicker -c pfad/zu/ihrem_config.yml -d pfad/zu/ihrer_datenbank.db
```

Ersetzen Sie `pfad/zu/ihrem_config.yml` mit dem tatsächlichen Pfad zu Ihrer Konfigurationsdatei und `pfad/zu/ihrer_datenbank.db` mit dem Ort, an dem Sie die Funde speichern möchten. (Wenn nicht anders angegeben, wird davon ausgegangen, dass die Konfigurations- und Datenbankdateien `config.yml` und `matches.db` in Ihrem aktuellen Verzeichnis sind; außerdem wird die Datenbank automatisch erstellt, wenn sie nicht auf Ihrem System vorhanden ist.)

## Ihre YAML-Konfiguration erstellen

Hier ist eine Beispielkonfiguration, die `rosinenpicker` leitet:

```yaml
title: 'Meine Dokumentsuche'
strategies:
strategy1:
processed_directory: '/pfad/zu/dokumenten'
file_name_pattern: '.*\.pdf'
file_format: 'pdf'
terms:
term1: 'Apfelkuchen'
export_format: 'csv'
export_path: '/pfad/zu/export.csv'
```
Dies sagt `rosinenpicker`, in `/pfad/zu/dokumenten` nach PDF-Dateien zu suchen, die "Apfelkuchen" enthalten, und die Ergebnisse in einer CSV-Datei unter `/pfad/zu/export.csv` zu speichern. Weitere Informationen finden Sie in der [Beispielkonfigurationsdatei](configs/config.yml) in diesem Repository - die Datei enthält zusätzliche Kommentare, die Sie nützlich finden könnten.

## `rosinenpicker` verwenden

Mit Ihrer fertigen `config.yml` kehren Sie zur Kommandozeile zurück und führen `rosinenpicker` mit den Argumenten `-c` und `-d` wie oben gezeigt aus.

## Hilfe und Optionen

Für eine Liste der Befehle und Optionen tippen Sie:

```
rosinenpicker -h
```

Dieser Befehl zeigt alles an, was Sie wissen müssen, um `rosinenpicker` zu navigieren.

## Schlussfolgerung

Sie sind jetzt bereit, mit `rosinenpicker` wertvolle Informationen zu erkunden und zu extrahieren. Viel Erfolg bei der Informationssuche!
2 changes: 1 addition & 1 deletion src/rosinenpicker/start.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.1.0'
__version__ = '0.1.1'
import yaml
import re
import os
Expand Down

0 comments on commit ad406a3

Please sign in to comment.