ToolExample: Difference between revisions

From Hackers & Designers
No edit summary
No edit summary
Line 7: Line 7:


'''Karl's syntax:''' <code><nowiki><tool repo="REPONAME" file="FILENAME"></tool></nowiki></code>
'''Karl's syntax:''' <code><nowiki><tool repo="REPONAME" file="FILENAME"></tool></nowiki></code>
<tool></tool>


<tool repo="hackersanddesigners/hdsa2019doc" file="readme.md"></tool>
<tool repo="hackersanddesigners/hdsa2019doc" file="readme.md"></tool>

Revision as of 19:30, 16 January 2020

MainNavigation No

Jeoren's syntax: {{#github:readme.md|hackersanddesigners/hdsa2019doc}}

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


<div class="position-relative header-wrapper js-header-wrapper ">
  <a href="#start-of-content" data-skip-target-assigned="false" class="px-2 tmp-py-4 color-bg-accent-emphasis color-fg-on-emphasis show-on-focus js-skip-to-content">Skip to content</a>

  <span data-view-component="true" class="progress-pjax-loader Progress position-fixed width-full">
<span style="width: 0%;" data-view-component="true" class="Progress-item progress-pjax-loader-bar left-0 top-0 color-bg-accent-emphasis"></span>




            <link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/nvz-d8ae5b1b70e399a7.js" fetchpriority="low" />


Navigation Menu

Sign inAppearance settingsSearch/Sign inSign upAppearance settings

  <div hidden="hidden" data-view-component="true" class="js-stale-session-flash stale-session-flash flash flash-warn flash-full">

    <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert">
<path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path>

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

<button id="icon-button-22762552-94b8-4391-92d8-3aeba14268f7" aria-labelledby="tooltip-cab69371-afc8-4caf-94b9-8169972e4245" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium flash-close js-flash-close">  <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x Button-visual">
<path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path>

Dismiss alert



<div id="js-flash-container" class="flash-container" data-turbo-replace>






     {{ message }}











Uh oh!

There was an error while loading. Please reload this page.















   
     
       hackersanddesigners

   /
   
     hdsa2019doc
   
   Public
 










Additional navigation options





















FilesExpand file tree

master

Breadcrumbs

  1. hdsa2019doc
/

readme.md

Copy pathBlameMore file actionsBlameMore file actions

Latest commit

 

History

HistoryHistory87 lines (63 loc) · 2.63 KBmaster

Breadcrumbs

  1. hdsa2019doc
/

readme.md

Copy pathTop

File metadata and controls

  • Preview
  • Code
  • Blame
87 lines (63 loc) · 2.63 KBRawCopy raw fileDownload raw fileOutlineEdit and raw actions

HDSA 2019 videodoc generator

Description

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.

Installation

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:

python generate.py
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.

Example:

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

Links

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: https://github.com/testdouble/imagemagick-macos-font-setup 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)"
TYPE_GEN_SCRIPT="$DIR/vendor/imagemagick_type_gen"
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








      <footer class="footer f6 color-fg-muted color-border-subtle tmp-pt-7 tmp-pb-6 p-responsive" role="contentinfo"  >

Footer


     
       
   

     
       © 2026 GitHub, Inc.
     
   


Footer navigation


<ghcc-consent id="ghcc" class="position-fixed bottom-0 left-0" style="z-index: 999999"
  data-locale="en"
  data-initial-cookie-consent-allowed=""
  data-cookie-consent-required="true"
></ghcc-consent>






   You can’t perform that action at this time.
 
<template id="site-details-dialog">







<div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;">



<template id="snippet-clipboard-copy-button">













</div>
<div id="js-global-screen-reader-notice" class="sr-only mt-n1" aria-live="polite" aria-atomic="true" ></div>
<div id="js-global-screen-reader-notice-assertive" class="sr-only mt-n1" aria-live="assertive" aria-atomic="true"></div>

To-Do for Article Pages

  • CSS
    • define a max height → expandable to full height
    • cute styling ◕3◕
  • HTML
    • external link to github

To-Do for Tools Page

  • CSS
    • max height + width
  • HTML
    • if #github embed in article then create same embed in tools
    • external link to github
    • internal link to article (only in tools page)