# Path: bibstuff/bibadd.py
# def make_entry(choosetype='', options=False, extras=False):
# def make_entry_citekey(entry, used_citekeys,style=label_style1):
# def is_macro(s):
# def text_format(entry):
# def get_journal(entry, jrnl_lst=None): #TODO: extract fr journal list
# def get_volnum(entry):
# def get_pages(entry,dash='--',pagespref=('p. ','pp. ')):
# def html_format(entry):


import os
import sys
import shutil
import logging
from bibstuff.bibadd import (bibadd_logger, make_entry, html_format, text_format)
	from optparse import OptionParser
					  help="Print DEBUG messages to stdout, default=%default")
	parser.add_option("-t", "--type", action="store",
	                  dest="entry_type", default='',
					  help="set type of entry", metavar="ENTRYTYPE")
	parser.add_option("-o", "--outfile", action="store", type="string", dest="outfile",
					  help="Write formatted references to FILE", metavar="FILE")
	parser.add_option("-n", "--nuke", action="store_true", dest="overwrite", default=False,
					  help="CAUTION! silently overwrite outfile, default=%default")
	parser.add_option("-b", "--backup", action="store_true", dest="backup", default=False,
					  help="backup FILE to FILE.bak, default=%default")

	"""
	#TODO:
	parser.add_option("-I", "--ISBN", action="store", dest="ISBN", default=False,
					  help="use pyaws to add one entry by ISBN, default=%default")
	parser.add_option("-m", "--maxnames", action="store", type="int",
					  dest="maxnames",  default = 2, help="Max names to add to key")
	parser.add_option("-e", "--etal", action="store", type="string", \
					  dest="etal",  default = 'etal',help="What to add after max names")
	parser.add_option("-i", "--infile", action="store", type="string", dest="infile",
					  help="Parse FILE for citation references.", metavar="FILE")
	parser.add_option("-s", "--stylefile", action="store", dest="stylefile", default="default.py",
					  help="Specify user-chosen style file",metavar="FILE")
	"""

	# get options
	(options, args) = parser.parse_args()
	if options.verbose:
		bibadd_logger.setLevel(logging.INFO)
	if options.very_verbose:

# Path: bibstuff/bibadd.py
# def make_entry(choosetype='', options=False, extras=False):
# def make_entry_citekey(entry, used_citekeys,style=label_style1):
# def is_macro(s):
# def text_format(entry):
# def get_journal(entry, jrnl_lst=None): #TODO: extract fr journal list
# def get_volnum(entry):
# def get_pages(entry,dash='--',pagespref=('p. ','pp. ')):
# def html_format(entry):


# Path: scripts/add2bib.py
import os
import sys
import shutil
import logging
from bibstuff.bibadd import (bibadd_logger, make_entry, html_format, text_format)
	from optparse import OptionParser

					  help="Print DEBUG messages to stdout, default=%default")
	parser.add_option("-t", "--type", action="store",
	                  dest="entry_type", default='',
					  help="set type of entry", metavar="ENTRYTYPE")
	parser.add_option("-o", "--outfile", action="store", type="string", dest="outfile",
					  help="Write formatted references to FILE", metavar="FILE")
	parser.add_option("-n", "--nuke", action="store_true", dest="overwrite", default=False,
					  help="CAUTION! silently overwrite outfile, default=%default")
	parser.add_option("-b", "--backup", action="store_true", dest="backup", default=False,
					  help="backup FILE to FILE.bak, default=%default")

	"""
	#TODO:
	parser.add_option("-I", "--ISBN", action="store", dest="ISBN", default=False,
					  help="use pyaws to add one entry by ISBN, default=%default")
	parser.add_option("-m", "--maxnames", action="store", type="int",
					  dest="maxnames",  default = 2, help="Max names to add to key")
	parser.add_option("-e", "--etal", action="store", type="string", \
					  dest="etal",  default = 'etal',help="What to add after max names")
	parser.add_option("-i", "--infile", action="store", type="string", dest="infile",
					  help="Parse FILE for citation references.", metavar="FILE")
	parser.add_option("-s", "--stylefile", action="store", dest="stylefile", default="default.py",
					  help="Specify user-chosen style file",metavar="FILE")
	"""

	# get options
	(options, args) = parser.parse_args()
	if options.verbose:
		bibadd_logger.setLevel(logging.INFO)
	if options.very_verbose:

		bibadd_logger.setLevel(logging.DEBUG)