Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 25 Nov 2017, 03:50
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
fields.awk database
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 5 of 7 [99 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7 Next
Author Message
musher0


Joined: 04 Jan 2009
Posts: 11181
Location: Gatineau (Qc), Canada

PostPosted: Sun 26 Jun 2016, 14:42    Post subject:  

@cabbie0

I think you forgot to actually zip your fields-bold.awk file. As it is, it's a fake zip.

@all : remove the zip ending and you have the script.

IHTH. BFN.

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
cabbie0

Joined: 23 Jun 2016
Posts: 22
Location: British Columbia, Canada

PostPosted: Sun 26 Jun 2016, 15:11    Post subject: Other devices  

@Pete
I can answer yes for two of those.
Fields.awk will run on a Mac running OSx because I tried it a few years back on a Mac mini.
Who knows if recent shell changes might have nixed that however.

As for tablets, I have fields.awk running on a Samsung Galaxy 7" screen tablet.
This was achieved by installing the ZShaolin terminal emulator app.
( https://play.google.com/store/apps/details?id=org.dyne.zshaolin&hl=en )
You have to copy the executable to /system/bin/
and you have to change the first line to #! system/bin/bash, because that is where their bash executable resides.
However, I have had to use the old system of datafile selection; that is
fields.awk [path_to_datafile]
at which point it works fine.
For some reason the S (data file selection) feature causes error messages.

Also, I'm using Android version 4.4.2 on Model# SM-T230NU and I heard rumors about ZShaolin not running properly anymore on the newer Android versions. I hope that isn't true.
fields_on_tablet.jpg
 Description   Samsung Galaxy tablet, Android 4.4.2, ZShaolin terminal emulator
 Filesize   162.3 KB
 Viewed   220 Time(s)

fields_on_tablet.jpg

Back to top
View user's profile Send private message 
cabbie0

Joined: 23 Jun 2016
Posts: 22
Location: British Columbia, Canada

PostPosted: Sun 26 Jun 2016, 15:16    Post subject: Zip file kerfuffle  

@all
Sorry about that. Meant to mention that it was a fake zip. Such a small file didn't seem to need actual zipping.

Thank you Christian (musher0) for pointing that out.

@Pete
Thank you for the link to Puppy Linux time line. My, how you've diversified.
Back to top
View user's profile Send private message 
Pete


Joined: 02 Mar 2014
Posts: 675

PostPosted: Sun 26 Jun 2016, 15:26    Post subject:  

@cabbie0

Thanks for confirming that it will run on MAC and Android.
Let's hope that the rumors are not true.

I have also asked the wife to load Cygwin on her Win 8.1 machine to try it out.
Will report back.

BTW, in case you weren't aware, there is a simple way to take a screenshot on an Android device:
(Don't know if it works on all devices and versions)

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

Tap the Android Settings button.

Locate the section titled Device and then tap the Motions and gestures entry.

Make sure that Palm swipe to capture is selected (has a check mark).

Now, simply put the side of your hand (the side of your palm) on the right side
of your Galaxy screen and ‘swipe’ it across to the other side.

You’ll hear the camera “snapping” noise,
and an animation indicating the screenshot was taken and saved.

======================================
Back to top
View user's profile Send private message 
Pete


Joined: 02 Mar 2014
Posts: 675

PostPosted: Sun 26 Jun 2016, 15:56    Post subject:  

Getting back to which Terminals can handle URL's, I have only managed to get LXTerminal to work.

However, the URL must have a http:// in front else you get an error even though the cursor does change and it becomes underlined.
Web browsers seem to be quite happy without it.
URLinLXTerm.png
 Description   
 Filesize   15.52 KB
 Viewed   208 Time(s)

URLinLXTerm.png

URLinLXTermError.png
 Description   
 Filesize   35.67 KB
 Viewed   201 Time(s)

URLinLXTermError.png

Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 4721
Location: Republic of Novo Zelande

PostPosted: Sun 26 Jun 2016, 17:12    Post subject:  

Pete wrote:

BTW, in case you weren't aware, there is a simple way to take a screenshot on an Android device........
.

Another common way is to press the power button and volume down button at exactly the same time. As you say - not all models though. Depends on android version.
.
Back to top
View user's profile Send private message 
cabbie0

Joined: 23 Jun 2016
Posts: 22
Location: British Columbia, Canada

PostPosted: Sun 26 Jun 2016, 18:34    Post subject: Android screenshot  

@Pete
Whoa, I didn't know that. Thanks.
On mine, its SETTINGS -> CONTROLS -> PALM MOTION
It wouldn't do it while the keyboard was loaded, but as soon as that was backed off it worked.

@greengeek
Could not get the simultaneous button method to work.
Screenshot_2016-06-26-15-17-38.png
 Description   Using the palm_swipe method for screen capture....
 Filesize   77.45 KB
 Viewed   181 Time(s)

Screenshot_2016-06-26-15-17-38.png

Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 3194
Location: New Zealand

PostPosted: Sun 26 Jun 2016, 18:48    Post subject: Re: Miscellaneous  

cabbie0 wrote:

Also very interesting regarding the CTRL-click trick for launching a link displayed in LXterminal. Ha!
I tried it with Xfce4-terminal and sakura, but it only worked for LXterminal.
Had the xdg-utils installed from something else apparently...


I've since installed sakura version 3.3.4 on XenialDog and it also now has an Open Link option on right-click. I didn't try it prior to installing xdg-utils, but I expect it needs the xdg-open facility provided by that too. EDIT: It doesn't seem to need xdg-utils afterall (I tried it without).

William

_________________
SomeOfMyWork with links:
dCoreDog
weX, scrox, Precord, Premote, fokSyfEyeR, xhippo-mod, flite_hts_pet
Back to top
View user's profile Send private message Visit poster's website 
Pete


Joined: 02 Mar 2014
Posts: 675

PostPosted: Mon 27 Jun 2016, 04:54    Post subject:  

@cabbie0

Glad you got the screen capture going on your Android.

Been looking around the Google play store and there are several Terminal emulators available, some obviously better than others.

Since the end of the month is only a few days away, it's a perfect time for me to get two new toys.
There is a charity shop a few blocks away from the office and they have older model, unloved Android phones at good prices so will get one to experiment.
Even if I brick it, not bothered, just get another one, they are cheap enough.

Second toy which I've been meaning to get for a while now is a Rasp Pie.
Will then load the "official" distro, all 1GB of it (yikes, that is equivalent to 10 puppies) and try out fields.awk amongst other things.
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 4721
Location: Republic of Novo Zelande

PostPosted: Mon 27 Jun 2016, 14:21    Post subject:  

Can anyone give me a tip about the best way to present EVERY database entry for inspection please?

Lets assume I have 100 tax receipts entered into my database and want to provide a list of the lot to the IRS - I could do a "read" and allow fields.awk to create a printout in either txt or html format - but I am struggling to ensure that EVERY entry is selected.

If I assume that every entry contains a "cost price" like "$27.50" I could use "$" as my search term - except for one thing - I do not enter the $ sign when I create each record, just the numerical amount. So how do I search and present every database entry?

I also tried searching on "Cost" as I figured that is one of the field names and therefore is relevant to every record - but the read function is not designed to include field names in it's search (for good reasons of course).

If I print out the text file of the database my eyes start to suffer from "colonic" disease Smile So what methods do you recommend for presenting the entire database in human readable form please? cheers!
Back to top
View user's profile Send private message 
cabbie0

Joined: 23 Jun 2016
Posts: 22
Location: British Columbia, Canada

PostPosted: Mon 27 Jun 2016, 15:27    Post subject: Inclusive (all-entry) Output Displays  

@greengeek

Just so happens there's an app for that Smile
This is incredibly simple and I don't even know why it works, but it does.
Discovered early on that if you just hit ENTER when prompted for the search string, fields.awk spews out the entire database at one go.
No need to agonize over what might be included in each and every record.

In fact, you don't have to specifically answer the "Save to file?" or "Case sensitive" queries either.
Hitting ENTER on those also just goes with the defaults of "No save" and "Not case sensitive".
So in order to get a full readout of all the entries, just select your database file, launch the READ function, then hit ENTER three times in succession.
However in your case it sounds like you DO want to save the file for a printout, so select SAVE for your txt/html ouput files; then ENTER twice.

Hope that helps.

@Pete
New toys! yeah
I no nothing about the Raspberrries. Please let me know how that goes.

Ian
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 4721
Location: Republic of Novo Zelande

PostPosted: Mon 27 Jun 2016, 15:30    Post subject: Re: Inclusive (all-entry) Output Displays  

cabbie0 wrote:
Just so happens there's an app for that Smile
Thanks Ian. Nice app! Smile All too easy.
Back to top
View user's profile Send private message 
cabbie0

Joined: 23 Jun 2016
Posts: 22
Location: British Columbia, Canada

PostPosted: Mon 27 Jun 2016, 15:33    Post subject: Why it works  

Perhaps fields.awk reasons that "Searching for nothing" is the same as "Searching for anything"....
Is there a lesson there?
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 4721
Location: Republic of Novo Zelande

PostPosted: Mon 27 Jun 2016, 15:51    Post subject: Re: Why it works  

cabbie0 wrote:
Perhaps fields.awk reasons that "Searching for nothing" is the same as "Searching for anything"....
Is there a lesson there?

Hmmm, indiscriminate searching. You've just given me an idea. Once I've entered thousands of tax receipts I think I'll print out the lot and send the list to IRS with a polite note saying "Fields.awk thought you might be interested in all these. Please process as required".

Timesaver!
Cool
Back to top
View user's profile Send private message 
Pete


Joined: 02 Mar 2014
Posts: 675

PostPosted: Mon 27 Jun 2016, 18:50    Post subject:  

Can confirm that fields.awk and fields2html work in Win 8.1 (64 bit) under Cygwin64.

Few notes:

Both fields.awk and fields2html must be placed in /usr/sbin

As fields.awk by default saves the search files to ~/Desktop, one must create this directory in /home/TheUsersName/

For some reason calling fields2html directly in fields.awk did not work, one must change it to ./fields2html .....

After this it worked flawlessly.

Could well be that I never set the PATH under Cygwin but the wife was getting rather tense at my constant moaning at her Windoze computer
so just did a quick test and switched off. Laughing
Capture1a.png
 Description   
 Filesize   49.11 KB
 Viewed   76 Time(s)

Capture1a.png

Capture1b.png
 Description   
 Filesize   85.59 KB
 Viewed   71 Time(s)

Capture1b.png

Capture2a.png
 Description   
 Filesize   15.88 KB
 Viewed   72 Time(s)

Capture2a.png

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 5 of 7 [99 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0710s ][ Queries: 12 (0.0097s) ][ GZIP on ]