Date: prev next · Thread: first prev next last


Hi Paolo:

I think you're going to need a list of project names, descriptons and
urls. You'd want to maintain this list in your favorite text editor.
Note that this technique requires Bash version >= 4.
===============

declare -a Projectos=("01 02")

declare -A projectos

projectos["name01"]="project01"
projectos["desc01"]="This is a description of the project #1\nIt can
have control characters"
projectos["url01"]="http://example.com/file00.zip
http://example.comfile01.zip";

projectos["name02"]="project02"
projectos["desc02"]="#2\nIt can have control characters"
projectos["url02"]="http://example.com/file02.zip
http://example.comfile03.zip";

===============

Given this list, you're going to want to display the project name and
description, then allow the user to select the desired project. Once the
user selects a project, the contents are downloaded via wget, and
entered into the LibreOffice environment via unopkg as mentioned by Drew
in an earlier thread.

You can access the list as follows:

#!/bin/bash

source "projectos.dat"

function get() {   
    NAME=${projectos[name$1]}
    DESC=${projectos[desc$1]}
    URL=${projectos[url$1]}
}

for p in ${Projectos}
do
    get $p
    echo -e $NAME $DESC
    for u in ${URL}
    do
          echo $u
      done
done

============

Hopefully, this will be enough to get you started.

-- 
Unsubscribe instructions: E-mail to projects+help@libreoffice.org
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/www/projects/
*All messages sent to this list will be publicly archived and cannot be deleted*

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.