update feed
This commit is contained in:
parent
325f206d15
commit
e9771f6b7e
19
_config.yml
19
_config.yml
@ -129,7 +129,20 @@ ignore:
|
|||||||
theme: uio
|
theme: uio
|
||||||
|
|
||||||
# Feed
|
# Feed
|
||||||
|
# feed:
|
||||||
|
# type: atom
|
||||||
|
# path: feed.xml
|
||||||
|
# autodiscovery: true
|
||||||
feed:
|
feed:
|
||||||
type: atom
|
limit: 20
|
||||||
path: feed.xml
|
order_by: "-date"
|
||||||
autodiscovery: true
|
tag_dir: "tag"
|
||||||
|
category_dir: "category"
|
||||||
|
rss:
|
||||||
|
enable: false
|
||||||
|
atom:
|
||||||
|
enable: true
|
||||||
|
output: "feed.xml"
|
||||||
|
jsonFeed:
|
||||||
|
enable: true
|
||||||
|
output: "feed.json"
|
||||||
|
@ -11,10 +11,10 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"hexo": "^5.0.0",
|
"hexo": "^5.0.0",
|
||||||
"hexo-excerpt": "^1.1.6",
|
"hexo-excerpt": "^1.1.6",
|
||||||
|
"hexo-feed": "^1.1.0",
|
||||||
"hexo-filter-mathjax": "^0.6.3",
|
"hexo-filter-mathjax": "^0.6.3",
|
||||||
"hexo-generator-archive": "^1.0.0",
|
"hexo-generator-archive": "^1.0.0",
|
||||||
"hexo-generator-category": "^1.0.0",
|
"hexo-generator-category": "^1.0.0",
|
||||||
"hexo-generator-feed": "^3.0.0",
|
|
||||||
"hexo-generator-index": "^2.0.0",
|
"hexo-generator-index": "^2.0.0",
|
||||||
"hexo-generator-tag": "^1.0.0",
|
"hexo-generator-tag": "^1.0.0",
|
||||||
"hexo-renderer-ejs": "^1.0.0",
|
"hexo-renderer-ejs": "^1.0.0",
|
||||||
|
@ -2,24 +2,24 @@
|
|||||||
title: Toxicity Analysis in YouTube Live Chat
|
title: Toxicity Analysis in YouTube Live Chat
|
||||||
---
|
---
|
||||||
|
|
||||||
A little exploration and experiment on toxic activities.
|
A little analysis and experiment on a flock of toxic people.
|
||||||
|
|
||||||
# Why
|
# Why
|
||||||
|
|
||||||
The motivation is quite simple; I just feel sad when they sound suffered from toxic chats. The goal is also simple: design an automated system to spot toxic chat and quarantine them.
|
The motivation is straightforward; I just feel sad when they sound suffered from toxic chats. The goal is also straightforward: design an automated system to spot toxic chat and quarantine them.
|
||||||
|
|
||||||
# Data, Data, Data
|
# Data, Data, Data
|
||||||
|
|
||||||
> I can't make bricks without clay.
|
> I can't make bricks without clay.
|
||||||
> — Sherlock Holmes
|
> — Sherlock Holmes
|
||||||
|
|
||||||
I need a myriad of live chat comments and moderation events for analysis and future use.
|
I need a myriad of live chat comments and moderation events for this.
|
||||||
|
|
||||||
Unfortunately, YouTube API does not offer a way to retrieve these kinds of events in real time. Which is so crucial because live streams are only place we can observe moderators' activities through API response. Once it gets archived, these events are no longer available.
|
Unfortunately, YouTube API does not offer a way to retrieve these kinds of events in real time. Which is crucial because live streams are only place we can observe moderators' actions (deletion and BAN). Once it gets archived, these activities are no longer observable.
|
||||||
|
|
||||||
## Collecting Crusts
|
## Collecting Crusts
|
||||||
|
|
||||||
So, I ended up developing a library to accumulate events from a YouTube live stream, plus a fancy CLI app mimics live chat. It accepts YouTube video id and save live chats in [JSON Lines](https://jsonlines.org/) format:
|
So, I ended up developing a library to accumulate events from a YouTube live stream, with a fancy CLI app mimics live chat. It accepts YouTube video id and save live chats in [JSON Lines](https://jsonlines.org/) format:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
collector <videoId>
|
collector <videoId>
|
||||||
@ -27,25 +27,25 @@ collector <videoId>
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
A line with white text is a normal chat, with red text is a ban event, with yellow text is a deletion event.
|
A line with white text is a normal chat, red text is a ban event, and yellow text is a deletion event.
|
||||||
|
|
||||||
## Make a Bread Rise
|
|
||||||
|
|
||||||
I know, that's not scalable at all. A new live stream comes in, I copy and paste video id into the terminal and run the script. How sophisticated.
|
I know, that's not scalable at all. A new live stream comes in, I copy and paste video id into the terminal and run the script. How sophisticated.
|
||||||
|
|
||||||
|
## Make Bread Rise
|
||||||
|
|
||||||
Thankfully, there's a great web service around Hololive community: [Holotools](https://hololive.jetri.co). They operate an API that gives us an index of past, ongoing, and upcoming live streams from Hololive talents.
|
Thankfully, there's a great web service around Hololive community: [Holotools](https://hololive.jetri.co). They operate an API that gives us an index of past, ongoing, and upcoming live streams from Hololive talents.
|
||||||
|
|
||||||
Here I divided my system into two components: Scheduler and workers. Scheduler periodically checks for newly scheduled live streams through Holotools API and create a job to be handled by workers. Workers are responsible for handling jobs and spawning a process to collect live chat events.
|
Here I divided my system into two components: Scheduler and workers. Scheduler periodically checks for newly scheduled live streams through Holotools API and create a job to be handled by workers. Workers are responsible for handling jobs and spawning a process to collect live chat events.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
I run the cluster for a while and by far it hoards approximately 1 million comments per day. Now I could reliably run my own bakery.
|
I run the cluster for a while and by far it hoards approximately one million comments per day. Now I could reliably run my own bakery.
|
||||||
|
|
||||||
# Look Before You Leap
|
# Look Before You Leap
|
||||||
|
|
||||||
Okay take a close look at the data before actually starting to build a model.
|
Okay now there are five million chats sitting on MongoDB store. Let's take a close look at these before actually starting to build a model.
|
||||||
|
|
||||||
## Overview
|
## Troll's Behavior
|
||||||
|
|
||||||
## By talent
|
## By talent
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ Nextcloud does not have support for generating thumbnails from Affinity Photo an
|
|||||||
|
|
||||||
Glancing at `.afphoto` and `.afdesign` in Finder, I noticed that it has a QuickLook support and an ability to show the thumbnail image. So these files should have thumbnail image somewhere inside its binary.
|
Glancing at `.afphoto` and `.afdesign` in Finder, I noticed that it has a QuickLook support and an ability to show the thumbnail image. So these files should have thumbnail image somewhere inside its binary.
|
||||||
|
|
||||||
I wrote a simple script to seek for thumbnail image inside a binary and save it as a PNG file.
|
I wrote a simple script to seek for [PNG signature](https://www.w3.org/TR/PNG/) inside a binary and save it as a PNG file.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
@ -114,7 +114,7 @@ class Affinity extends ProviderV2 {
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
It works!
|
Easy-peasy!
|
||||||
|
|
||||||
# Bonus: PDF thumbnail generator
|
# Bonus: PDF thumbnail generator
|
||||||
|
|
||||||
|
@ -51,5 +51,13 @@
|
|||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css"
|
||||||
/>
|
/>
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="https://unpkg.com/highlight.js@9.18.1/styles/night-owl.css"
|
||||||
|
/>
|
||||||
<%- css('css/index') %>
|
<%- css('css/index') %>
|
||||||
|
|
||||||
|
<!-- Feed -->
|
||||||
|
<link rel="alternate" type="application/atom+xml" title="<%= config.title %>" href="<%= full_url_for(`/feed.xml`) %>" />
|
||||||
|
<link rel="alternate" type="application/json" title="<%= config.title %>" href="<%= full_url_for(`/feed.json`) %>" />
|
||||||
</head>
|
</head>
|
@ -42,14 +42,14 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- Syntax Highlight -->
|
<!-- Syntax Highlight -->
|
||||||
<link
|
<!-- <link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://unpkg.com/highlight.js@9.18.1/styles/night-owl.css"
|
href="https://unpkg.com/highlight.js@9.18.1/styles/night-owl.css"
|
||||||
/>
|
/> -->
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script>
|
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/languages/go.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/languages/go.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/languages/scss.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/languages/scss.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/languages/lua.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/languages/lua.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
hljs.initHighlightingOnLoad()
|
hljs.initHighlightingOnLoad()
|
||||||
</script>
|
</script> -->
|
Loading…
x
Reference in New Issue
Block a user