markdown 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/usr/bin/env python
  2. """
  3. Python Markdown, the Command Line Script
  4. ========================================
  5. This is the command line script for Python Markdown.
  6. Basic use from the command line:
  7. markdown source.txt > destination.html
  8. Run "markdown --help" to see more options.
  9. See markdown/__init__.py for information on using Python Markdown as a module.
  10. ## Authors and License
  11. Started by [Manfred Stienstra](http://www.dwerg.net/). Continued and
  12. maintained by [Yuri Takhteyev](http://www.freewisdom.org), [Waylan
  13. Limberg](http://achinghead.com/) and [Artem Yunusov](http://blog.splyer.com).
  14. Contact: markdown@freewisdom.org
  15. Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later)
  16. Copyright 200? Django Software Foundation (OrderedDict implementation)
  17. Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b)
  18. Copyright 2004 Manfred Stienstra (the original version)
  19. License: BSD (see docs/LICENSE for details).
  20. """
  21. import logging
  22. from markdown import COMMAND_LINE_LOGGING_LEVEL
  23. from markdown import commandline
  24. # Setup a logger manually for compatibility with Python 2.3
  25. logger = logging.getLogger('MARKDOWN')
  26. logger.setLevel(COMMAND_LINE_LOGGING_LEVEL)
  27. logger.addHandler(logging.StreamHandler())
  28. if __name__ == '__main__':
  29. commandline.run()