Update readme.md

This commit is contained in:
Lukas Hahmann 2017-11-30 22:49:59 +01:00 committed by GitHub
parent caf9b84a26
commit 4f214f84ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 53 additions and 6 deletions

View File

@ -2,30 +2,77 @@
Photorec does a great job when recovering deleted files. But the result is a huge, unsorted, unnamed amount of files. Especially for external hard drives serving as backup of all the personal data, sorting them is an endless job.
This program helps you sorting your files. First of all, the **files are copied to own folders for each file type**. Second, **jpgs are distinguished by the year, and optionally by month as well** when they have been taken **and by the event**. We thereby define an event as a time span during them photos are taken. It has a delta of 4 days without a photo to another event. If no date from the past can be detected, these jpgs are put into one folder to be sorted manually.
This program sPRF helps you sorting your files. First of all, the **files are copied to own folders for each file type**. Second, **jpgs are distinguished by the year, and optionally by month as well** when they have been taken **and by the event**. We thereby define an event as a time span during them photos are taken. It has a delta of 4 days without a photo to another event. If no date from the past can be detected, these jpgs are put into one folder to be sorted manually.
## Usage
## Installation
First install the package [exifread](https://pypi.python.org/pypi/ExifRead):
```pip install exifread```
## Run the sorter
Then run the sorter:
```python recovery.py <path to files recovered by Photorec> <destination>```
This copies the recovered file to their file type folder in the destination directory. The recovered files are not modified. If a file already exists in the destination directory, it is skipped. Hence you can interrupt the process with Ctrl+C and continue afterwards.
The first output of the programm is the number of files to copy. To count them might take some minutes depending on the amount of recovered files. Afterwareds you get some feedback every ~2000 processed files.
The first output of the programm is the number of files to copy. To count them might take some minutes depending on the amount of recovered files. Afterwareds you get some feedback on the processed files.
### Parameters
For an overview of all arguments, run with the `-h` option: ```python recovery.py -h```.
#### Max numbers of files per folder
All directories contain maximum 500 files. If one contains more, numbered subdirectories are created. If you want another file-limit, e.g. 1000, just put that number as third parameter to the execution of the programm:
```python recovery.py <path to files recovered by Photorec> <destination> -n1000```
For an overview of all arguments, run with the `-h` option: ```python recovery.py -h```.
#### Folder for each month
sPRF usually sorts your photos by year:
```
destination
|- 2015
|- 1.jpg
|- 2.jpg
|- ...
|- 2016
|- ...
```
Sometimes you might want to sort each year by month:
```python recovery.py <path to files recovered by Photorec> <destination> -m```
Now you get:
```
destination
|- 2015
|- 1
|- 1.jpg
|- 2.jpg
|- 2
|- 3.jpg
|- 4.jpg
|- ...
|- 2016
|- ...
```
#### Keep original filenames
Use the -k parameter to keep the original filenames:
```python recovery.py <path to files recovered by Photorec> <destination> -k```
## Adjust event distance
#### Adjust event distance
For the case you want to reduce or increase the timespan between events, simply adjust the variable ```minEventDelta``` in ```jpgHelper.py```. This variable contains the delta between events in seconds.
For the case you want to reduce or increase the timespan between events, simply use the parameter -d. The default is 4:
```python recovery.py <path to files recovered by Photorec> <destination> -d10```