{"id":13571447,"url":"https://github.com/rberenguel/glancer","last_synced_at":"2025-08-22T05:32:14.843Z","repository":{"id":45558326,"uuid":"326833464","full_name":"rberenguel/glancer","owner":"rberenguel","description":"Glance over some technical videos","archived":false,"fork":false,"pushed_at":"2023-08-27T09:09:31.000Z","size":3415,"stargazers_count":155,"open_issues_count":1,"forks_count":12,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-12-06T23:19:24.485Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rberenguel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-01-04T23:33:23.000Z","updated_at":"2024-09-26T09:49:03.000Z","dependencies_parsed_at":"2024-01-06T01:05:18.351Z","dependency_job_id":"361c8c49-ce63-4389-94cd-78424e6f99df","html_url":"https://github.com/rberenguel/glancer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rberenguel%2Fglancer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rberenguel%2Fglancer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rberenguel%2Fglancer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rberenguel%2Fglancer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rberenguel","download_url":"https://codeload.github.com/rberenguel/glancer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230561014,"owners_count":18245324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T14:01:02.091Z","updated_at":"2024-12-20T09:07:21.736Z","avatar_url":"https://github.com/rberenguel.png","language":"Haskell","funding_links":[],"categories":["Haskell","HTML"],"sub_categories":[],"readme":"# Glancer\n\n\u003e **glancer**:\n\n\u003e NOUN _informal_ a person who glances\n\n\u003e **glance**:\n\n\u003e VERB If you glance at something or someone, you look at them very quickly and then look away again immediately.\n\n\u003e 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**.\n\n---\n\n[Regularly updated examples](https://github.com/rberenguel/glances)\n\n---\n\n- [Glancer](#glancer)\n  - [Installation](#installation)\n  - [Usage](#usage)\n  - [Notes and TODOs](#notes-and-todos)\n\n---\n\nThe 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.\n\nThere are then 2 problems:\n\n1. I have too many techie conference videos to watch\n2. 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.\n\nFor a long while I have had a similar problem with written articles. I solved it by:\n\n1. Forcing me to read a substantial amount by [writing a weekly list of the best ones](https://mostlymaths.net/tags/readings/)\n2. Brutally stop reading any article that is not good enough to _possibly be_ in that list.\n\nThis 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\".\n\n_Glancer_ should help with this. Given a YouTube url, it will:\n\n- Download the corresponding video (to a temporary folder),\n- Download the auto-generated subtitles (assumes English, hardcoded),\n- Capture images from the video every N=30 seconds (hardcoded for the moment),\n- Convert the images to base64,\n- Create a standalone webpage with the screenshots on the left and the corresponding text on the right.\n\nThe 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.\n\nA couple of additional neat (for me at least) features:\n\n- 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).\n- Clicking on the arrow on the lower-right of the slid block will open the video on Youtube, at that moment in time.\n\n## Installation\n\n```bash\ngit clone https://github.com/rberenguel/glancer\ncd glancer\nstack install\n```\n\nYou will need to have installed/available in the path:\n\n- The `base64` executable (should be in all IX systems by default)\n- `cat` in `/bin/cat` (likewise)\n- [`yt-dlp`](https://github.com/yt-dlp/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).\n- The [stack](https://docs.haskellstack.org/en/stable/install_and_upgrade/) Haskell build tool\n\n## Usage\n\n```\nUsage: glancer URL FILEPATH\n  Glancer\n\nAvailable options:\n  URL                      Youtube URL\n  FILEPATH                 HTML file name (don't add extension)\n  -h,--help                Show this help text\n```\n\nIn 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](https://www.mostlymaths.net/glancer/example/internals-pyspark-arrow.html).\n\nSometimes `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.\n\n## Notes and TODOs\n\n- [ ] Making the time between images customizable via the CLI (if I find out 30 is not good enough in general).\n- [ ] 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](https://github.com/rberenguel/haskset/blob/master/test/Spec.hs) [twice](https://github.com/rberenguel/bear-note-graph/blob/master/tests/test_parser.py).\n- [ ] Make the still images video-dependent (so several `glancer` commands can run concurrently, even if it's a bad idea)\n- [x] ~Some additional tweaks to the HTML/CSS (possibly adding some JS as well)~\n\n## Similar projects\n\n### [natural-language-youtube-search](https://github.com/haltakov/natural-language-youtube-search)\n\nThis 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!\n\n---\n\n_Note_: This README is long and winding on purpose.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frberenguel%2Fglancer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frberenguel%2Fglancer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frberenguel%2Fglancer/lists"}