• Stars
    star
    154
  • Rank 242,095 (Top 5 %)
  • Language
    Haskell
  • License
    BSD 3-Clause "New...
  • Created almost 4 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Glance over some technical videos

Glancer

glancer:

NOUN informal a person who glances

glance:

VERB If you glance at something or someone, you look at them very quickly and then look away again immediately.

VERB If you glance through or at a newspaper, report, or book, you spend a short time looking at it without reading it very carefully.


Regularly updated examples



The amount of online conferences has skyrocketed lately, I wonder why. This has caused my Pending to watch list to balloon from 30-ish pending technical videos (which are already a lot) to more than 100.

There are then 2 problems:

  1. I have too many techie conference videos to watch
  2. In a lot of cases I realise halfway through that the subject wasn't that interesting or that I already know the area to be covered.

For a long while I have had a similar problem with written articles. I solved it by:

  1. Forcing me to read a substantial amount by writing a weekly list of the best ones
  2. Brutally stop reading any article that is not good enough to possibly be in that list.

This is easy in writing: you can quickly scan the text and decide if it looks interesting enough for a deep dive in a few seconds (tech article reads range from a few minutes to around half an hour, depending of how technical it may get). But there is no way of doing it in videos! You need to watch maybe 15-20 minutes to then realise "meh".

Glancer should help with this. Given a YouTube url, it will:

  • Download the corresponding video (to a temporary folder),
  • Download the auto-generated subtitles (assumes English, hardcoded),
  • Capture images from the video every N=30 seconds (hardcoded for the moment),
  • Convert the images to base64,
  • Create a standalone webpage with the screenshots on the left and the corresponding text on the right.

The goal is to be able to glance at the talk to decide if you really want to watch it or not. The standalone part of the created webpage is to make it easier to "watch"/"share" to my iPad/iPhone without having to move a folder full of images. The whole talk becomes just a 5-15 Mb HTML file.

A couple of additional neat (for me at least) features:

  • Clicking/tapping on the image will enlarge it, in case you want to see some code block larger (I wanted hover, but it was too tricky on mobile).
  • Clicking on the arrow on the lower-right of the slid block will open the video on Youtube, at that moment in time.

Installation

git clone https://github.com/rberenguel/glancer
cd glancer
stack install

You will need to have installed/available in the path:

  • The base64 executable (should be in all IX systems by default)
  • cat in /bin/cat (likewise)
  • yt-dlp installed. Note the p. There is currently a bug in the normal one with downloading auto-generated subtitles (again, this also happened a long time ago).
  • The stack Haskell build tool

Usage

Usage: glancer URL FILEPATH
  Glancer

Available options:
  URL                      Youtube URL
  FILEPATH                 HTML file name (don't add extension)
  -h,--help                Show this help text

In other words, glancer https://www.youtube.com/watch?v=JWQxd3YKWhs internals-pyspark-arrow would create the webpage internals-pyspark-arrow.html in the current folder, after processing the talk I gave at Spark Summit 2019. You can see the generated file here.

Sometimes youtube-dlc won't be able to find the embedded youtube video (I've seen this happen randomly in Spark Summit North America 2020 videos in databricks.com), in this case the process will fail. Try to feed it youtube urls directly.

Notes and TODOs

  • Making the time between images customizable via the CLI (if I find out 30 is not good enough in general).
  • Add a test suite to harden subtitle parsing. I always think parsers will be small enough and that it will be "obvious" they work. It's never the case, at least I did it right twice.
  • Make the still images video-dependent (so several glancer commands can run concurrently, even if it's a bad idea)
  • Some additional tweaks to the HTML/CSS (possibly adding some JS as well)

Similar projects

natural-language-youtube-search

This project downloads the YouTube video, extracts every N-th frame and uses neural networks to classify the content of each slide, allowing you to search by text. Impressive!


Note: This README is long and winding on purpose.

More Repositories

1

PiWrite

Use your Kindle Paperwhite as a writing device
Python
192
star
2

bear-note-graph

Generate a graphviz visualisation of your Bear notes. It also has a partial Markdown parser, because why not
Python
39
star
3

pyspark-arrow-pandas

Presentation about Pyspark and how Arrow makes it faster
HTML
22
star
4

sketches

Generative sketches
JavaScript
21
star
5

motllo

Project templates without needing a repository
Python
18
star
6

dbt-sqlite-playground

A simple playground for dbt with the sqlite connector
Python
12
star
7

processing-scala-sample

An example sbt project to work with Processing (processing.org) in Scala
Scala
10
star
8

tla_lightning

Lightning talk about TLA+ for Scala Exchange 2018
Jupyter Notebook
9
star
9

scame

Adding some acme flavour to emacs
Emacs Lisp
9
star
10

Guillotine

Guillotine is an Electron (sorry) application that allows you to have up to 9 floating, always-on-top windows showing a live view from any of your webcams.
HTML
8
star
11

graphviz-live-editor

A simple hack to edit DOT diagrams in the browser
JavaScript
6
star
12

WelcomeToApacheSpark

Presentation by @crafty_coder and @berenguel to introduce Apache Spark at SoCraTesUK 2018
Scala
5
star
13

hticketiser

HTML
5
star
14

identity-graphs

Presentation about Graphframes and how we handle graphs with more than 2 billion nodes at Hybrid Theory
4
star
15

glances

Glanced presentations by glancer
HTML
4
star
16

rb-zsh-theme

Powerline-styled ZSH theme based on agnoster
4
star
17

haskset

Convert presentations written for Deckset to be compatible with conversion via pandoc and reveal.js to HTML
Haskell
3
star
18

snakes_and_ladders

A taste of Scala for Python developers (or a taste of Python for Scala developers)
Python
3
star
19

mapping

HTML
3
star
20

hammerspoon-config

Lua
3
star
21

paque

Paque simplifies running simple workflows you want to run. It offers a few features of make, but removing most of its power
Python
3
star
22

commoditisation-languages

Wardley map related presentation about what commoditisation may imply in the programming language landscape
HTML
3
star
23

dotfiles

Partial dotfiles
3
star
24

pyspark_workshop

Workshop for PyDay Barcelona 2019
Jupyter Notebook
2
star
25

spark_hadoop_kudu

Scala
2
star
26

kafka-ssl-go

Go
2
star
27

kindle-book-covers

Some B&W images to act as alternate ePub book covers for my Kindle
2
star
28

rberenguel.github.io

http://rberenguel.github.io
HTML
2
star
29

blinker

Python
2
star
30

GuillotineJS

GuillotineJS is a bit of Javascript that allows you to have a floating HTML element with your webcam in web presentations.
JavaScript
2
star
31

anki--ordered--multi-choice

A template for (possibly ordered) multi-choice
HTML
2
star
32

hweekly

Haskell
1
star
33

urls-to-epub-with-pandoc

Awk
1
star
34

rberenguel

πŸ‘‹
1
star
35

quicklamecsv

Faster implementation of csv encoding/decoding for the specific case of ASCII documents, no UTF requirement for a Go hack night
Go
1
star
36

sbt-ifttt

sbt plugin to trigger IFTTT webhook events
Scala
1
star
37

pgds-kafka-backend

Scala
1
star
38

decepticon

Fake rudder-transformer
Python
1
star
39

awkrdeck

Frawkenstein to convert presentations written for Deckset to be compatible with conversion via Pandoc and reveal.js to HTML
Awk
1
star
40

homebridge-CLIPlayer

Play web radio streams and control them via HomeBridge
JavaScript
1
star
41

ardu-n-back

A simple text-only implementation of the dual N-back task for the Arduboy
C++
1
star
42

m5cardputer-de-en-translator

A German-to-English pocket translator using the M5Stack Cardputer
C++
1
star
43

ves-a

Python
1
star