#!/usr/bin/env python
from __future__ import print_function
import gitnb
import gitnb.config as con


#########################################################################
#
# GITNB: 
#   -   This file is automatically created/append to .git/hooks/pre-commit 
#       upon gitnb.install().
#   -   Upon commiting:
#       - all notebooks will be converted to .nbpy.py files
#       - if AUTO_ADD_NBPY==True:
#           .nbpy.py files are added to the repo
#   
#########################################################################


#
# CONVERT
#
if con.fig('AUTO_TRACK_ALL_NOTEBOOKS'):
    gitnb.add('.')


if con.fig('UPDATE_ON_COMMIT'):
    gitnb.update()


