How to invoke Libre office spreadsheets from sfs ?SOLVED

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
nashtrik
Posts: 19
Joined: Tue Sep 08, 2020 5:26 am
Has thanked: 15 times

How to invoke Libre office spreadsheets from sfs ?SOLVED

Post by nashtrik »

I have downloaded and installed LibreOffice 7.0.4 on my bionic pup 64,but I don't see any entries in the menu or startup/find run. How do I start spreadsheet ? Thanks

Last edited by nashtrik on Sat Jan 09, 2021 1:56 pm, edited 1 time in total.
User avatar
mikewalsh
Moderator
Posts: 6024
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 733 times
Been thanked: 1896 times

Re: How to invoke Libre office spreadsheets from sfs ?

Post by mikewalsh »

@nashtrik :-

Do a re-start of 'X'. That should complete the process of the desktop entries being created in /usr/share/applications.....and then they'll show up in the Menu. I think you'll find LibreCalc under Menu->Business? Not sure, 'cos I never use it.... Loading an SFS doesn't run through the 'fixmenus->re-start 'X'' business the way a .pet will.

Personally, I don't get Menu entries, since I use the Libre Office AppImages.....but firing the AppImage up opens it at the 'Start' page anyway, so I take things from there.

Have you taken a look at Gnumeric? That's the default Puppy spreadsheet, and from what I understand, it's quite good.

Mike. ;)

nashtrik
Posts: 19
Joined: Tue Sep 08, 2020 5:26 am
Has thanked: 15 times

Re: How to invoke Libre office spreadsheets from sfs ?

Post by nashtrik »

mikewalsh wrote: Thu Jan 07, 2021 4:52 pm

@nashtrik :-

Do a re-start of 'X'.

Thanks for the prompt reply. If restarting X means clicking on restart Graphical server/ restart Windows manager/Rebuild menu...I have tried all three,but it doesn't help. All I needed Libre office for was to pull down real time stock quotes from Exchange. Since I am a non-techie, I usually search 'How to...' and follow instructions. Pulling Live data from stock exchange is easier in MS Excel[ by looking at various tutorials,of course] and I was looking for a more advanced option than Gnumeric...

User avatar
rockedge
Site Admin
Posts: 6356
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2544 times
Been thanked: 2514 times
Contact:

Re: How to invoke Libre office spreadsheets from sfs ?

Post by rockedge »

to ensure any newly added *.desktop files in /usr/share/applications to be added to the jwm menus, in a terminal:

Code: Select all

fixmenus
jwm -reload
jwm -restart

this can be done graphically by: Menu->Exit ->Rebuild Menu
and to ensure it worked as expected : Menu->Exit ->Restart Window Manager

User avatar
mikeslr
Posts: 2915
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 175 times
Been thanked: 892 times

Re: How to invoke Libre office spreadsheets from sfs ?

Post by mikeslr »

It is possible that the version of LibreOffice you obtained did not include "desktop" files at /usr/share/application which is where Puppy --AFAIK, any-- Linux will look for them to generate menu entries. You could manually create them. But as you only need one application some of the time, the easiest solution is to create a desktop launcher.

With LibreOffice, the application-desktop files call the programs at /opt/libreofficeX/program [where X is your version]. The spread sheet is a script there named "scalc" [which opens only the spreadsheet functions of the entire program]. You can file-browse into /opt/libreofficeX/program and drag scalc to your desktop (creating a 'short-cut'). Left-Clicking it will open LibreOffice-Calc.

The instructions you have to pull down real time stock quotes from Exchange under Excel should work AS-IS. Gnumeric 'speaks a slightly different dialect' and might need some 'translating'. But, may I suggest perhaps the best solution is to download the Linux version of freeoffice --the free version of SoftmakerOffice-- from here: https://www.freeoffice.com/en/download/applications. Both products are known for their Microsoft Office compatibility. You will have to register (give them an email address.) But they don't abuse it. Occasionally you'll receive a notice, the offer for a free font, or to purchase the paid version at a discount.

User avatar
rockedge
Site Admin
Posts: 6356
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2544 times
Been thanked: 2514 times
Contact:

Re: How to invoke Libre office spreadsheets from sfs ?

Post by rockedge »

I also use the FreeOffice version of Softmaker Office. Good overall compatibility fundamentals with the major office packages.

User avatar
Trapster
Posts: 173
Joined: Sat Aug 01, 2020 7:44 pm
Has thanked: 1 time
Been thanked: 44 times

Re: How to invoke Libre office spreadsheets from sfs ?

Post by Trapster »

If it's just stock quotes you're looking for, I've been using this lately.

Create a file in /usr/local/bin called stocks and make it executable.
Copy and paste the following into it.
(this file does all the background work)

Code: Select all

#!/usr/bin/env bash
set -e

LANG=C
LC_NUMERIC=C

SYMBOLS=("$@")

if ! $(type jq > /dev/null 2>&1); then
  echo "'jq' is not in the PATH. (See: https://stedolan.github.io/jq/)"
  exit 1
fi

if [ -z "$SYMBOLS" ]; then
  echo "Usage: ./ticker.sh AAPL MSFT GOOG BTC-USD"
  exit
fi

FIELDS=(symbol marketState regularMarketPrice regularMarketChange regularMarketChangePercent \
  preMarketPrice preMarketChange preMarketChangePercent postMarketPrice postMarketChange postMarketChangePercent)
API_ENDPOINT="https://query1.finance.yahoo.com/v7/finance/quote?lang=en-US&region=US&corsDomain=finance.yahoo.com"

if [ -z "$NO_COLOR" ]; then
  : "${COLOR_BOLD:=\e[1;37m}"
  : "${COLOR_GREEN:=\e[32m}"
  : "${COLOR_RED:=\e[31m}"
  : "${COLOR_RESET:=\e[00m}"
fi

symbols=$(IFS=,; echo "${SYMBOLS[*]}")
fields=$(IFS=,; echo "${FIELDS[*]}")

results=$(curl --silent "$API_ENDPOINT&fields=$fields&symbols=$symbols" \
  | jq '.quoteResponse .result')

query () {
  echo $results | jq -r ".[] | select(.symbol == \"$1\") | .$2"
}

for symbol in $(IFS=' '; echo "${SYMBOLS[*]}" | tr '[:lower:]' '[:upper:]'); do
  marketState="$(query $symbol 'marketState')"

  if [ -z $marketState ]; then
    printf 'No results for symbol "%s"\n' $symbol
    continue
  fi

  preMarketChange="$(query $symbol 'preMarketChange')"
  postMarketChange="$(query $symbol 'postMarketChange')"

  if [ $marketState == "PRE" ] \
    && [ $preMarketChange != "0" ] \
    && [ $preMarketChange != "null" ]; then
    nonRegularMarketSign='*'
    price=$(query $symbol 'preMarketPrice')
    diff=$preMarketChange
    percent=$(query $symbol 'preMarketChangePercent')
  elif [ $marketState != "REGULAR" ] \
    && [ $postMarketChange != "0" ] \
    && [ $postMarketChange != "null" ]; then
    nonRegularMarketSign='*'
    price=$(query $symbol 'postMarketPrice')
    diff=$postMarketChange
    percent=$(query $symbol 'postMarketChangePercent')
  else
    nonRegularMarketSign=''
    price=$(query $symbol 'regularMarketPrice')
    diff=$(query $symbol 'regularMarketChange')
    percent=$(query $symbol 'regularMarketChangePercent')
  fi

  if [ "$diff" == "0" ]; then
    color=
  elif ( echo "$diff" | grep -q ^- ); then
    color=$COLOR_RED
  else
    color=$COLOR_GREEN
  fi

  if [ "$price" != "null" ]; then
    printf "%-10s$COLOR_BOLD%8.2f$COLOR_RESET" $symbol $price
    printf "$color%10.2f%12s$COLOR_RESET" $diff $(printf "(%.2f%%)" $percent)
    printf " %s\n" "$nonRegularMarketSign"
  fi
done

Step 2
Create another file in /usr/local/bin and name it stock_index and make it executable.
Copy and paste the following into it:
(This file tells the "stocks" file what stock symbols to look for)

Code: Select all

#!/bin/sh

xterm -hold -e stocks ^dji ^ixic wmt ibm tsla amzn nvax btc-usd

Download jq from here and save it somewhere in your path (/usr/local/bin) and make sure it's executable.

Drag the "stock_index" file to your desktop and click on it.
The stock indexes can be found in "stock_index" file and it's pretty self explanatory

You can also invoke "stock_index" from a console

User avatar
bigpup
Moderator
Posts: 6822
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 867 times
Been thanked: 1466 times

Re: How to invoke Libre office spreadsheets from sfs ?

Post by bigpup »

I have downloaded and installed LibreOffice 7.0.4 on my bionic pup 64

Downloaded it from where?
What did you actually download?
How did you do the install?

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
mikewalsh
Moderator
Posts: 6024
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 733 times
Been thanked: 1896 times

Re: How to invoke Libre office spreadsheets from sfs ?

Post by mikewalsh »

@nashtrik :-

Actually, t'other Mike could be right. I've not often used it - more often than not I download direct from the site and either build my own packages, or use the AppImages, as I said - but on the few occasions I've used the Menu->Document->Get LibreOffice app, once or twice I, too, have ended up with a package that has NO .desktop entries at all.

Rare, but it CAN happen. :o

The AppImages don't have a MenuEntry in any case.....unless you build one. And then it's only a 'launcher'.....after which, you navigate from the Start page, within the suite itself.

Mike. ;)

nashtrik
Posts: 19
Joined: Tue Sep 08, 2020 5:26 am
Has thanked: 15 times

Re: How to invoke Libre office spreadsheets from sfs ?

Post by nashtrik »

bigpup wrote: Fri Jan 08, 2021 12:42 am

I have downloaded and installed LibreOffice 7.0.4 on my bionic pup 64

Downloaded it from where?
What did you actually download?
How did you do the install?

I installed it from Menu ....>>Document....>> Get Libreoffice. It gave me three options , one was 6.x.x and two were 7.x.x . I installed the latest 7.0.4. I installed the sfs...

nashtrik
Posts: 19
Joined: Tue Sep 08, 2020 5:26 am
Has thanked: 15 times

Re: How to invoke Libre office spreadsheets from sfs ?

Post by nashtrik »

mikeslr wrote: Thu Jan 07, 2021 6:19 pm

It is possible that the version of LibreOffice you obtained did not include "desktop" files at /usr/share/application which is where Puppy --AFAIK, any-- Linux will look for them to generate menu entries. You could manually create them. But as you only need one application some of the time, the easiest solution is to create a desktop launcher.

Thanks a Lot Bro.....Finally I was able to do it....!!!
:thumbup:

Post Reply

Return to “Beginners Help”