2018-10-30 22:55:36 +10:00
|
|
|
{% extends "base.html" %}
|
|
|
|
{% block head %}
|
2018-10-31 01:42:02 +03:00
|
|
|
{{ super() }}
|
2018-10-30 22:55:36 +10:00
|
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
{{ super() }}
|
|
|
|
<ul class="nav nav-pills">
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link active" href="/">Users</a>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link" href="/conf">Conferences</a>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link" href="/stat">2ch.hk Stats</a>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link disabled" href="#">Disabled</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<br>
|
|
|
|
<hr>
|
2018-10-31 19:41:16 +03:00
|
|
|
<h4>{{ user_info.first_name }}'s user data</h4>
|
2018-10-30 22:55:36 +10:00
|
|
|
<hr>
|
|
|
|
<div class="card-columns">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
<h5 class="card-title">Identity</h5>
|
|
|
|
<hr>
|
|
|
|
<p class="card-text">
|
|
|
|
<b>First name: </b>{{ user_info.first_name }}<br>
|
|
|
|
<b>Last name: </b>{% if user_info.last_name != '_null' %}{{ user_info.last_name }}{% else %}
|
|
|
|
<span class="badge badge-warning">N/D</span>{% endif %}<br>
|
|
|
|
<b>Username: </b>{% if user_info.username != '_null' %}{{ user_info.username }}{% else %}
|
|
|
|
<span class="badge badge-warning">N/D</span>{% endif %}<br>
|
|
|
|
<b>Telegram ID: </b>{{ user_info.id }}<br>
|
|
|
|
<b>Firstly seen: </b>{{ user_info.first_date }}<br>
|
|
|
|
</p>
|
2018-10-28 13:07:06 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-10-30 22:55:36 +10:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
<h5 class="card-title">Activity</h5>
|
|
|
|
<hr>
|
|
|
|
<p class="card-text">
|
|
|
|
<b>First message: </b>{{ user_info.first_date }}<br>
|
|
|
|
<b>Last message: </b>{{ user_info.last_message }}<br>
|
|
|
|
<b>Days known: </b>{{ user_info.day_known }}<br>
|
|
|
|
<b>Word said: </b>{{ user_info.word_count }}<br>
|
2018-10-30 18:38:39 +03:00
|
|
|
<b>Messages sent: </b>{{ user_info.messages }}<br>
|
2018-10-30 22:55:36 +10:00
|
|
|
<b>Words per day: </b>{{ '%0.2f'| format((user_info.word_count / user_info.day_known)|float) }}<br>
|
|
|
|
<b>Words per message: </b>~{{ '%0.2f'| format(user_info.avg|float) }}<br>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
<h5 class="card-title">Top</h5>
|
|
|
|
<hr>
|
|
|
|
<p class="card-text">
|
2018-10-31 01:42:02 +03:00
|
|
|
<table class="table table-hover table-sm">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th scope="col">#</th>
|
|
|
|
<th scope="col">Word</th>
|
|
|
|
<th scope="col">Said</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for word in user_info.top %}
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{{ loop.index }}</th>
|
|
|
|
<td>{{ word[0] }}</td>
|
|
|
|
{% if not loop.last %}
|
2018-10-30 22:55:36 +10:00
|
|
|
{% if (word[1]/loop.nextitem[1]) > 2 %}
|
2018-10-31 01:42:02 +03:00
|
|
|
<td><span class="badge badge-danger" data-toggle="tooltip" data-placement="right" title="Must have been abused">{{
|
|
|
|
word[1] }} </span></td>
|
2018-10-30 22:55:36 +10:00
|
|
|
{% else %}
|
2018-10-31 01:42:02 +03:00
|
|
|
<td><span class="badge badge-secondary">{{ word[1] }} </span></td>
|
2018-10-30 22:55:36 +10:00
|
|
|
{% endif %}
|
2018-10-31 01:42:02 +03:00
|
|
|
{% else %}
|
2018-10-30 22:55:36 +10:00
|
|
|
<td><span class="badge badge-secondary">{{ word[1] }} </span></td>
|
2018-10-31 01:42:02 +03:00
|
|
|
{% endif %}
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2018-10-30 22:55:36 +10:00
|
|
|
</div>
|
2018-10-28 13:07:06 +03:00
|
|
|
</div>
|
2018-10-30 22:55:36 +10:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
<h5 class="card-title">Chats</h5>
|
|
|
|
<p class="card-text">
|
2018-10-31 01:42:02 +03:00
|
|
|
<table class="table table-hover table-sm">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th scope="col">#</th>
|
|
|
|
<th scope="col">Chat</th>
|
|
|
|
<th scope="col">Words</th>
|
|
|
|
<th scope="col">Messages</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for chat in user_info.chats %}
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{{ loop.index }}</th>
|
|
|
|
<td>{{ chat[0] }}</td>
|
|
|
|
<td><span class="badge badge-secondary">{{ chat[1] }} </span></td>
|
|
|
|
<td><span class="badge badge-secondary">{{ chat[3] }} </span></td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2018-10-30 22:55:36 +10:00
|
|
|
</div>
|
2018-10-28 13:07:06 +03:00
|
|
|
</div>
|
2018-10-30 22:55:36 +10:00
|
|
|
</div>
|
2018-10-31 19:41:16 +03:00
|
|
|
{% endblock %}
|