annotate wk.py @ 419:f4629148e72e

web: Add the list of users in the special pages section.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 22 Mar 2017 18:35:31 -0700
parents 2dd7535045eb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
158
e53a3b64dfd8 Renamed main Wikked script.
Ludovic Chabant <ludovic@chabant.com>
parents: 151
diff changeset
1 #!/usr/local/bin/python
214
2dd7535045eb Print logging to `stdout`.
Ludovic Chabant <ludovic@chabant.com>
parents: 207
diff changeset
2 import sys
131
9d22cf4d2412 Massive change that should have been several smaller ones, but whatever:
Ludovic Chabant <ludovic@chabant.com>
parents: 129
diff changeset
3 import logging
207
c6dd9b0c5009 Make logging start right away in `witch`.
Ludovic Chabant <ludovic@chabant.com>
parents: 168
diff changeset
4 import colorama
c6dd9b0c5009 Make logging start right away in `witch`.
Ludovic Chabant <ludovic@chabant.com>
parents: 168
diff changeset
5 from wikked.witch import ColoredFormatter, main
0
c946f4facfa2 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
6
c946f4facfa2 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
7
168
a71822a4beed Refactoring to not better use Flask, only when needed:
Ludovic Chabant <ludovic@chabant.com>
parents: 158
diff changeset
8 # Configure logging.
207
c6dd9b0c5009 Make logging start right away in `witch`.
Ludovic Chabant <ludovic@chabant.com>
parents: 168
diff changeset
9 colorama.init()
c6dd9b0c5009 Make logging start right away in `witch`.
Ludovic Chabant <ludovic@chabant.com>
parents: 168
diff changeset
10 root_logger = logging.getLogger()
214
2dd7535045eb Print logging to `stdout`.
Ludovic Chabant <ludovic@chabant.com>
parents: 207
diff changeset
11 handler = logging.StreamHandler(stream=sys.stdout)
207
c6dd9b0c5009 Make logging start right away in `witch`.
Ludovic Chabant <ludovic@chabant.com>
parents: 168
diff changeset
12 handler.setFormatter(ColoredFormatter('%(message)s'))
c6dd9b0c5009 Make logging start right away in `witch`.
Ludovic Chabant <ludovic@chabant.com>
parents: 168
diff changeset
13 root_logger.addHandler(handler)
112
a65cedc183d6 Added more functions to the `manage` CLI tool.
Ludovic Chabant <ludovic@chabant.com>
parents: 108
diff changeset
14
a65cedc183d6 Added more functions to the `manage` CLI tool.
Ludovic Chabant <ludovic@chabant.com>
parents: 108
diff changeset
15
0
c946f4facfa2 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
16 if __name__ == "__main__":
168
a71822a4beed Refactoring to not better use Flask, only when needed:
Ludovic Chabant <ludovic@chabant.com>
parents: 158
diff changeset
17 main()
158
e53a3b64dfd8 Renamed main Wikked script.
Ludovic Chabant <ludovic@chabant.com>
parents: 151
diff changeset
18