From e4453bed0ebd86c5b03b6a8ef7eb504ea534da31 Mon Sep 17 00:00:00 2001 From: Alexander Weinhold Date: Fri, 7 Dec 2018 13:08:45 +0100 Subject: [PATCH] add screencast snippet --- Projekttemplate.ltx | 33 --------------------------------- download_abstrusegoose.py | 33 --------------------------------- download_xkcd.py | 33 --------------------------------- screencast.sh | 12 ++++++++++++ 4 files changed, 12 insertions(+), 99 deletions(-) delete mode 100644 Projekttemplate.ltx delete mode 100644 download_abstrusegoose.py delete mode 100644 download_xkcd.py create mode 100755 screencast.sh diff --git a/Projekttemplate.ltx b/Projekttemplate.ltx deleted file mode 100644 index 56a535d..0000000 --- a/Projekttemplate.ltx +++ /dev/null @@ -1,33 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Template für Projektdokumentation %% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\documentclass[11pt, ngerman]{scrartcl} - -\usepackage{babel} -\usepackage[utf8]{inputenc} -\usepackage{uncial} -\usepackage[T1]{fontenc} -\usepackage{multido} - -\newcommand\li[1]{{#1} \hrulefill \\ \\} -\newcommand{\Repeat}{\multido{\i=1+1}} -\newcommand\lines[1]{\Repeat{#1}{\\ \\\null\hrulefill}} -\setlength\parindent{0pt} -\pagestyle{empty} - -\begin{document} -\unclfamily\huge\li{Projekt}\\ -\li{Beginn} -\li{Ende} -\li{Erfolg \normalfont\textbf ?} -Beschreibung -\lines{6} -\clearpage -% je nach Bedarf mehrfach ausdrucken... -\li{Test am} -Kommentare -\lines{10} -\clearpage -Schlusswort -\lines{11} -\end{document} diff --git a/download_abstrusegoose.py b/download_abstrusegoose.py deleted file mode 100644 index 9419b8e..0000000 --- a/download_abstrusegoose.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python2 - -import requests -from bs4 import BeautifulSoup - -FIRST_COMIC = 1 -LAST_COMIC = 575 - -def download(img_url, i): - img = requests.get(img_url, stream=True) - file_name = "%04d_%s" %(i, img_url.split("/")[-1]) - with open(file_name ,"wb") as f: - for chunk in img.iter_content(chunk_size=1024): - if chunk: - f.write(chunk) - print "Got %s" %file_name - - -def run(): - for i in range(FIRST_COMIC, LAST_COMIC + 1): - p = requests.get("http://abstrusegoose.com/%d" %i) - soup = BeautifulSoup(p.text, "html.parser") - section = soup.find("section") - if section: - img = section.find("img") - if img: - src = img["src"] - if src: - download(src, i) - - -if __name__ == "__main__": - run() diff --git a/download_xkcd.py b/download_xkcd.py deleted file mode 100644 index 4d10c0a..0000000 --- a/download_xkcd.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python2 - -import requests -from bs4 import BeautifulSoup - -FIRST_COMIC = 1 -LAST_COMIC = 1633 - -def download(img_url, i): - img = requests.get(img_url, stream=True) - file_name = "%04d_%s" %(i, img_url.split("/")[-1]) - with open(file_name ,"wb") as f: - for chunk in img.iter_content(chunk_size=1024): - if chunk: - f.write(chunk) - print "Got %s" %file_name - - -def run(): - for i in range(FIRST_COMIC, LAST_COMIC + 1): - p = requests.get("http://xkcd.com/%d/" %i) - soup = BeautifulSoup(p.text, "html.parser") - div = soup.find("div", id="comic") - if div: - img = div.find("img") - if img: - src = img["src"] - if src.startswith("//"): - download("http:" + src, i) - - -if __name__ == "__main__": - run() diff --git a/screencast.sh b/screencast.sh new file mode 100755 index 0000000..9d6ccfc --- /dev/null +++ b/screencast.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +timestamp=`date "+%Y%m%d-%H%M%S"` +filename="screencast-$timestamp.mp4" + +pavucontrol & + +ffmpeg -f x11grab \ + -s $(xdpyinfo | grep dimensions | awk '{print $2}') \ + -i :0.0 \ + -f pulse -i default \ + $filename