Puppy Database

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#241 Post by smokey01 »

Yeah the original version menu wasn't in a very logical order and the terms used didn't make much sense, not to me anyway, so I changed it.
Attachments
old.png
The original version
(16.61 KiB) Downloaded 1406 times
new.png
My modified version
(17.86 KiB) Downloaded 1366 times

User avatar
6502coder
Posts: 677
Joined: Mon 23 Mar 2009, 18:07
Location: Western United States

#242 Post by 6502coder »

smokey01 wrote:@musher0, found the problem.

I had a directory called tmp in /root that was created by another app. This prevented touch from creating a file called tmp in /root.
I noticed this too when I played with fields.awk. It's one of the first things I changed. Applications writing temporary files in the user's home directory is a BIG NO-NO in my book. That's what /tmp is for!

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#243 Post by greengeek »

6502coder wrote:
smokey01 wrote:@musher0, found the problem.

I had a directory called tmp in /root that was created by another app. This prevented touch from creating a file called tmp in /root.
I noticed this too when I played with fields.awk. It's one of the first things I changed. Applications writing temporary files in the user's home directory is a BIG NO-NO in my book. That's what /tmp is for!
But wouldn't the same problem have occurred if the file already existed in /tmp? The way I read it the problem is the failure to detect if the file already exists (and choose a different file name or location if so...). Doesn't matter where the file already exists - the question is what to do about that.

User avatar
6502coder
Posts: 677
Joined: Mon 23 Mar 2009, 18:07
Location: Western United States

#244 Post by 6502coder »

Well, first off, touch simply changes the timestamp on a file -- it doesn't matter whether the file already exists or not -- so there shouldn't have been a permissions problem, unless maybe some of that shady spot/fido business was involved.

Secondly, the shell provides mechanisms for making unique temporary file names, and that's what I always do. The mktemp command is probably the best way, but being old-school I usually use the classic method of including $$ (the process ID) as part of the file name.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#245 Post by musher0 »

Hello everyone.

Have we forgotten that all Puppies have on board THE very powerful
sqlite3 database processor? ;)

Now that we're reminded, the next thing we lazy bones must do is learn
the sqlite language! :lol:

This one-liner will call it as a stand-alone window, like in the attached pic.

Code: Select all

urxvt -bg snow -fg "#432D1E" -g 90x28 +tr -cr orange -bd orange3 -b 20 -e sqlite3
You may fiddle with it as you like.

Please remember that If you use the above line in a script or make it into
a string, the foreground color ( -fg ) will have to be written '\#432D1E'. As
a general rule, in such situations, the # character of any hex color needs
to be escaped.

BFN
Attachments
sqlite3-on-Puppies.jpg
(54.11 KiB) Downloaded 1221 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#246 Post by smokey01 »

Thanks musher. I hadn't forgotten about sqlite but last time I looked it nearly did my head in. I'm currently writing a small database similar to awk. Maybe I should re-visit sqlite.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#247 Post by musher0 »

Hi Smokey01.

You're brave! I wouldn't even think of trying to emulate awk!

Best of luck!
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Pelo

When you must create your reports, then only the best go on.

#248 Post by Pelo »

SQLite Manager 0.8.3.1 available as addon in Firefox and Seamonkey 290kb
Easy to create fields, and to fulfill, but so boring !
When you must create your reports, that will get everybody giving up.
Downloads : 5.000.000 (more)
Attachments
vendee85.jpg
108 reecords, people providing French revolution army with food.
(78.51 KiB) Downloaded 1174 times

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#249 Post by smokey01 »

SQLiteStudio doesn't look too bad but much bigger than I want. I might try and wrap a gtkdialog around sqlite one day.

@musher0 I'm not competing with awk, using some awk, grep and gtkdialog.

Only a few more hurdles to jump.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#250 Post by musher0 »

@ Smokey01:
I still think you're brave! :)
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#251 Post by smokey01 »

musher0 wrote:@ Smokey01:
I still think you're brave! :)
Maybe just a little stupid as well :cry: :cry: :oops: :oops:

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#252 Post by musher0 »

:)
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#253 Post by smokey01 »

CatDude and myself have been working on a little database application written in gtkdialog. It's small, fast and simple to use. It's based on Ian R. Forsyth's fields.awk database with some serious modifications. It should run on any Linux OS, 32 or 64bit with bash, sed, awk, gawk and gtkdialog2.

There are a lot of things going on under the hood. We even changed the colours to make it easier on the eyes, especially when using it late at night.

Thanks to some1, MochiMoppel and musher0 for a little guidance along the way.
Attachments
spd.png
This is what it looks like.
(99.24 KiB) Downloaded 1047 times
spd-1.1-noarch-1.txz.gz
For Slackware based systems like Slacko and Fatdog.
Fake gz, just remove the .gz
(7.59 KiB) Downloaded 433 times
spd-1.1-noarch.pet
For distros that use pets.
(7.55 KiB) Downloaded 379 times
Last edited by smokey01 on Sun 10 Sep 2017, 01:32, edited 5 times in total.

Minnesota
Posts: 326
Joined: Thu 11 Sep 2008, 11:25

Installing

#254 Post by Minnesota »

For the novice of the world and group.
I am using fatdog64-710, put both the pet and the Txz on a stick.
Inserted stick into the computer with Fatdog clicked on, asked to extract txz file. OK, created files on the stick. Guess wrong location.
Next extracted to running fatdog location sda. What next?

Ran pet, same situation- no obvious actions. Some of us do not know how to run things without a menu entry or at least instructions.

Please a few instructions.

Thanks.

Is the comment regarding dependencies relevant to Fatdog64-100 or are they included in the base or pet?

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#255 Post by musher0 »

smokey01 wrote:CatDude and myself have been working on a little database application written in gtkdialog. It's small, fast and simple to use. It's based on Ian R. Forsyth's fields.awk database with some serious modifications. It should run on any Linux OS, 32 or 64bit with bash, sed, awk, gawk and gtkdialog2.

There are a lot of things going on under the hood. We even changed the colours to make it easier on the eyes, especially when using it late at night.

Thanks to some1, MochiMoppel and musher0 for a little guidance along the way.
Hi smokey01.

Have you broken the news to Ian?
I hope he does not have a heart condition.
Did you get his permission first?

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#256 Post by musher0 »

Hi CatDude and smokey01.

"was inspired by Ian Forsyth?" "but heavily modified"?
Please rub it in. How the man must feel.
I am this close from calling you "ingrates"...

Anyway I disagree with this kind of initiative -- passing a CLI program
for a GUI one through cosmetic changes.

If you want to run Fields.awk in a separate window, you can do it with a
wrapper like this:

Code: Select all

#!/bin/sh
# fields_awk.sh
# Launcher for Ian R. Forsyth's fields.awk script
# Can be called from a *.desktop file in /usr/share/applications.
# (c) musher0, Nov. 28, 2015; rév. : 19 juillet 2017.
####
FNT="fn xft:LiberationMono:pixelsize=14:antialias=true:autohint=true"
UrXvT="rxvt -sr -$FNT -b 15 -bd grey50 -tint SaddleBrown -sh 90"
[ -e /usr/bin/fields_ext.awk ] && $UrXvT -e fields_ext.awk
# This way, the script can be run from anywhere, provided
# the launcher and the script are in the same folder.
The advantage is that Ian's code is not changed. It's his work, he changes it
as he sees fit. He is not dead yet, AFAIK.

If you are that allergic to CLI programs. please go see a doctor? It is a
curable condition, I think.

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

Re: Installing

#257 Post by smokey01 »

Minnesota wrote:For the novice of the world and group.
I am using fatdog64-710, put both the pet and the Txz on a stick.

Inserted stick into the computer with Fatdog clicked on, asked to extract txz file. OK, created files on the stick. Guess wrong location.
Next extracted to running fatdog location sda. What next?

Ran pet, same situation- no obvious actions. Some of us do not know how to run things without a menu entry or at least instructions.
Why would you use a pet file in Fatdog64-710? Fatdog uses .txz packages. All you have to do is right click on the package and install it.

There is a menu entry under Utilities.
Minnesota wrote: Please a few instructions.

Thanks.

Is the comment regarding dependencies relevant to Fatdog64-100 or are they included in the base or pet?
Most, if not all pups have those dependencies so they shouldn't cause an issue. Once the application is running you will see some help under the menu bar help or tool-tips.

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#258 Post by smokey01 »

musher0 wrote:Have you broken the news to Ian?
I hope he does not have a heart condition.
Did you get his permission first?

BFN.
I'm not sure, have I?

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#259 Post by smokey01 »

musher0 wrote:Hi CatDude and smokey01.

"was inspired by Ian Forsyth?" "but heavily modified"?
Please rub it in. How the man must feel.
I am this close from calling you "ingrates"...
He should feel honoured as I give him credit where it's due.
musher0 wrote: Anyway I disagree with this kind of initiative -- passing a CLI program
for a GUI one through cosmetic changes.
Are you serious. Out of 460 lines of code less than 20 lines resemble fields.awk. I think that's just a little more than cosmetic changes.
musher0 wrote: If you want to run Fields.awk in a separate window, you can do it with a
wrapper like this:

Code: Select all

#!/bin/sh
# fields_awk.sh
# Launcher for Ian R. Forsyth's fields.awk script
# Can be called from a *.desktop file in /usr/share/applications.
# (c) musher0, Nov. 28, 2015; rév. : 19 juillet 2017.
####
FNT="fn xft:LiberationMono:pixelsize=14:antialias=true:autohint=true"
UrXvT="rxvt -sr -$FNT -b 15 -bd grey50 -tint SaddleBrown -sh 90"
[ -e /usr/bin/fields_ext.awk ] && $UrXvT -e fields_ext.awk
# This way, the script can be run from anywhere, provided
# the launcher and the script are in the same folder.
The advantage is that Ian's code is not changed. It's his work, he changes it
as he sees fit. He is not dead yet, AFAIK.
musher0 wrote: If you are that allergic to CLI programs. please go see a doctor? It is a
curable condition, I think.
Now come on musher0 you know that's not true as we've had this discussion in the past. Many people prefer a GUI to a terminal, this just provides choice.

I just watched his video again at:
https://www.youtube.com/embed/HC8Az9W8F ... autoplay=0 where he says if anyone wants to convert it into a GUI he said "that's Ok."

Cheers

Minnesota
Posts: 326
Joined: Thu 11 Sep 2008, 11:25

more help

#260 Post by Minnesota »

Why would you use a pet file in Fatdog64-710? Fatdog uses .txz packages. All you have to do is right click on the package and install it

There is a menu entry under Utilities.


See attached photo and locations MENU is fatdog utility. No entry
Pfind locations.

As to WHY... I do not know any better!
Attachments
Utility Menu and locations.jpg
(88.14 KiB) Downloaded 254 times

Post Reply