Friday, June 03, 2016

My wishlist for Google Play Store

I have been using Android devices for many years.  I love the phones and tablets as I have more control over what it has and does than other products.  I will admit it isn't perfect and some makers do put on crap-ware that is difficult if not impossible to remove, but, for the most part it just works and in low end devices.

The only issue I have is with the Play store.  For the most part it isn't bad when selecting categories and if you want 'free' or 'paid'.  I am surprised though that the company that made it big in search doesn't have a good search function in the play store.  When I go to look for a specific area or product I usually need to wade through page after page of apps before I find what I want.  This isn't just for apps, I have the same issue when looking for books and movies too.  My wish list for filters would be:
  • Author
  • Last update (range of values)
  • Rating (range of values)
  • Number of ratings (range of values)
  • Cost (range of values)
  • Ad-supported
  • Include or exclude apps I have already installed
It would be nice to have a permanent filter too.  There are times I know certain companies/people make crap-ware that I have no interest in seeing.  Also it would be nice to toggle Boolean functions (and, or, not) for the categories.

I was looking for a household inventory app so I can record what we own, what room, serial number (or bar-code), photo, cost and notes.  There were too many to quickly go through.  For those that looked interesting I checked to see when the last update was.  Not being fair, but, if it wasn't updated in the last year I am not interested as there is a chance the author abandoned the app.  It took me almost an hour to wade through a lot of crap and what was there didn't fit what I was looking for.  A lot of listings were for insurance companies and I didn't want to see those.  I don't have a problem paying for an app, but, it would be nice if they had a free-to-try limited version of the app so I can see if it would fit what I need and then pay them after.  I did that for the DVD library app 'Movie Collection + Inventory' by Metosphere.  It had a free option and after a quick try I paid for the full version.  When I get some free time I will be checking out the book collection app.  This is the model I prefer, try it first, buy it second if I like it.

One other option is do what I do best, write a quick and dirty program or a create a spreadsheet to store the information.  I originally did a quick-and-dirty spreadsheet for the DVD library until I found the app I liked and then imported a lot of data.  I try to keep things simple and LibreOffice has a great spreadsheet and it allows me to export out to various formats (like PDF and CSV).

Saturday, May 14, 2016

Adding Google Drive to my Linux Box

GRIVE Installation and scripting

I have been digging around to see if there is a Google Drive service available for my Linux box.  I preferred to have something like what I have on the high end laptop (windows 10) in that it looks like a drive and I can manipulate the files in any way I want and updates GDRIVE immediately.  So far there is nothing like that in LINUX, but, there is a package called GRIVE.  I read up the documentation on the package and saw that it was something that I could use for now.  I installed the package, followed the instructions to link the app to my GMAIL account and then did a synchronize.  The first run took several minutes while it downloaded all of the files and folders, but, when I run again the synchronize took only a few seconds.  While this isn't perfect it does allow me to access my GDRIVE files, make updates and then sync the changes.

I always like to automate my tasks if I have to run it more than once.  For jobs scheduled on a regular basis I prefer CRONTAB, for things not on a regular schedule I prefer a folder with scripts or links to do the job.  For GRIVE I wrote two very simple BASH scripts to automate my synchronizing my GDRIVE files.  The first one displays to the user what will be done and give them the option to continue or quit.  The second calls the first from an XTERM window where I set up the font to a readable size.  I dropped a link to the second script to my desktop and ran it.  The script is very simple, possibly over-kill, but, I like to automate things so one click does the work for me.  I ran the script this morning as I had two new images (for this blog entry) and it synchronized my files in several seconds.  There is a lot more to the script that what you see, but, it is just setting up the color variables and getting the system time.  I don't need to use the time yet, but, it is part of my normal BASH skeleton script.

Screen shots

BASH script to sync to Google Drive using GRIVE

What the BASH script presents to me when run

Full BASH script to run GRIVE

#! /bin/sh
# ANSI Colors
#
#  Version:
#    - Version 1.0.0 2016/05/15
#    - Copyright 2016 Thomas Traynor.
#    - Program is distributed under the terms of the GNU General Public License
#    - http://www.gnu.org/licenses/gpl.txt       
#    - Release Notes:
#
#
#  Notes:
#
# ------------------------------------------------------------


zSetANSI() {

# Foreground colors:
    uFGBK="\033[30m";   #Black
    uFGLRD="\033[31m";  #Low  Red
    uFGHRD="\033[91m";  #High Red
    uFGLGR="\033[32m";  #Low  Green
    uFGHGR="\033[92m";  #High Green
    uFGLYW="\033[33m";  #Low  Yellow
    uFGHYW="\033[93m";  #High Yellow
    uFGLBU="\033[34m";  #Low  Blue
    uFGHBU="\033[94m";  #High Blue
    uFGLMG="\033[35m";  #Low  Magenta
    uFGHMG="\033[95m";  #High Magenta
    uFGLCY="\033[36m";  #Low  Cyan
    uFGHCY="\033[96m";  #High Cyan
    uFGHGY="\033[37m";  #High Gray
    uFGLGY="\033[90m";  #Low  Gray
    uFGWT="\033[97m";   #White

# Background colors:  
    uBGBK="\033[40m";   #Black
    uBGLRD="\033[41m";  #Low  Red
    uBGHRD="\033[101m"; #High Red
    uBGLGR="\033[42m";  #Low  Green
    uBGHGR="\033[102m"; #High Green
    uBGLYW="\033[43m";  #Low  Yellow
    uBGHYW="\033[103m"; #High Yellow
    uBGLBU="\033[44m";  #Low  Blue
    uBGHBU="\033[104m"; #High Blue
    uBGLMG="\033[45m";  #Low  Magenta
    uBGHMG="\033[105m"; #High Magenta
    uBGLCY="\033[46m";  #Low  Cyan
    uBGHCY="\033[106m"; #High Cyan
    uBGLGY="\033[47m";  #Low  Gray
    uBGHGY="\033[107m"; #High Gray

# Underline:
    uFGULINE="\033[4m";
  
# Blink:
    uFGBLINK="\033[5m";
  
# Reset all:  
    uFGRESET="\033[0m"
}


#
#  Get the system clock and set to a variable.
#

zGetDATE() {

# System date.  For all date options type date --h on command line.

    uSYSYY=$(date +%Y);
    uSYSMM=$(date +%m);
    uSYSDY=$(date +%d);
    uSYSDT=$uSYSYY$uSYSMM$uSYSDY;
  
    uSYSHH=$(date +%H);
    uSYSMIN=$(date +%M);
    uSYSSEC=$(date +%S);
    uSYSTM=$uSYSHH$uSYSMIN$uSYSSEC;
  
    uSYSJDT=$(date +%j);
    uSYSWK=$(date +%W);
    uSYSDOW=$(date +%w);
    uSYSDAY=$(date +%A)  
    uSYSMTH=$(date +%B)
}

# ============================================================
# END OF ALL SUBROUTINES FOR THIS SCRIPT.
# ============================================================

zSetANSI;
zGetDATE;

# Define the working variable for return codes:
uRC=0;

# Get current directory name
uDir=$( cd "$( dirname "$0" )" && pwd);

#"

# Get process ID
uProcID=$$


#  Now echo out the stuff to the console:

clear;
echo ;
echo -e "${uFGHRD}Syncronize with Google Drive${uFGRESET}";
echo ;

cd ~/GoogleDrive

echo -e "${uFGLGR}This could take a while syncronizing the files."
echo -e "If you want to continue press ${uBGLGR}${uFGBLINK}${uFGBK}[ENTER]${uFGRESET}"
echo -e "${uFGLGR}otherwise ${uBGLGR}${uFGBLINK}${uFGBK}[CTRL-C]${uFGRESET}${uFGLGR}."
echo -e "${UFGRESET}"
read uLINE
grive

echo ;
echo -e "${uFGHRD}Syncronize Finished${uFGRESET}";
echo -e "${uFGLGR}press ${uBGLGR}${uFGBLINK}${uFGBK}[ENTER]${uFGRESET}${uFGLGR} to finish update"
read uLINE

Wednesday, May 04, 2016

Touchpad on/off

Having the laptop touch-pad on when I have a mouse is a pain.  I dug through the system to see if there was a setting to turn it off when a mouse was connected, but, I couldn't find it.  I did the next best thing, I create two simple scripts.  One to turn it on and one to turn it off.  The command was synclient TouchPadOff=n where n is 1 for off and 0 for on.  I then created links to the main screen where I can quickly turn it on or off.  Yes, you can do it in one script, but, this was a quick and dirty solution and it works well enough for me.

Scripts for touchpad control

Link on desktop when I turn it on/off