# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
importnumpyasnp
importos
importhashlib
fromoptparseimportOptionParser,Option
parser=OptionParser()
parser.add_option("--input",type=str,help="A calibrated frame file, a filters file, a hash (either full or first 7 characters), or an integer. The program attempts to find a filters file with the same sha256 checksum as the input.")
parser.add_option("--primary-directory",type=str,default="/home/cal/archive/",help="Path to directory where program should begin searching")
parser.add_option("--no-home-directory",action="store_true",help="If set, the program will not check your home directory.")
options,filenames=parser.parse_args()
inp=options.input
primary_dir=options.primary_directory
#
# Function definition to get sha256 checksum of a file