MainNavigation No

Jeoren's syntax: {{|hackersanddesigners/hdsa2019doc}}

Karl's syntax: <tool user="USERNAME" repo="REPONAME" file="FILENAME" />

HDSA 2019 videodoc generator


This script takes all the videos in a specified folder and uses parts of these videos to generate a random video of the specified length.


Not necessary but preferred. Create a environment for this project. I use conda:

conda create -n hdsa19doc python=3.7.3
conda activate hdsa19doc

Then install moviePy and GamePy (for sound or previews I think)

pip install moviepy gamepy

Input videos go in /input. Allowed types: .mov, .m4v, .mp4 Run the script:

optional arguments:
  -h, --help            show this help message and exit
  -d DURATION, --duration DURATION
                        Duration of output file
  -m MAX_SEG_LENGTH, --max_seg_length MAX_SEG_LENGTH
                        Max segment length
  -o, --open            Open the output file on finish.
  -t TEXTFILE, --textfile TEXTFILE
                        Path to textfile. Overlay the video with lines from
                        input text file.
  -b BRANDING, --branding BRANDING
                        Path to video. A part of this video will be overlaid
                        on the main composition.
  --title TITLE         Path to video/gif. Title overlay.
  --logo LOGO           Path to video/gif. Corner logo overlay.


python --duration 60 --max_seg_length 10 --open --textfile words.txt  --branding branding/Short\ movie\ --title images/opening.gif --font KronaOne 


  • MoviePy Github:
  • MoviePy documentation:

Other references:

Other interesting video libraries/languages:


To get MoviePy/imagemagick to recognize your fonts on Mac I had to modify this script a bit: First install the script with: npm i -g imagemagick-macos-font-setup Then:

#!/usr/bin/env bash
# Find our path via npm because BASH_SOURCE won't work under npm scripts… ಠ_ಠ
DIR="$(npm ls --global --parseable imagemagick-macos-font-setup)"
echo "<----- Ensuring $HOME/.config/ImageMagick exists"
mkdir -p "$HOME/.config/ImageMagick"
echo "<----- Writing font definition to $HOME/.config/ImageMagick/type.xml"
find "$HOME/Library/Fonts" -type f -name '*.ttf' | "$TYPE_GEN_SCRIPT" -f - > "$HOME/.config/ImageMagick/type.xml"

Save the above as a .sh script and run it to create a Font list in ~/.config/ImageMagick/type.xml

To see which fonts ImageMagick recognizes: convert -list font

karlmoubarak / tool /

A MediaWiki tag extension to embed, link, and style contents from files hosted on GitHub repositories.



This extension is built on top of and requires Jeroen's GitHub extension. Make sure that that is installed first. Then:

  1. Clone this directory.
  2. In the root of your wiki, navigate to var/www/mediawiki/extensions and copy the entire tool directory there.
  3. Navigate back to the main mediawiki folder and open the local_settings.php file in an editor.
  4. Add require_once( "$IP/extensions/tool/tool.php" ); at the end of the file.
  5. Write and quit.

You should now be able to use the extension.


In your wiki editor, type <tool user="USERNAME" repo="REPONAME" file="FILENAME" />, where USERNAME is the GitHub user whos repository you are linking, REPONAME is the name of that repository, and FILENAME is the path to the file you want to display from that repository.


For instance, to embed the file from hackersanddesigners' hdsa2019doc repository, you would type in <tool user="hackersanddesigners" repo="hdsa2019doc" file="" />.

↗ see in use ↗


This extension was built, configured, and styled for hackersanddesigners' wiki, so you might be interested in changing the generated HTML and CSS.

To change the generated HTML elements, open the tool_body.php file. All lines starting with $ret .= define an HTML line or element. Edit, add or remove these lines as you see fit. To change the way the embed is styled, edit the tool.css file. This should be self-explanatory.

During development, MediaWiki's caching might get in the way. In your browser's address bar you can add &action=purge at the end of the URL you are testing to clear the cache (and changes to the tool.css file will only require a force reload to become visible).


Built under afincato's supervision as part of an ongoing project for the Hackers and Designers Wiki.

written with love → km < >

To-Do for Article Pages

To-Do for Tools Page