class documentation

class GitModifier(object):

View In Hierarchy

Stores authorship/committer information

Static Method keys Undocumented
Method __getitem__ Undocumented
Method __init__ No summary
Method get Undocumented
Method get_author_env Get env vars for authorship information
Method get_committer_env Get env vars for committer information
Method get_date Return date as a git raw date
Method items Undocumented
Method set_date Set date from timestamp, git raw date or datetime object
Class Variable date Undocumented
Instance Variable email Undocumented
Instance Variable name Undocumented
Property datetime Return the date as datetime object
Property tz_offset Return the date's UTC offset
Method _get_env Get author or committer information as env var dictionary
Method _parse_date Undocumented
Instance Variable _date Undocumented
@staticmethod
def keys():

Undocumented

def __getitem__(self, key):

Undocumented

def __init__(self, name=None, email=None, date=None):
Parameters
name:strthe modifier's name
email:strthe modifier's email
date:str (git raw date), int (timestamp) or datetime objectthe date of the modification
def get(self, key, default=None):

Undocumented

def get_author_env(self):

Get env vars for authorship information

>>> g = GitModifier("Joey Ramone", "joey@example.com")
>>> g.get_author_env()['GIT_AUTHOR_EMAIL']
'joey@example.com'
>>> g.get_author_env()['GIT_AUTHOR_NAME']
'Joey Ramone'
Returns
dictAuthor information suitable to use as environment variables
def get_committer_env(self):

Get env vars for committer information

>>> g = GitModifier("Joey Ramone", "joey@example.com")
>>> g.get_committer_env()['GIT_COMMITTER_EMAIL']
'joey@example.com'
>>> g.get_committer_env()['GIT_COMMITTER_NAME']
'Joey Ramone'
Returns
dictCommitter information suitable to use as environment variables
def get_date(self):

Return date as a git raw date

def items(self):

Undocumented

def set_date(self, date):

Set date from timestamp, git raw date or datetime object

date =

Undocumented

email =

Undocumented

name =

Undocumented

@property
datetime =

Return the date as datetime object

@property
tz_offset =

Return the date's UTC offset

def _get_env(self, who):

Get author or committer information as env var dictionary

def _parse_date(self, date):

Undocumented

_date =

Undocumented