Freitag, 27. November 2015

VHS 2.6e

The new VHS provides several .desktop files,
  • to ease association to play audio and video files directly from GUI
  • to start screen-, webcam, or guide- recording directly
  • to configure VHS from the settings menu.
Get the latest tarball: https://github.com/sri-arjuna/vhs/releases/tag/v2.6e
Or download from github directly:

git clone https://github.com/sri-arjuna/vhs.git
cd vhs
./configure --prefix=/usr
./make-install

Hope you like it, enjoy!

Samstag, 21. November 2015

Two advanced simple bash menus

Many times one comes along a situation one wants to present a menu.
There are many ways to achieve this, none is wrong, none is right - each has its own value for its own situation.
However, to maintain or extend an existing menu can be hard to manage, at times.

I'd like to present you two of my favorite menu styles/types.
Hope you like them. :)

Variables:

Lets say you have a bunch of lists to handle, that you would like to present as menu...
It takes the variable prefix BUY_ and lists only the 'suffix' as menu content.
Simply add a new variable, and it will be listed in the menu.
Simply rename an existing variable, and as long the prefix BUY_ exists, it will be applied to the menu.
## Uncomment the variable assignments, to extend the menu
## Alll the menu 'management' can be done 'up here'
    BUY_FRUITS="apple banana kiwi"
    #BUY_PROTEIN="steak lenses"
    #BUY_DRINK="water milk limo"

## Expand/List all variables starting with BUI_
    MENU="${!BUY_*}"

## Loops the menus
while :;do
    echo "What variable to expand?"
   
    ## Cut of BUY_ from all (//) items of the list MENU
    select item in ${MENU//BUY_} Quit;do break;done
   
    ## Let the user Quit the loop
    [ Quit = $item ] && break
   
    ## RE-append the leading BUY_ variable prefix
    sel_item=BUY_$item
   
    ## Finaly expand / list the content of sel_item (BUY_$item).
    ## These 2 echo's should replace your function
    echo "${!sel_item}"
    echo
done

Array:

Lets say you have a bunch of tasks which you want to describe, and you know you might require to change the description.
This way, you only need to change the description in the array, and it keeps working.

    # Make sure no entries remain from possible previous runs
    unset MENU
   
    # Fill the values
    MENU[0]="First menu entry"
    MENU[1]="Menu entry one"
    MENU[2]="All good things are three"
   
    # Let the user select
    select choice in Quit "${MENU[@]}";do
        # Act accordingly
        # Its recomended to call functions from here, so the menu remains 'over-see-able'
        case "$choice" in
        Quit)        break        ;;
        "${MENU[0]}")    echo "first"    ;;
        "${MENU[1]}")    echo "second"    ;;
        "${MENU[2]}")    echo "third"    ;;
        esac
    done
Have fun tweaking!

Dienstag, 29. September 2015

Almost there...

Oh yeah, i'm happy already, allthough it has not yet passed evaluation.

What i'm talking about?
I'm talking about TUI - Text User Interface for scripts, which has reached 0.8.9-GNU-RC16 yesterday evening, and if everything works out as expected, it will reach "GNU TUI 0.9.0" this week.

I've been using TUI already for about 3 years for my own 'production', but by now, it has achieved a state that deserves the label 'stable'!

The feedback, so far, has been good and promising.

What to expect when it passes the evaluation?
I plan to move the project home to: http://www.gnu.org/software/tui to share the texinfo manual and to be the first and primary point of announcements regarding it.

Obviously i'll post here about it too, but more in a human-speaking way, and less technical as there.

Oh im so excited, that i just cant hide it...
*dance dance*

Sonntag, 27. September 2015

How to start coding GNU/Linux software

An often asked question is:

How do i start coding for the GNU/Linux community?

Well, assuming you already can write code, we can focus on GNU/Linux specific issues.

First read:
Coding Standards: http://www.gnu.org/prep/standards/html_node/
Translating using gettext: http://www.gnu.org/software/gettext/manual/gettext.html

While preparing your documention:
texinfo: http://www.gnu.org/software/texinfo/manual/texinfo/texinfo.html

Then, with your first example project following those guide lines, go ahead and dig into:
Autconf: http://www.gnu.org/software/autoconf/manual/autoconf.html
Automake: http://www.gnu.org/software/automake/manual/automake.html
These tools will help to compile your project at the enduser side without issues.

I figured the hard way, created a project, and then had to apply (at least some of) these standards afterwards.. which caused lots of unrequired work...


Other than that, try to make something new, not yet another media converter based upon ffmpeg or avutils.
To do so, search the already existing software at:
Of course, just as/for a training project, you can do whatever you like, just dont expect anyone to jump around in that case.

Hope this helps

Montag, 21. September 2015

YASSI 1.0.1 - Final release

I'm happy to announce the final release of YASSI.

YASSI does not need to be installed, unless you want to 'info yassi'.
The project name and version 'yassi'/1.0.1, and both lines with 'Report bugs...' are read from the configuration file,
and therefor will adjust to your project settings.
Not even 2 months ago I had started with this project, and it already provides all the functions i've wanted for it.While I initially started it for another project of mine where i needed to focus on the duty, i wanted to have it as its own project, to use with ther projects.

I do hope you helps you as much as it does for me.

What is YASSI again?

Yet Another Simple Script Installer

What is it for?

It requires a single file to provide all information for an installation custom to your needs,
while staying easy change-able by the end user.

Get it


Donnerstag, 17. September 2015

Funny error message

Been trying to write a task manager for a script, with the recent changes for GNU TUI evalutation, this is an error i've recieved while working on VHS (Video Handler Script, using ffmpeg)...
Wondering if my security concerns were too much... 

The german words means: "Line 224: .. Syntax  Error: Operator expected. (Error causing character is \033[....)"




So basicly, aborting failed because the aborting text string for the user contained a smiley ';)'
While mainwhile the the printing fails due to an unprintable character, escape string.
But the aborting, after all, aborts successfull.

Usualy errors are just annoying, but this one i found rather funny.

BTW, these 3 bugs are fixed now.

Learn about TUI
Learn about VHS

Download them at github.

Dienstag, 8. September 2015

Minimalistic prompt (PS1)

The most usefull and minimalstic command prompt i can imagine for scripters or sys-admins:
PROMPT_COMMAND='RET=$?'
RET_VAL="$(echo $RET)"
export PS1="$RET_VAL \\$ "
If if its within a terminal window, you'll see the path you're in in the task- or titlebar.
If you really want to have the path in your shell, try this line:
export PS1="$RET_VALUE \W \\$ "

Hope you enjoy and have fun!