Commit b30cbbff97e8556de4fcffdbf2d4e4a82cf6909b
1 parent
eaa43bb6
olemap: added main entry point for setup.py - issue #69
Showing
2 changed files
with
6 additions
and
2 deletions
oletools/olemap.py
| @@ -42,6 +42,7 @@ http://www.decalage.info/python/oletools | @@ -42,6 +42,7 @@ http://www.decalage.info/python/oletools | ||
| 42 | # 2015-11-01 v0.01 PL: - first version | 42 | # 2015-11-01 v0.01 PL: - first version |
| 43 | # 2016-01-13 v0.02 PL: - improved display with tablestream, added colors | 43 | # 2016-01-13 v0.02 PL: - improved display with tablestream, added colors |
| 44 | # 2016-07-20 v0.50 SL: - added Python 3 support | 44 | # 2016-07-20 v0.50 SL: - added Python 3 support |
| 45 | +# 2016-09-05 PL: - added main entry point for setup.py | ||
| 45 | 46 | ||
| 46 | __version__ = '0.50' | 47 | __version__ = '0.50' |
| 47 | 48 | ||
| @@ -89,7 +90,7 @@ FAT_COLORS = { | @@ -89,7 +90,7 @@ FAT_COLORS = { | ||
| 89 | 90 | ||
| 90 | # === MAIN =================================================================== | 91 | # === MAIN =================================================================== |
| 91 | 92 | ||
| 92 | -if __name__ == '__main__': | 93 | +def main(): |
| 93 | # print banner with version | 94 | # print banner with version |
| 94 | print('olemap %s - http://decalage.info/python/oletools' % __version__) | 95 | print('olemap %s - http://decalage.info/python/oletools' % __version__) |
| 95 | 96 | ||
| @@ -119,4 +120,5 @@ if __name__ == '__main__': | @@ -119,4 +120,5 @@ if __name__ == '__main__': | ||
| 119 | 120 | ||
| 120 | ole.close() | 121 | ole.close() |
| 121 | 122 | ||
| 122 | - | 123 | +if __name__ == '__main__': |
| 124 | + main() |
setup.py
| @@ -19,6 +19,7 @@ to install this package. | @@ -19,6 +19,7 @@ to install this package. | ||
| 19 | # 2016-02-08 v0.42 PL: - added colorclass, tablestream | 19 | # 2016-02-08 v0.42 PL: - added colorclass, tablestream |
| 20 | # 2016-07-19 v0.50 PL: - create CLI scripts using entry points (by 2*yo) | 20 | # 2016-07-19 v0.50 PL: - create CLI scripts using entry points (by 2*yo) |
| 21 | # 2016-07-29 PL: - use setuptools if available | 21 | # 2016-07-29 PL: - use setuptools if available |
| 22 | +# 2016-09-05 PL: - added more entry points | ||
| 22 | 23 | ||
| 23 | #--- TODO --------------------------------------------------------------------- | 24 | #--- TODO --------------------------------------------------------------------- |
| 24 | 25 | ||
| @@ -269,6 +270,7 @@ entry_points = { | @@ -269,6 +270,7 @@ entry_points = { | ||
| 269 | 'olebrowse=oletools.olebrowse:main', | 270 | 'olebrowse=oletools.olebrowse:main', |
| 270 | 'oleid=oletools.oleid:main', | 271 | 'oleid=oletools.oleid:main', |
| 271 | 'oledir=oletools.oledir:main', | 272 | 'oledir=oletools.oledir:main', |
| 273 | + 'olemap=oletools.olemap:main', | ||
| 272 | 'pyxswf=oletools.pyxswf:main' | 274 | 'pyxswf=oletools.pyxswf:main' |
| 273 | ], | 275 | ], |
| 274 | } | 276 | } |