class documentation
class GitModifier(object):
Stores authorship/committer information
| Static Method | keys |
Undocumented |
| Method | __getitem__ |
Undocumented |
| Method | __init__ |
No summary |
| Method | get |
Undocumented |
| Method | get |
Get env vars for authorship information |
| Method | get |
Get env vars for committer information |
| Method | get |
Return date as a git raw date |
| Method | items |
Undocumented |
| Method | set |
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 |
Return the date's UTC offset |
| Method | _get |
Get author or committer information as env var dictionary |
| Method | _parse |
Undocumented |
| Instance Variable | _date |
Undocumented |
| Parameters | |
| name:str | the modifier's name |
| email:str | the modifier's email |
| date:str (git raw date), int (timestamp) or datetime object | the date of the modification |
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 | |
| dict | Author information suitable to use as environment variables |