![]() If you want to loop files in directory, I think you can figure it out by yourself. Run this code like this python exif2csv.py -i wifi.jpg -o demo_csv.csv # writer.writerow()Įxif_data = pyexiv2.ImageMetadata(imageFile)Ĭam_a = exif_data.valueĬam_b = exif_data.valueĬam_c = exif_data.valueĮxif_data = pyexiv2.ExifTag(ekey, evalue) # for line in open(inputfile).readlines(): Writer.writerow(.value,Įxif_data.value,Įxif_data.value]) Outputfile = fatherdir + '/' + parser_argument.outfile Outfilepaths = os.path.split(parser_argument.outfile) Inputfile = fatherdir + '/' + parser_argument.infile # 'C:\User\lenovo\Desktop\pakistan.txt' -> Infilepaths = os.path.split(parser_argument.infile) Parser.add_argument("-o", action="store", dest="outfile") Parser.add_argument("-i", action="store", dest="infile") Parser = argparse.ArgumentParser(description="Change the txt file to csv.") I am new to python, so please if you could keep it simple when you hint at what I should do. I've tried moving around the bottom for, but I just can't seem to get it to work. ![]() It crates the file, but it is just blank. ![]() ![]() This is what I have so far, but I just dont understand how to actually get the data into the file. NewFileObj.write(DateTime+', '+CamMake+', '+CamModel+'\r\n')Įnd = raw_input("Press Enter to Finish: ") NewFileObj = open('C:\\users\\wilson\\desktop\\Metadata.csv', 'w')ĮXIFData = pyexiv2.ImageMetadata(imageFile)ĭateTime = EXIFData How do I get more that one row in the CSV file I am looking for the latitude, longitude and GPSTime. exiftool -ee -t -csv test1.mp4 > test1.csv. Print "Enter the full path to the directory that your images are conatined in." I am trying to extract the Metadata from an MP4 to a CSV file, but the CSV file has only one line (see attached CSV file). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |