All Projects → ivandokov → Phockup

ivandokov / Phockup

Licence: mit
Media sorting tool to organize photos and videos from your camera in folders by year, month and day.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Phockup

GPUImage FilterVideo
录制美颜视频
Stars: ✭ 12 (-96.13%)
Mutual labels:  camera
Focus Points
Plugin for Lightroom to show which focus point was active in the camera when a photo was taken
Stars: ✭ 272 (-12.26%)
Mutual labels:  camera
Kyshutterbutton
KYShutterButton is a custom button that is similar to the shutter button of the camera app
Stars: ✭ 293 (-5.48%)
Mutual labels:  camera
laravel-spark-camera
Profile Photo Camera support for Laravel Spark
Stars: ✭ 30 (-90.32%)
Mutual labels:  camera
Ionic Ocr Example
📷 Simple Ionic app using ocrad.js
Stars: ✭ 263 (-15.16%)
Mutual labels:  camera
Android Camera2 Secret Picture Taker
Take pictures 📷 secretly (without preview or launching device's camera app) using Android CAMERA2 API
Stars: ✭ 275 (-11.29%)
Mutual labels:  camera
MCamera
CameraViewController which allows to take photos, set filters, peform image blurring and more.
Stars: ✭ 28 (-90.97%)
Mutual labels:  camera
Xiaopi
An Open Source Home Security Camera For Raspberry Pi
Stars: ✭ 311 (+0.32%)
Mutual labels:  camera
Pigeon
Pigeon is a simple 3D printed cloud home surveillance camera project that uses the new Raspberry Pi Zero W
Stars: ✭ 266 (-14.19%)
Mutual labels:  camera
Algorithms Visualiser
Algorithms Visualiser is an opensource project made using ReactJS. Visualise Algorithms on Sorting, Pathfinding, Searching, Word Search, Backtracking.
Stars: ✭ 290 (-6.45%)
Mutual labels:  sorting
Rtspallthethings
Deprecated RTSP media server -- Use github.com/aler9/rtsp-simple-server instead.
Stars: ✭ 258 (-16.77%)
Mutual labels:  camera
Pypylon
The official python wrapper for the pylon Camera Software Suite
Stars: ✭ 259 (-16.45%)
Mutual labels:  camera
Coco
基于kotlin、简洁易用的调用系统拍照或图片选择库
Stars: ✭ 276 (-10.97%)
Mutual labels:  camera
AndroidBackgroundVideoRecording
Records camera video in background service
Stars: ✭ 34 (-89.03%)
Mutual labels:  camera
Androidffmpeg
android 读取摄像头和麦克风,使用rtmp推流
Stars: ✭ 298 (-3.87%)
Mutual labels:  camera
raspberry pi home security system
Home monitoring system with a Raspberry Pi and sending notifications with a Telegram bot
Stars: ✭ 14 (-95.48%)
Mutual labels:  camera
Parallax Effect
🤹🏻‍♂️ Parallax effect in javascript using face tracking. An immersive view in 3d with webcam.
Stars: ✭ 275 (-11.29%)
Mutual labels:  camera
Goprostream
Tools for handling/displaying GoPro HTTP/UDP stream (Python/Ruby)
Stars: ✭ 311 (+0.32%)
Mutual labels:  camera
Stickercamera
This is an Android application with camera,picture cropping,collage sticking and tagging.贴纸标签相机,功能:拍照,相片裁剪,给图片贴贴纸,打标签。
Stars: ✭ 3,109 (+902.9%)
Mutual labels:  camera
Little Backup Box
Software that turns a single-board computer into a versatile and pocketable backup appliance
Stars: ✭ 278 (-10.32%)
Mutual labels:  camera

Phockup

Tests Deploy

Media sorting tool to organize photos and videos from your camera in folders by year, month and day.

How it works

The software will collect all files from the input directory and copy them to the output directory without changing the files content. It will only rename the files and place them in the proper directory for year, month and day.

All files which are not images or videos or those which do not have creation date information will be placed in a directory called unknown without file name change. By doing this you can be sure that the input directory can be safely deleted after the successful process completion because all files from the input directory have a copy in the output directory.

Installation

Linux (snap)

Requires snapd

sudo snap install phockup

Note: snap applications can access files only in your home and /media directories for security reasons. If your media files are not located in these directories you should use the installation method below.
If your files are in /media you should run the following command to allow access:

sudo snap connect phockup:removable-media

Linux (without snap)

If you are using distro which doesn't support snapd or you don't want to download the snap you can use the following commands to download the source and set it up

sudo apt-get install python3 libimage-exiftool-perl -y
curl -L https://github.com/ivandokov/phockup/archive/latest.tar.gz -o phockup.tar.gz
tar -zxf phockup.tar.gz
sudo mv phockup-* /opt/phockup
sudo ln -s /opt/phockup/phockup.py /usr/local/bin/phockup

Mac

Requires Homebrew

brew tap ivandokov/homebrew-contrib
brew install phockup

Windows

  • Download and install latest stable Python 3
  • Download Phockup's latest release and extract the archive
  • Download exiftool from the official website and extract the archive
  • Rename exiftool(-k).exe to exiftool.exe
  • Move exiftool.exe to phockup folder
  • Open Command Prompt and cd to phockup folder
  • Use the command below (use phockup.py instead of phockup)

Docker

docker run -v ~/Pictures:/mnt ivandokov/phockup:latest phockup /mnt/Input /mnt/Output [PHOCKUP ARGUMENTS]

The -v ~/Pictures:/mnt part of the command mounts your ~/Pictures directory to /mnt inside the container. You can pass any absolute path to be mounted to the container and later on be used as paths for the phockup command. The example above provides your ~/Pictures/Input as INPUTDIR and ~/Pictures/Output as OUTPUDIR. You can pass additional arguments afterwards.

Usage

Organize photos from one directory into another

phockup INPUTDIR OUTPUTDIR

INPUTDIR is the directory where your photos are located. OUTPUTDIR is the directory where your sorted photos will be stored. It could be a new not existing directory.

Example:

phockup ~/Pictures/camera ~/Pictures/sorted

Date format

If you want to change the output directories date format you can do it by passing the format as -d | --date argument. You can choose different year format (e.g. 17 instead of 2017) or decide to skip the day directories and have all photos sorted in year/month.

Supported formats:
    YYYY - 2016, 2017 ...
    YY   - 16, 17 ...
    MM   - 07, 08, 09 ...
    M    - July, August, September ...
    m    - Jul, Aug, Sept ...
    DD   - 27, 28, 29 ... (day of month)
    DDD  - 123, 158, 365 ... (day of year)

Example:
    YYYY/MM/DD -> 2011/07/17
    YYYY/M/DD  -> 2011/July/17
    YYYY/m/DD  -> 2011/Jul/17
    YY/m-DD    -> 11/Jul-17

Missing date information in EXIF

If any of the photos does not have date information you can use the -r | --regex option to specify date format for date extraction from filenames:

--regex="(?P<day>\d{2})\.(?P<month>\d{2})\.(?P<year>\d{4})[_-]?(?P<hour>\d{2})\.(?P<minute>\d{2})\.(?P<second>\d{2})"

As a last resort, specify the -t option to use the file modification timestamp. This may not be accurate in all cases but can provide some kind of date if you'd rather it not go into the unknown folder.

Move files

Instead of copying the process will move all files from the INPUTDIR to the OUTPUTDIR by using the flag -m | --move. This is useful when working with a big collection of files and the remaining free space is not enough to make a copy of the INPUTDIR.

Link files

Instead of copying the process will create hard link all files from the INPUTDIR into new structure in OUTPUTDIR by using the flag -l | --link. This is useful when working with good structure of photos in INPUTDIR (like folders per device).

Original filenames

Organize the files in selected format or using the default year/month/day format but keep original filenames by using the flag -o | --original-names.

Fix incorrect dates

If date extracted from photos is incorrect, you can use the -f | --date-field option to set the correct exif field to get date information from. Use this command to list which fields are available for a file:

exiftool -time:all -mimetype -j file.jpg

The output may look like this, but with more fields:

[{
  "DateTimeOriginal": "2017:10:06 01:01:01",
  "CreateDate": "2017:01:01 01:01:01",
]}

If the correct date is in DateTimeOriginal, you can include the option --date-field=DateTimeOriginal to get date information from it. To set multiple fields to be tried in order until a valid date is found, just join them with spaces in a quoted string like "CreateDate FileModifyDate".

Development

Running tests

To run the tests, first install the dev dependencies using

pip3 install -r requirements-dev.txt

Then run the tests using

pytest
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].