Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
ea96a26
wip: add scripts/update_slack_logs.go
tyru Apr 8, 2020
658e29a
add slacklog directory
tyru Apr 8, 2020
b474abe
escape # in title
tyru Apr 8, 2020
12aa60e
convert timestamp
tyru Apr 8, 2020
d5b1ffb
show icon, escape text
tyru Apr 8, 2020
ea6cae6
remove reference to slack join page
tyru Apr 8, 2020
505006d
add permalink
tyru Apr 8, 2020
460d4c9
fix text2html
tyru Apr 8, 2020
278173b
support github, twitter attachment
tyru Apr 8, 2020
3e70952
support more sites as possible
tyru Apr 8, 2020
9f0d843
fix unclosed <div>
tyru Apr 8, 2020
478a7e2
support breadcrumb at entry title link
tyru Apr 8, 2020
4139502
support link, newline in message.text
tyru Apr 8, 2020
c094668
support url with title
tyru Apr 8, 2020
86f9524
support code (`, ```)
tyru Apr 8, 2020
43fc095
support del (~)
tyru Apr 8, 2020
15f976e
support "(edited)" suffix and config file
tyru Apr 8, 2020
13ee7a7
add stub script
tyru Apr 8, 2020
3f65d36
convert text to html in attachments
tyru Apr 8, 2020
7ea371f
fix indent
tyru Apr 8, 2020
865a852
fix newline
tyru Apr 8, 2020
22b1d55
use same logic when subtype is "" or "bot_message"
tyru Apr 8, 2020
30b6f49
replace ``` with <pre>
tyru Apr 8, 2020
2321f0c
cosmetic fix
tyru Apr 8, 2020
a8adbd6
support mention
tyru Apr 8, 2020
b9e0fe7
support channel reference (e.g. #golang)
tyru Apr 8, 2020
83b013e
cosmetic fix: remove omitempty
tyru Apr 8, 2020
635f399
add message.files (only field support)
tyru Apr 8, 2020
6216af0
fix blank user name
tyru Apr 8, 2020
9ff4934
add /slacklog_data/ to .gitignore
tyru Apr 8, 2020
0660e4c
cosmetic fix
tyru Apr 8, 2020
8d211b3
fix mention
tyru Apr 8, 2020
6487edb
change color of (edited)
tyru Apr 9, 2020
bee96f6
support full-width code block
tyru Apr 10, 2020
9a79379
refactor: write util getDisplayNameByUserId()
tyru Apr 10, 2020
37f841f
move scripts and config files
tyru Apr 10, 2020
50ebfde
move templates to files
tyru Apr 10, 2020
30edd65
filter channels
tyru Apr 11, 2020
019abcd
don't output empty pages
tyru Apr 12, 2020
8dac782
support thread
tyru Apr 12, 2020
4d3b597
output only #random, #general
tyru Apr 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ _site
Gemfile.lock
/.jekyll-metadata
/tmp/
/slacklog_data/
46 changes: 46 additions & 0 deletions _layouts/slacklog.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
# vim:set ts=2 sts=2 sw=2 noet:
---
<!doctype html>
<head>
<meta charset="UTF-8">
<title>vim-jp &raquo; {{ page.title }}</title>
<link rel="stylesheet" href="/assets/css/site.css" type="text/css" />
<link rel="stylesheet" href="/assets/css/slacklog.css" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="//vim-jp.org/rss.xml" />
<link rel="canonical" href="{{ site.base-url }}{{ page.url }}" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
</head>
<body>

<!-- for facebook like button -->
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/ja_JP/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="header">
<h1><a href="/">vim-jp &raquo; Vimのユーザーと開発者を結ぶコミュニティサイト</a></h1>
</div>
<div class="body">
<div id="content">
<div class="entry-wide">
{{ content }}

{% include disqus.html %}

</div>
</div>
<br class="clear" />
<div id="footer">
<p>Powered by <a href="https://github.com/">github</a>. vim-jp.org is licensed under a <a href="https://creativecommons.org/licenses/by/2.1/jp/">Creative Commons License</a>.
</div>
</div>
</body>
177 changes: 177 additions & 0 deletions assets/css/slacklog.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
/* vim:set ts=8 sts=2 sw=2 noet: */

:root {
--slacklog-message-icon-col: 64px;
}

.slacklog-message {
display: grid;
grid-template-columns: var(--slacklog-message-icon-col) auto 1fr;
grid-template-rows: 20px auto;
margin: 0;
padding: 7px 0;
}
.slacklog-message-broadcasted:hover,
.slacklog-message:hover {
background-color: #eef;
}
.slacklog-message-broadcasted:hover .slacklog-thread,
.slacklog-message:hover .slacklog-thread {
background-color: white;
}
.slacklog-icon {
grid-row: 1 / 3;
grid-column: 1;
}
.slacklog-name {
grid-row: 1;
grid-column: 2;
font-weight: bold;
}
.slacklog-datetime {
margin-left: 10px;
grid-row: 1;
grid-column: 3;
}
.slacklog-datetime, .slacklog-datetime:link, .slacklog-datetime:visited {
color: gray;
}
.slacklog-text {
grid-row: 2;
grid-column: 2 / 4;
}
.slacklog-text-edited {
color: gray;
}

.slacklog-attachments {
grid-row: 3;
grid-column: 2 / 4;
}
.slacklog-attachment {
padding-left: 10px;
margin-top: 10px;
border-left: #ccc 3px solid
}
.slacklog-thread-reply-link {
grid-column: 2 / 4;
display: block;
text-overflow: ellipsis;
color: gray;
}
.slacklog-message-broadcasted {
display: grid;
grid-template-columns: var(--slacklog-message-icon-col) auto;
background-color: rgb(255, 242, 201);
}
.slacklog-thread-broadcast-link {
grid-row: 1;
grid-column: 1;
justify-self: center;
align-self: center;
}
.slacklog-thread-broadcast-text {
padding-top: 5px;
grid-row: 1;
grid-column: 2;
font-size: small;
color: #ccc;
}
details.slacklog-thread summary {
padding: 5px;
font-weight: bold;
color: #77f
}
details.slacklog-thread summary:hover {
background-color: white;
border: #ccc solid 1px;
padding: 4px;
}
.slacklog-thread .slacklog-message {
padding-left: 10px;
}
.slacklog-message-broadcasted .slacklog-message {
grid-row: 2;
grid-column: 1 / 3;
padding-top: 0;
padding-bottom: 10px;
}
.slacklog-thread {
grid-row: 4;
grid-column: 2 / 4;
}

.slacklog-attachment-github {
display: grid;
align-items: center;
grid-template-columns: 40px auto;
}
.slacklog-attachment-github-serviceicon {
grid-row: 1;
grid-column: 1;
}
.slacklog-attachment-github-servicename {
grid-row: 1;
grid-column: 2;
font-weight: bold;
}
.slacklog-attachment-github-title {
grid-row: 2;
grid-column: 1 / 3;
}
.slacklog-attachment-github-text {
grid-row: 3;
grid-column: 1 / 3;
}

.slacklog-attachment-twitter {
display: grid;
align-items: center;
grid-template-columns: 32px auto auto;
}
.slacklog-attachment-twitter-authoricon {
grid-row: 1;
grid-column: 1;
}
.slacklog-attachment-twitter-authoricon img {
width: 25px;
}
.slacklog-attachment-twitter-authorname {
grid-row: 1;
grid-column: 2;
}
.slacklog-attachment-twitter-authorsubname {
grid-row: 1;
grid-column: 3;
}
.slacklog-attachment-twitter-text {
grid-row: 2;
grid-column: 1 / 4;
}
.slacklog-attachment-twitter-footericon {
grid-row: 3;
grid-column: 1;
}
.slacklog-attachment-twitter-footericon img {
width: 20px;
}
.slacklog-attachment-twitter-footer {
grid-row: 3;
grid-column: 2 / 4;
align-self: start;
}
.slacklog-attachment-twitter-video {
grid-row: 4;
grid-column: 1 / 4;
}

.slacklog-attachment-other {
display: block;
}
.slacklog-attachment-other-serviceicon img {
width: 32px;
}
.slacklog-attachment-other-servicename {
font-weight: bold;
vertical-align: super;
}
7 changes: 7 additions & 0 deletions scripts/update_slack_logs/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"edited_suffix": "",
"channels": [
"random",
"general"
]
}
4 changes: 4 additions & 0 deletions scripts/update_slack_logs/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

cd "$(dirname "$0")/../.." || exit "$?"
go run scripts/update_slack_logs/update_slack_logs.go scripts/update_slack_logs/ slacklog_data/ slacklog/
18 changes: 18 additions & 0 deletions scripts/update_slack_logs/template/channel_index.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
# vim:set ts=2 sts=2 sw=2 et:
layout: slacklog
title: vim-jp.slack.com log - &#35<< .channel.Name >>
---
<div>
<h2><a href='/slacklog/'>vim-jp.slack.com log</a> - &#35<< .channel.Name >></h2>

<p>参加方法、各チャンネルの概要等は以下を参照して下さい。<br>
<a href='/docs/chat.html'>vim-jpのチャットルームについて</a></p>

<ul>
<<- range .msgMap >>
<li><a href='/slacklog/<< $.channel.Name >>/<< .Year >>/<< .Month >>/index.html'><< .Year >>年<< .Month >>月</a></li>
<<- end >>
</ul>

</div>
Loading