Your IP : 216.73.216.209


Current Path : /bin/
Upload File :
Current File : //bin/texconfig-dialog

#!/bin/sh

# TeX-Config version 3.0
# Thomas Esser, te@dbs.uni-hannover.de. Public domain.

# invoke the right shell:

test -f /bin/ksh && test -z "$RUNNING_KSH" \
  && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \
  && { RUNNING_KSH=true; export RUNNING_KSH; exec /bin/ksh $0 ${1+"$@"}; }
unset RUNNING_KSH

test -f /bin/bsh && test -z "$RUNNING_BSH" \
  && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \
  && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; }
unset RUNNING_BSH

export PATH

# hack around a bug in zsh:
test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'

# the version string
version='$Id: texconfig-dialog 23826 2011-09-05 17:59:15Z karl $'

: ${PAGER=more}
progname=texconfig-dialog
tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/tcdtmp.$$
log=$tmpdir/log
tmpmenu=$tmpdir/tmpmenu
needsCleanup=false

###############################################################################
# cleanup()
#   clean up the temp area and exit with proper exit status
###############################################################################
cleanup()
{
  rc=$1
  $needsCleanup && test -n "$tmpdir" && test -d "$tmpdir" \
    && { cd / && rm -rf "$tmpdir"; }
  termCtl reset
  (exit $rc); exit $rc
}

###############################################################################
# setupTmpDir()
#   set up a temp directory and a trap to remove it
###############################################################################
setupTmpDir()
{
  case $needsCleanup in
    true) return;;
  esac

  trap 'cleanup 1' 1 2 3 7 13 15
  needsCleanup=true
  (umask 077; mkdir "$tmpdir") \
    || abort "could not create directory \`$tmpdir'"
}

###############################################################################
# abort(errmsg)
#   print `errmsg' to stderr and exit with error code 1
###############################################################################
abort()
{
  echo "$progname: $1." >&2
  cleanup 1
}

logexec()
{
  (echo; echo ">>> Executing \`$@' <<<") >> $log
  "$@" 2>&1 | tee -a $log
}

###############################################################################
# runDialog(args, ...)
#   execute the right dialog program with the right default parameters
###############################################################################
runDialog()
{
  if test -n "$DIALOG_PROG"; then
    termCtl clear
    $DIALOG_PROG --title "TeX setup utility" ${1+"$@"}
    runDialogRc=$?
    termCtl clear
  else
    abort "could not find dialog or whiptail program to run"
  fi
  (exit $runDialogRc)
  return $runDialogRc
}

###############################################################################
# findDialog(void)
#   set DIALOG_PROG to the system dialog program, or the empty string.
###############################################################################
findDialog()
{
  for bin in whiptail dialog
  do
    binLoc=`texconfig findprog $bin`
    case $binLoc in
      "") DIALOG_PROG="";;
      *)  DIALOG_PROG=$binLoc; break;;
    esac
  done
}

###############################################################################
# mktexdir(args)
#   call mktexdir script, disable all features (to prevent sticky directories)
###############################################################################
mktexdir()
{
  MT_FEATURES=none "$TEXMFMAIN/web2c/mktexdir" "$@" >&2
}

###############################################################################
# termCtl(arg)
#   some convenience utilities for terminal control
###############################################################################
termCtl()
{
  case $1 in
    clear)
      test -n "$NO_CLEAR" && return
      tty >/dev/null 2>&1 && clear
      ;;
    reset)
      test -n "$NO_CLEAR" && return
      reset 2>/dev/null
      stty sane 2>/dev/null
      reset 2>/dev/null
      termCtl clear
      ;;
    readln)
      echo
      echo "press return to continue..."
      read a
      ;;
  esac
}

###############################################################################
# menuMain(void)
#   the main menu
###############################################################################
menuMain()
{
  cat <<-'eof'
	The interactive texconfig utility will be started now. Make sure
	your screen has at least 24 rows and 80 columns. If texconfig
	crashes now, you can still set up your teTeX system using the
	batch mode of texconfig.  Try 'texconfig help' to get a list
	of options.

	The interactive mode works best with a real vt100 terminal or
	inside an xterm window.
eof
  termCtl readln

  while :; do
    logMessage='view logfile'

    runDialog \
      --menu "
Hint: all output of external commands (e.g. tex) is logged into
a file. You can look at this file using "LOG". If cursor keys make
trouble, you may have more luck with +/- and TAB.
" \
      23 80 14 \
      EXIT      'exit' \
      PAPER     'default paper: A4 or letter (us)' \
      MODE      'default metafont mode and resolution' \
      REHASH    'rebuild filename databases' \
      FORMATS   'edit format definitions' \
      HYPHENATION   'customize hyphenation' \
      DVIPS     'dvips configuration' \
      FAQ       'view frequently asked questions + answers' \
      CONF      'show configuration' \
      LOG       "$logMessage" \
      2>"$tmpmenu" || break
    
    case `cat "$tmpmenu"` in
      EXIT)
        break
        ;;
      PAPER)
        menuPaper
        ;;
      MODE)
        menuMode
        ;;
      REHASH)
        logexec texconfig rehash
        termCtl readln
        ;;
      FORMATS)
        texconfig formats
        termCtl readln
        ;;
      HYPHENATION)
        menuHyphenation
        ;;
      DVIPS)
        menuDvips
        ;;
      FAQ)
        texconfig faq
        termCtl readln
        ;;
      CONF)
        logexec texconfig conf
        termCtl readln
        ;;
      LOG)
        <"$log" eval $PAGER
        termCtl readln
        ;;
    esac
  done
}

menuGetMode()
{
  # we need eval to get the command line right... :-(
  eval \
    runDialog \
      --menu \""
Chosse a mode to be used when metafont generates font bitmaps. The resolution is the most important point, but there might
be differences between modes of the same resolution. See the comments in the file modes.mf for more details.
\"" \
      23 80 14 \
      `texconfig mode-list` 2>"$tmpmenu"
}

menuMode()
{
  menuGetMode
  mode=`cat "$tmpmenu"`

  if test -n "$mode"; then
    logexec texconfig mode "$mode"
    termCtl readln
  fi
}

menuDvips()
{
  menuDvipsDest=ps

  while :; do
    case $menuDvipsDest in
      ps)
        menuDvipsPrinterOpt=
        menuDvipsMsg="
dvips GLOBAL section. Define the most common default settings (config.ps).
To define settings for a specific printer, first ADD a printer definition,
then CHANGE it.
"
        ;;
      *)
        menuDvipsPrinterOpt="-P $menuDvipsDest"
        menuDvipsMsg="
dvips settings for printer $menuDvipsDest (config.$menuDvipsDest). Define
local settings for this printer. To switch back to global settings mode,
select GLOBAL.
"
        ;;
    esac

    runDialog \
      --menu "$menuDvipsMsg
You can use dvips for non PostScript printers, if you can setup your
printing system to convert PostScript to a format that your printer can
handle. Maybe, you can use GhostScript to do the conversion (if your
printer is supported)." \
      23 80 9 \
      RETURN	'back to the main menu' \
      DEST      'define default destination of the generated Postscript' \
      MODE      'change metafont mode/resolution' \
      OFFSET    'shift output by some offset' \
      PAPER     'define the default paper' \
      GLOBAL	'change global settings (config.ps)' \
      CHANGE	'change printer settings (config.$PRINTER)' \
      ADD	'add a printer configuration' \
      DEL	'remove a printer configuration' \
        2>"$tmpmenu" || break

    menuDvipsAns=`cat "$tmpmenu"`
    case $menuDvipsAns in
      RETURN)
        break
        ;;
      DEST)
        runDialog --inputbox "Enter the command to print.

In general, you need a command like 'lpr' or 'lpr -Pfoo'.

NOTE: If you just press return, printing will be disabled and the output saved to a file by default.
" 23 80 2>"$tmpmenu"
        if test $? = 0; then
          menuDvipsAns=`cat "$tmpmenu"`
          case $menuDvipsAns in
            "")
              menuDvipsPrintOpt=-
              ;;
            *)
              menuDvipsPrintOpt=$menuDvipsAns
              ;;
          esac
          logexec texconfig dvips $menuDvipsPrinterOpt printcmd "$menuDvipsPrintOpt"
          termCtl readln
        fi
        ;;
      MODE)
        menuGetMode
        mode=`cat "$tmpmenu"`
  
        if test -n "$mode"; then
          logexec texconfig dvips $menuDvipsPrinterOpt mode "$mode"
          termCtl readln
        fi
        ;;
      OFFSET)
        runDialog --inputbox "Enter a dimension pair (a rightwards offset and a downwards
offset), e.g. 2mm,-0.5in (right 2mm and up .5in):" 23 80 2>"$tmpmenu"; menuDvipsAns=`cat "$tmpmenu"`
        case $menuDvipsAns in
          "") : ;;
          *)
            logexec texconfig dvips $menuDvipsPrinterOpt offset "$menuDvipsAns"
            termCtl readln
            ;;
        esac
        ;;
      PAPER)
        eval runDialog \
          --menu \'\\n\\nChoose the default papersize definition for dvips.\\n\\n\' \
          23 80 8 `texconfig dvips paper-list` \
          2>"$tmpmenu"
        paper=`cat "$tmpmenu"`
        if test -n "$paper"; then
          logexec texconfig dvips paper "$paper"
          termCtl readln
        fi
        ;;
      GLOBAL)
        menuDvipsDest=ps
        ;;
      CHANGE)
        runDialog --inputbox "Printer name (for future settings of DEST / MODE / OFFSET)" 23 80 2>"$tmpmenu"
        menuDvipsAns=`cat $tmpmenu`
        case $menuDvipsAns in
          "") : ;;
          *)  menuDvipsDest=$menuDvipsAns;;
        esac
        ;;
      ADD)
        runDialog --inputbox "Printer name (for printer to add)" 23 80 2>"$tmpmenu"
        menuDvipsAns=`cat $tmpmenu`
        case $menuDvipsAns in
          "") : ;;
          *)
            logexec texconfig dvips add $menuDvipsAns
            termCtl readln
            ;;
        esac
        ;;
      DEL)
        runDialog --inputbox "Printer name (for printer to delete)" 23 80 2>"$tmpmenu"
        menuDvipsAns=`cat $tmpmenu`
        case $menuDvipsAns in
          "") : ;;
          *)
	    logexec texconfig dvips del $menuDvipsAns
            termCtl readln
            ;;
        esac
        ;;
    esac
  done
}

menuPaper()
{
  runDialog \
    --menu "
Select your default paper format.
" \
    23 80 14 \
    RETURN 'return to the main menu' \
    A4	'ISO A4 (210x297mm)' \
    LETTER 'US (8.5x11in)' 2>"$tmpmenu"

  p=`cat "$tmpmenu"`
  case $p in
    A4)
      logexec texconfig paper a4
      termCtl readln
      ;;
    LETTER)
      logexec texconfig paper letter
      termCtl readln
      ;;
  esac
}

menuHyphenation()
{
  runDialog \
    --menu "
Choose format to set up hyphenation for.
" \
    23 80 14 \
    `texconfig hyphen-list | sed 's@\(.*\)@\1 \1@'`  2>"$tmpmenu"
  p=`cat "$tmpmenu"`
  case $p in
    "")
      return
      ;;
    *)
      texconfig hyphen "$p"
      termCtl readln
  esac
}

# main()

case $1 in
  help|--help)
    cat <<-eof
	Usage: $progname [--help|--version]
eof
    exit 0
    ;;
  --version)
    cat <<-eof
	$progname version $version.
eof
    exit 0
    ;;
esac


: ${TEXMFCONFIG=`kpsewhich -var-value=TEXMFCONFIG`}
: ${TEXMFVAR=`kpsewhich -var-value=TEXMFVAR`}
: ${TEXMFMAIN=`kpsewhich -var-value=TEXMFMAIN`}
export TEXMFCONFIG TEXMFVAR TEXMFMAIN

setupTmpDir
echo "$progname: started `date`" > $log
findDialog

test -d "$TEXMFCONFIG" \
  || mktexdir "$TEXMFCONFIG" >/dev/null 2>&1 \
  || echo "$progname: directory \`$TEXMFCONFIG' (from TEXMFCONFIG variable) does not exist and cannot be created" >&2

canWriteConfig=false
if test -d "$TEXMFCONFIG"; then
  if test -w "$TEXMFCONFIG"; then
    canWriteConfig=true
  else
    echo "$progname: directory \`$TEXMFCONFIG' (from TEXMFCONFIG variable) is not writable."
    echo "$progname: configuration data cannot be changed." >&2
  fi
fi

test -d "$TEXMFVAR" \
  || mktexdir "$TEXMFVAR" >/dev/null 2>&1 \
  || echo "$progname: directory \`$TEXMFVAR' (from TEXMFVAR variable) does not exist and cannot be created" >&2

canWriteVardata=false
if test -d "$TEXMFVAR"; then
  if test -w "$TEXMFVAR"; then
    canWriteVardata=true
  else
    echo "$progname: directory \`$TEXMFVAR' (from TEXMFVAR variable) is not writable."
    echo "$progname: cached variable runtime data files cannot be written." >&2
  fi
fi

menuMain
cleanup 0

Rosenblum TV: Video training, virtual workshops, classes, tutorials
logologologologo
  • About
  • What We Do
  • Our Clients
  • Case Studies
    • The BBC
    • CBS News
    • New York Times Television
    • Spectrum News
    • The Newark Star-Ledger
    • The United Nations
    • McGraw/Hill
    • Oyster Yachts
    • Scottish Environmental Protection Agency
  • The Power of Storytelling
  • Why iPhones?
  • Michael on Media
  • Books
  • Contact
  • About
  • What We Do
  • Our Clients
  • Case Studies
    • The BBC
    • CBS News
    • New York Times Television
    • Spectrum News
    • The Newark Star-Ledger
    • The United Nations
    • McGraw/Hill
    • Oyster Yachts
    • Scottish Environmental Protection Agency
  • The Power of Storytelling
  • Why iPhones?
  • Michael on Media
  • Books
  • Contact

RE-INVENTING THE TELEVISION NEWS BUSINESS*

A revolution in video storytelling

Creating entirely new & cost-effective production methods

From the world leaders in video production training and the creators of Character Driven Storytelling™

*and every other business that uses video

WHAT WE DO

Over the past 35 years, we have designed, built or restructured some of the most powerful news and journalism companies in the world.

We replace the traditional TV news ‘crew’ with one highly trained journalist, working alone with nothing but an iPhone.

No more TV news ‘crews’, no editors and no field producers.

This is television news done the way newspaper journalism is done – one reporter with their electronic pad and pencil.

In doing this, we can cut the cost of production by as much as 75% while increasing ratings and audience engagement.

In the place of conventional TV news ‘packages’ – ie, reporter stand up, interview, b-roll, man on the street, we marry great journalism with Netflix and Hollywood storytelling.

It’s a combination that works.

We have taken most of our clients to #1 in their respective markets.

And it’s not just for news. Any company, any profit, any NGO and anyone else who is online needs to tell their story in compelling yet cost-effective video. We can teach you to do that. Either in person or virtually.

EXAMPLES OF WHAT WE CAN TEACH YOUR STAFF TO PRODUCE

ITAY HOD

Itay Hod, MMJ with KPIX/CBS in San Francisco, took the 5-Day Intensive Video Storytelling Bootcamp in 2018.

Because he works alone, with only an iPhone, he was able to embed himself with a homeless family.

Here’s the story he produced in a one-day turn.

KIET DO

Kiet Do, an MMJ with KPIX/CBS in San Francisco, took the 5-Day Intensive Video Storytelling Bootcamp in 2021.

Here is a story he produced, all on his own, with only an iPhone and in a one-day turn.

TAYLOR SCHAUB

Taylor Schaub, an MMJ with Spectrum News 1 in LA, took the 5-Day Intensive Video Storytelling Bootcamp in 2023.

Here is a story he turned in only one day, using only an iPhone. It was the first video story he ever did and it was nominated for an Emmy.

THE BOOTCAMP

How do we convert stations and whole networks to working in this way?

Since 1988, we have run intensive 5-Day Video Storytelling Bootcamps

We have done these all over the world.

These are hands-on bootcamps, and participants learn an entirely new way of creating TV news stories.

-We shoot at a 3:1 ratio or lower, so turnaround times are fast.

-We go directly from camera to timelilne and edit – no written scripts.  We work in the medium of pictures and sound.

-We are entirely character-driven.

-We are driven by pictures and real events.

-We are focused almost entirely on ’the viewer experience’.

Since 1988, more than 70,000 journalists around the world have taken our bootcamps, either in person on virtualy.

Case Studies

CBS Case Study Logos
CBS News

We have started to work with CBS News, bringing our ideas of character-driven storytelling to one of the most successful and biggest networks in the United States. Since beginning to work with them ratings have climbed and more importantly, audience engagement is through the ceiling.

Learn More
NYT Case Study Logos
New York Times Television

We started New York Times Television in 1990 and it was the first paper to be brought into the world of TV. It quickly became one of the most successful non-fiction production companies in the United States. The series and documentaries we produced won many awards including multiple Emmys.

Learn More
BBC Case Study Logos
The BBC

We have been working with the BBC since the year 2000 helping to convert their national news network to our visual storytelling technique. Most recently we have trained teams from their sports, documentaries, and comedy divisions to make character-driven stories using only smartphones.

Learn More
Spectrum Case Study Logos
Spectrum News

For the past five years we have worked with Spectrum News to introduce and train their journalists on visual, character driven storytelling using smartphones helping to create a different kind of local news for their network of 24-Hour News Stations across the United States.

Learn More
UN Case Study Logos
The United Nations

In 2006, we were approached by the United Nations. Rather than rely on news outlets, it would be much easier to train the field operatives to produce their own stories. We spent two years working with the UN, training more than 100 of their staff in bootcamps in Geneva and Nairobi.

Learn More
Star Ledger Case Study Logos
The Newark Star-Ledger

We trained 50 print reporters at the paper to shoot and tell their own stories, in conjunction with their print work. We built a TV newsroom in their existing print newsroom – you could not ask for a better set and they began to live stream their stories in conjunction with their print work.

Learn More
Mcgraw Hill Case Study Logos
Mcgraw Hill

We spent two years with McGraw Hill, training more than 150 of their staffers, making them completely video literate. McGraw/Hill media properties we transit included Business Week, Aviation Week, (what was the name of the architecture magazine), and JD Power and Associates.

Learn More
VOA Case Study Logos
Voice of America

In 1990, we were approached by The Voice of America, the official broadcasting agency for the United States Government. When we met with VOA, they were only a short wave radio broadcaster, but working with them, we took them into television, launching VOA-TV.

Learn More
Oyster Case Study Logos
Oyster Yachts

British based Oyster Yachts makes some of the finest yachts in the world. Like every other company, they had to find a way to feed the never-ending video demands of social media – sites like Instagram and TikTok. We trained the Oyster staff to tell their own stories, using only iPhones.

Learn More
SEPA Case Study Logos
Scottish Environmental Protection Agency

We were approached by SEPA, the Scottish Environmental Protection Agency because they had to continually find a way to ‘feed the media beast’. The result was that SEPA was able to tell their own stories, whenever they wanted, and at almost no additional cost.

Learn More
Image 11-11-22 at 6.25 PM

Michael on Media

Michael Rosenblum has been writing about the media since 1988. His work and ideas have appeared in The Guardian, The Huffington Post, Ilkeston Life and many other publications.

He has been blogging regularly for the past 35 years on this subject. Having taught media studies at Columbia University, NYU and now the University of Oxford, he is considered an expert on this subject.

Continue reading this post or look back at previous posts.

Read More

Do You Have Questions About Learning Video Skills?

If you would like to know more about our courses contact us and one of our training advisors will be happy to call you.

Contact Us

Copyright 2024. All rights reserved.