This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Function to show help | |
usage() { | |
echo "Usage: $0 [-h] -s <source> -d <destination>" | |
echo " -h, --help Show this help message and exit." | |
echo " -s, --source Specify the source directory or file." | |
echo " -d, --destination Specify the destination directory." | |
return 1 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Function to check if a device file exists and is an HDD | |
is_valid_device() { | |
if ! test -b "$DEVICE"; then | |
echo "Error: '$DEVICE' is not a valid block device." | |
return 1 | |
fi | |
if ! grep -q "$DEVICE" /proc/partitions; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
/** | |
* files-by-type.php - get metadata from files readable with exiftool | |
* and presents options for renaming | |
* creates cache files, metadata.ser | |
* | |
* https://www.sno.phy.queensu.ca/~phil/exiftool/#filename | |
* see https://www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* get-rename.php - get metadata from files readable with exiftool | |
* and presents options for renaming | |
* creates cache files, metadata.ser | |
* | |
* https://www.sno.phy.queensu.ca/~phil/exiftool/#filename | |
* see https://www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html | |
* | |
* relies on command-line tools, tested on MacOS. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* get-rename.php - get metadata from files readable with exiftool | |
* and presents options for renaming | |
* creates cache files, metadata.ser | |
* | |
* https://www.sno.phy.queensu.ca/~phil/exiftool/#filename | |
* see https://www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html | |
* | |
* relies on command-line tools, tested on MacOS. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* pdf-linearize.php - linearize PDFs | |
* WARNING: May run extremely slowly due to very large file sizes generated on pdf2ps | |
* | |
* relies on command-line tools, tested on ubuntu. | |
* | |
* @license GPLv3 (http://www.gnu.org/licenses/gpl-3.0.html) | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* get-rename.php - get metadata from files readable with exiftool | |
* and presents options for renaming | |
* creates cache files, metadata.ser | |
* | |
* https://www.sno.phy.queensu.ca/~phil/exiftool/#filename | |
* see https://www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html | |
* | |
* relies on command-line tools, tested on MacOS. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* get-metadata.php - get metadata from files readable with exiftool | |
* creates 2 cache files, metadata.ser and metadata.old.ser | |
* where old.ser is the old version of metadata.ser for comparison | |
* | |
* https://www.sno.phy.queensu.ca/~phil/exiftool/#filename | |
* see https://www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html | |
* | |
* relies on command-line tools, tested on MacOS. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* pdf_rename_metadata.php - get metadata from files readable with exiftool and rename | |
* creates 2 cache files, metadata.ser and metadata.old.ser | |
* where old.ser is the old version of metadata.ser for comparison | |
* | |
* https://www.sno.phy.queensu.ca/~phil/exiftool/#filename | |
* see https://www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html | |
* | |
* relies on command-line tools, tested on MacOS. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* pdf-compress.php - re-compress PDFs, shrinking if possible | |
* WARNING: May run extremely slowly due to very large file sizes generated on pdf2ps | |
* | |
* relies on command-line tools, tested on ubuntu. | |
* | |
* @license GPLv3 (http://www.gnu.org/licenses/gpl-3.0.html) | |
*/ |