Skip to content

Commit 81c12e4

Browse files
committed
ga
1 parent dbb4964 commit 81c12e4

20 files changed

+482
-81
lines changed

_config.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Site settings
2-
title: Mondrian
2+
title: Whistle
33
4-
description: Mondrian is a tiny package that auto-configures python.logging module witrh reasonable defaults and enhances its default output formatters for readability.
4+
description: Whistle is a simple python 3.5+ library that allow your application components to communicate with each other by dispatching events and listening to them.
55

66

77
baseurl: ""
8-
url: https://python-mondrian.github.io/ # the base hostname & protocol for your site
9-
git_address: https://github.com/python-mondrian/mondrian
10-
git_edit_address: https://github.com/python-mondrian/python-mondrian.github.io
8+
url: https://python-whistle.github.io/ # the base hostname & protocol for your site
9+
git_address: https://github.com/python-whistle/whistle
10+
git_edit_address: https://github.com/python-whistle/python-whistle.github.io
1111

1212
# theme options from https://bootswatch.com/
1313
# comment out this to use default Bootstrap

_includes/footer.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
</div>
77
</footer>
88

9-
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-4678258-18"></script>
9+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-4678258-16"></script>
1010
<script>
1111
window.dataLayer = window.dataLayer || [];
1212
function gtag(){dataLayer.push(arguments);}
1313
gtag('js', new Date());
14-
gtag('config', 'UA-4678258-18');
14+
15+
gtag('config', 'UA-4678258-16');
1516
</script>
1617

1718
<script async defer src="https://buttons.github.io/buttons.js"></script>

_includes/head.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@
1616
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
1717
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />
1818

19-
2019
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
2120
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
2221
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
2322
<link rel="manifest" href="/site.webmanifest">
2423
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
25-
<meta name="msapplication-TileColor" content="#da532c">
24+
<meta name="msapplication-TileColor" content="#00aba9">
2625
<meta name="theme-color" content="#ffffff">
2726

2827
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css">

_includes/topnav.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<span class="icon-bar"></span>
99
</button>
1010
<a class="navbar-brand" href="{{ site.baseurl }}/">
11-
<span><img src="{{site.baseurl}}/img/mondrian-logo.png"></span> {{ site.title }}
11+
<span><img src="{{site.baseurl}}/img/whistle-logo.png"></span> {{ site.title }}
1212
</a>
1313
</div>
1414
<div id="navbar" class="collapse navbar-collapse">

android-chrome-192x192.png

2.47 KB
Loading

android-chrome-256x256.png

-30.3 KB
Binary file not shown.

android-chrome-384x384.png

48.7 KB
Loading

apple-touch-icon.png

-88 Bytes
Loading

browserconfig.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<msapplication>
44
<tile>
55
<square150x150logo src="/mstile-150x150.png"/>
6-
<TileColor>#da532c</TileColor>
6+
<TileColor>#00aba9</TileColor>
77
</tile>
88
</msapplication>
99
</browserconfig>

favicon-16x16.png

28 Bytes
Loading

favicon-32x32.png

705 Bytes
Loading

favicon.ico

3 KB
Binary file not shown.

img/bg.jpg

69.3 KB
Loading

img/mondrian-logo.png

-18.4 KB
Binary file not shown.

img/whistle-logo.png

22.8 KB
Loading

index.html

+28-54
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212

1313
<div class="header-container jumbotron">
1414
<div class="container">
15-
<h1>Mondrian</h1>
16-
<h2>Python's logging module on steroids</h2>
17-
<p>Mondrian configures the python standard logging module with reasonable defaults, and enhance its default
18-
output formatters for better readability.</p>
15+
<h1>Whistle</h1>
16+
<h2>Event Dispatcher for Python</h2>
17+
18+
<p>Whistle is a simple tool that allow your application components to communicate with each other by dispatching
19+
events and listening to them.</p>
1920

2021
<p class="text-center">
21-
<a class="btn btn-primary btn-lg" href="https://pypi.org/project/mondrian/" target="_blank"
22+
<a class="btn btn-primary btn-lg" href="https://pypi.org/project/whistle/" target="_blank"
2223
role="button">Install</a>
2324
<a class="btn btn-primary btn-outline-inverse btn-lg" href="#documentation"
2425
role="button">Documentation</a>
@@ -31,35 +32,33 @@ <h2>Python's logging module on steroids</h2>
3132

3233
<div class="row">
3334
<div class="col-md-10">
34-
<h2 class="header-light regular-pad">What is Mondrian?</h2>
35+
<h2 class="header-light regular-pad">What is Whistle?</h2>
3536
<blockquote>
3637
<p>
37-
Mondrian is a small library that will make you use python <code>logging</code> module, once and for
38-
all.
38+
Whistle is an Event Dispatcher library for the Python 3.5+ language.
3939
</p>
4040
<p>
41-
Most python coders who avoids the systematic usage of <code>logging</code> in their projects does
42-
so because it feels complicated to setup, but it's not.
41+
It's largely inspired from Symfony's EventDispatcher component.
4342
</p>
4443
<p>
45-
Mondrian provides a one-call interface to its configuration, with pretty formatters that makes you
46-
feel great.
44+
Using an event dispatcher is a great way to write loosely coupled extensible code, having each part
45+
only communicate using light events.
4746
</p>
4847
</blockquote>
4948
</div>
5049
<div class="col-md-2 text-center">
5150
<br>
5251
<div class="clearfix">
5352
<div class="pull-left" style="margin-right:0.5em">
54-
<a class="github-button" href="https://github.com/python-mondrian/mondrian/fork"
55-
data-icon="octicon-repo-forked" data-size="large" aria-label="Fork Mondrian on GitHub"></a>
53+
<a class="github-button" href="https://github.com/python-whistle/whistle/fork"
54+
data-icon="octicon-repo-forked" data-size="large" aria-label="Fork Whistle on GitHub"></a>
5655
</div>
5756
<div class="pull-left">
58-
<a class="github-button" href="https://github.com/python-mondrian/mondrian" data-icon="octicon-star"
59-
data-size="large" data-show-count="true" aria-label="Star Mondrian on GitHub">Star</a>
57+
<a class="github-button" href="https://github.com/python-whistle/whistle" data-icon="octicon-star"
58+
data-size="large" data-show-count="true" aria-label="Star Whistle on GitHub">Star</a>
6059
</div>
6160
</div>
62-
<img src="img/mondrian-logo.png" alt="Mondrian, python's logging on steroids."
61+
<img src="img/whistle-logo.png" alt="Whistle, python's event dispatcher."
6362
class="img-responsive">
6463
<a name="documentation"></a>
6564
</div>
@@ -70,61 +69,36 @@ <h2 class="header-light regular-pad">What is Mondrian?</h2>
7069
<div class="row">
7170
<h2>Quick start</h2>
7271

73-
<p>Install the <code>mondrian</code> package:</p>
74-
75-
<pre><code> $ pip install mondrian</code></pre>
76-
77-
<p>In your project's entrypoints (for example, <code>&lt;yourpackage&gt;/__main__.py</code>, call
78-
<code>mondrian.setup()</code>:</p>
72+
<p>Install the <code>whistle</code> package:</p>
7973

80-
<pre><code class="python">import mondrian
81-
import logging
74+
<pre><code> $ pip install whistle</code></pre>
8275

83-
logger = logging.getLogger()
76+
<h3>Create an event dispatcher</h3>
8477

85-
def main():
86-
...
87-
logger.info('Hello')
88-
...
78+
<pre><code class="python">from whistle import EventDispatcher
8979

90-
if __name__ == '__main__':
91-
mondrian.setup(excepthook=True)
92-
logger.setLevel(logging.INFO)
93-
main()</code></pre>
80+
dispatcher = EventDispatcher()</code></pre>
9481

82+
<h3>Add a listener to react to events</h3>
9583

96-
<p>
97-
You can remove the <code>excepthook=True</code> if you don't want mondrian to override the default exception
98-
handler for better formating. But it's nice, try it first.
99-
</p>
100-
101-
<p>
102-
Now, use python's <code>logging</code> module in your project's files:
103-
</p>
84+
<pre><code class="python">def on_spectacle_starts(event):
85+
print('Please turn down your phones!')
10486

105-
<pre><code class="python">import logging
87+
dispatcher.add_listener('spectacle.starts', on_spectacle_starts)</code></pre>
10688

107-
logger = logging.getLogger(__name__)
89+
<h3>Dispatch it!</h3>
10890

109-
def some_very_nice_function():
110-
...
111-
logger.warning('Ola amigo!')
112-
...</code></pre>
91+
<pre><code class="python">dispatcher.dispatch('spectacle.starts')</code></pre>
11392

114-
<p>That's all, folks!</p>
11593

116-
<div class="text-center">
117-
<img src="img/example.png" style="max-width: 718px; margin: auto;" alt="Your python logger now looks like this"
118-
class="img-responsive">
119-
</div>
12094
</div>
12195

12296
<hr>
12397

12498
<div class="row">
12599
<h2>License</h2>
126100
<p>
127-
Mondrian and the surrounding material (like this website) is licensed under the Apache License, version 2.0.
101+
Whistle and the surrounding material (like this website) is licensed under the Apache License, version 2.0.
128102
</p>
129103
</div>
130104

mstile-150x150.png

-6.66 KB
Loading

python-whistle.github.io.iml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="RUBY_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$" />
6+
<orderEntry type="jdk" jdkName="ruby-2.3.3-p222" jdkType="RUBY_SDK" />
7+
<orderEntry type="sourceFolder" forTests="false" />
8+
</component>
9+
</module>

0 commit comments

Comments
 (0)