Commit e73e4dc3717370b19385f88575b5c8baaf11a9a7

Authored by decalage2
1 parent 34d3f3fd

oledir: added main to make it a CLI script (issue #69)

oletools/oledir.py
... ... @@ -113,7 +113,7 @@ def sid_display(sid):
113 113  
114 114 # === MAIN ===================================================================
115 115  
116   -if __name__ == '__main__':
  116 +def main():
117 117 # print banner with version
118 118 print('oledir %s - http://decalage.info/python/oletools' % __version__)
119 119  
... ... @@ -182,3 +182,5 @@ if __name__ == '__main__':
182 182 # print t
183 183  
184 184  
  185 +if __name__ == '__main__':
  186 + main()
185 187 \ No newline at end of file
... ...
setup.py
... ... @@ -268,6 +268,7 @@ entry_points = {
268 268 'mraptor=oletools.mraptor:main',
269 269 'olebrowse=oletools.olebrowse:main',
270 270 'oleid=oletools.oleid:main',
  271 + 'oledir=oletools.oledir:main',
271 272 'pyxswf=oletools.pyxswf:main'
272 273 ],
273 274 }
... ...