#!/bin/bash # a script to automate taking a screenshot and system specs. # written by Natan 'whatah' Zohar # inspired by Rajesh 'puthanvartashamaska' Menon # ********************************************************** # this file spits out a .html file with a screenshot and # some of your system specs in it # I would advise running # this in a new directory # and generating an index.html file. # Then you # just move that directory onto a webserver, and # voila, you now have a screenshot page with some system specs HTML_FILE=test_file.html # name of the html file to generate TITLE="my system" # page title XCONFIG_LOCATION=/etc/X11/xorg.conf # location of your x server config FSTAB_LOCATION=/etc/fstab # location of your fstab (probably don't change this) KCONFIG_LOCATION=/boot/kconfig26 # location of your kernel config DISTRO=archlinux # your distro name DISTRO_LINK=http://www.archlinux.org # and a link to your distro DATE=`date +%D | sed 's/\///g'` heading() { TEXT="$@ " echo -n $TEXT >> $HTML_FILE return 0 } text() { TEXT="$@" echo -n " $TEXT " >> $HTML_FILE return 0 } command_link() { COMMAND=$1 OUTFILE=$2 TEXT=$3 $COMMAND > $OUTFILE echo -n " $TEXT " >> $HTML_FILE return 0 } url_link() { TEXT=$1 LINK=$2 echo -n " $TEXT " >> $HTML_FILE } start_paragraph() { echo "
" >> $HTML_FILE } end_paragraph() { echo -e "\n
\n" >> $HTML_FILE } html_init () { echo -e "\n\n
\n