plugins: photos: videos: add PELICAN_SKIPTAG

Allows to tag output filenames with a given tag. Such a tag
is checked before processing new files with the result of
skipping files already tagged. Using SKIPTAG allows to feed
photos and videos using their related output directories and
being guaranteed not to process files multiple times.

clean_skiptag.sh is generated upon completion, if sourced it
removes original files from the gallery.

SKIPTAG was designed to allow:

  INSTALLDIR_PHOTOS=PELICAN_PHOTO_GALLERY

and

  INSTALLDIR_VIDEOS=PELICAN_VIDEO_GALLERY
diff --git a/pelicanconf.py b/pelicanconf.py
index d3b4035..e2b523b 100644
--- a/pelicanconf.py
+++ b/pelicanconf.py
@@ -29,6 +29,9 @@
 _PATH = os.getenv('PELICAN_CONTENT')
 PATH = _PATH
 
+# Where to output the generated files
+OUTPUT_PATH = 'output'
+
 # Local path to the current theme folder
 THEME = 'theme'
 
@@ -213,14 +216,17 @@
 PHOTO_LIBRARY = os.getenv('PELICAN_PHOTO_LIBRARY')
 PHOTO_EXCLUDE = os.getenv('PELICAN_PHOTO_EXCLUDE')
 PHOTO_EXCLUDEALL = os.getenv('PELICAN_PHOTO_EXCLUDEALL')
+PHOTO_SKIPTAG = os.getenv('PELICAN_PHOTO_SKIPTAG')
 PHOTO_GALLERY = (2000, 1333, 100)
 PHOTO_ARTICLE = (2000, 1333, 100)
 PHOTO_THUMB = (300, 200, 100)
 PHOTO_SQUARE_THUMB = False
+PHOTO_RESIZE_JOBS = os.cpu_count()
 
 # Videos plugin
 VIDEO_LIBRARY = os.getenv('PELICAN_VIDEO_LIBRARY')
 VIDEO_EXCLUDE = os.getenv('PELICAN_VIDEO_EXCLUDE')
 VIDEO_EXCLUDEALL = os.getenv('PELICAN_VIDEO_EXCLUDEALL')
+VIDEO_SKIPTAG = os.getenv('PELICAN_VIDEO_SKIPTAG')
 VIDEO_GALLERY = (720, 400, 100)
 VIDEO_ARTICLE = (720, 400, 100)