
import sys
sys.path.append('.')

from vacker.importer import Importer

importer = Importer()
# Need to obtain from arguments
importer.import_directory('../sample_photos')


import sys
sys.path.append('.')
import argparse

from vacker.importer import Importer


parser = argparse.ArgumentParser(description='Process some integers.')
parser.add_argument('--directory', '-d', type=str, dest='directory',
                    help='Directory to import', required=True)

args = parser.parse_args()



importer = Importer()
# Need to obtain from arguments
importer.import_directory(args.directory)

Update imported to use arg parser
Update imported to use arg parser

  
  import sys
  sys.path.append('.')
+ import argparse
  
  from vacker.importer import Importer
  
+ 
+ parser = argparse.ArgumentParser(description='Process some integers.')
+ parser.add_argument('--directory', '-d', type=str, dest='directory',
+                     help='Directory to import', required=True)
+ 
+ args = parser.parse_args()
+ 
+ 
+ 
  importer = Importer()
  # Need to obtain from arguments
- importer.import_directory('../sample_photos')
+ importer.import_directory(args.directory)
  
Update imported to use arg parser
## Code Before:

import sys
sys.path.append('.')

from vacker.importer import Importer

importer = Importer()
# Need to obtain from arguments
importer.import_directory('../sample_photos')

## Instruction:
Update imported to use arg parser
## Code After:

import sys
sys.path.append('.')
import argparse

from vacker.importer import Importer


parser = argparse.ArgumentParser(description='Process some integers.')
parser.add_argument('--directory', '-d', type=str, dest='directory',
                    help='Directory to import', required=True)

args = parser.parse_args()



importer = Importer()
# Need to obtain from arguments
importer.import_directory(args.directory)
