Puppy Linux Newsletter

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

#21 Post by smokey01 »

@6502coder: The last time I looked at fields.awk it just didn't make sense to me so I abandoned it. Reading your post has reinvigorated my curiosity.

After a short play, it now seems quite logical except for the commands.

(R) Read from: --> Search Database
(W) Write to: --> Add New record or Modify record
(E) Edit: --> Edit
(C) CHANGE EDITOR --> Change Editor --> Geany is better than Vim
(S) SELECT DATA FILE --> Open Data File (Database)
(N) NEW DATA FILE --> Create new Data File
(H) Help --> Obvious
(Q) Quit --> Obvious

The order could also be a bit better because you can't search until you open a database.

Other than a bit of clarity it's a great little database. I really like it. It's also very small and the search facility is quite good. Ok, you've convinced me.

I can make a permanent link in the newsletter to this data file.

I can make you a special uploader script. To upload the data file, drag it onto the script.

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

#22 Post by 6502coder »

That sounds good. I totally agree with your remarks about the commands, especially the geeky choice of "vim", which would be a nightmare for anyone who doesn't know vi/vim. If musher0 gets his way and fields.awk gets adopted by Puppy, there are a few other things that really ought to be fixed first. But that's another story.

Meanwhile I'm snowed in anyway this afternoon, so maybe I'll drag out the yad manual and try to whip up that simple search GUI that I failed to con anybody else into making. :wink:

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

#23 Post by smokey01 »

Already hacked it, Couldn't help myself :lol: :lol: :lol:

Now it looks like this:

FIELDS.AWK: Flat-file Database Program for Linux systems
Using specified FILES_FOLDER = /root/DB_FILES

Current DATA_FILE = /root/DB_FILES/pln.txt
FIELD_STRUCTURE = YearMonth || Author || Category || Title || Description ||

======================================
(O) OPEN DATA FILE
(S) Search from: /root/DB_FILES/pln.txt
(A) Add/Modify to: /root/DB_FILES/pln.txt
(E) Edit: /root/DB_FILES/pln.txt
(C) CHANGE EDITOR
(N) NEW DATA FILE
(H) Help
(Q) Quit
**************************************
I think I will write a tutorial on it for the PLN.

I'm loving it. I was going to write a GUI but this works well enough.

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

#24 Post by 6502coder »

Well, I needed to work on my YAD anyway, so here's what I threw together. A simple YAD dialog that allows you to sort the records in various ways.

I think this is more like what greengeek had in mind. It doesn't really overlap with using fields.awk. Anyway it was fun to build. YAD experts please feel free to suggest improvements -- I'm here to learn.
Attachments
spni.sh.zip
Rename to remove the fake ".zip" extension. Run in the directory where PNI.txt lives.
(1.62 KiB) Downloaded 333 times

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

#25 Post by greengeek »

6502coder wrote:A simple YAD dialog that allows you to sort the records in various ways.
Oooh, that looks pretty goodly. I'm wondering who Barry Krauler is though... :shock:

Code: Select all

Biography --> Barry Krauler (1701) --> Pictures of Barry Krauler and links to info about him
Biography --> Mick Amadio (1702) --> A thumbnail sketch of Mick Amadio, creator of the Slacko Puppies, in his own words.
Biography --> oldyeller (1702) --> Puppy veteran oldyeller introduces himself.
Biography --> smokey01 (1703) --> Your Editor tells us a bit about himself.
Compiling --> ncdu (1703) --> Concise directions for compiling ncdu, a curses-based version of the du command for checking disk usage.
Compiling --> Slackware (1702) --> A tutorial on compiling applications with the help of slackbuilds (Slackware compiling recipes), using the EmelFM2 file manager as an example.
Compiling --> VLC (1702) --> A concise recipe for compiling the VLC media player.
Compiling --> Yad (1701) --> A very brief explanation of how to compile applications in Puppy, using YAD as an example
Compiling --> ZoneMinder v1.30 (1703) --> Instructions for compiling ZoneMinder v1.30 in TahrPup 6.0.5.
Distros --> A First Look at Debian Dog (1703) --> A long-time Puppy user discusses his first experiences with Debian Dog.
Distros --> euclid (1702) --> Announcement of zagreb999's euclid ISO.
Distros --> Fatdog64-710 (1701) --> Announcement of Fatdog64-710
Distros --> Lucid (1703) --> Announcement of the 28 Dec 2016 release of the popular Lucid Puppy 5.2.8.7, a classic Puppy updated with many fixes and upgrades.
Distros --> LxPupSc (1703) --> An introduction to LxPupSc, a Puppy based on Slackware-Current and using the LXDE desktop.
Distros --> Quicky Linux 8.1.5 (1702) --> Announcement of the release of Quirky Linux 8.1.5 (64-bit), which is binary-compatible with Ubuntu Xenial Xerus.
Distros --> Slacko32/64 700 Beta 2 (1701) --> Announcement of the Slackos built on Slackware 14.2, and a brief description of Slacko64 Puppy 6.9.6.4
Distros --> Tahrpup64 (1701) --> Introduction to Tahrpup and a brief description of Tahrpup64 6.0.5 CE
Entertainment --> Crossword (1702) --> A Puppy-themed crossword.
Entertainment --> Crossword (1703) --> A Puppy-themed crossword.
LettersToTheEditor --> A slow but steady "Puppy" journey (1703) --> Anonymous account of one Puppy user's experiences.
ScriptsAndCode --> A pekwm menu generator (1701) --> Musher0 discusses the use of various command-line tools to create a menu generator for pekwm.
ScriptsAndCode --> Creating a PupMenu for the wmx window manager (1702) --> An extensive and instructive example of shell scripting and optimization techniques, illustrated by the construction of a main menu for the wmx window manager.
ScriptsAndCode --> Locate-GUI (1703) --> An introduction to the author's GUI for the "locate" command, and how to index your files to facilitate fast searching.
Software --> AppImages (1702) --> Introduction to AppImages--applications built statically with the goal of eliminating dependency issues.
Software --> n2n-edge (1703) --> A brief guide to setting up a virtual private network using n2n.
Software --> Notecase (1701) --> Introduction to the NoteCase outliner/notekeeper application
Software --> pBurn 4.3.16 (1701) --> Summary of the features of the pBurn 4.3.16 CD/DVD burner application
Software --> PuppyBT (1702) --> Link to fr33land's work on getting Bluetooth working in Puppy
Software --> Rox Clock (1702) --> A link to the author's clock application for ROX
Software --> Rox-Filer (1701) --> Introduction to the Rox-Filer file manager, including keyboard shortcuts and how to customize them
Software --> Simple Qemu VM Manager (1703) --> A brief guide to using the QEMU virtualizer included in the Fatdog64-710 devx.
Software --> Sven (1703) --> A brief description of Sven, an application for programming your keyboard.
Software --> The  pekwm window manager (1701) --> Introduction to the pekwm window manager, its features and differences from JWM
Software --> xannotate (1703) --> An application for creating annotated screen captures.
Software --> xscreencapture (1703) --> A brief description of a simple screen capture application.
Software --> YAPI (1702) --> Introduction to L18L's YAPI -- Yet Another Puppy Installer -- which has the goal of allowing you to use any Puppy to install any other Puppy for which you have the ISO.
TipsAndTricks --> Automounting partitions (1703) --> A discussion of different methods for automounting partitions on a frugal installation.
TipsAndTricks --> Backing Up a Folder (1703) --> How to do simple backups using the rsync command.
TipsAndTricks --> Browser Zoom (1703) --> How to zoom in a browser, using keyboard and mouse shortcuts.
TipsAndTricks --> Desktop Shutdown Icon (1703) --> How to install a power-off icon on your desktop.
TipsAndTricks --> Downloading (1702) --> How to download a file by drag-and-drop between the browser and a ROX folder.
TipsAndTricks --> Find files in Rox (1702) --> How to find files quickly by partial name in a ROX folder.
TipsAndTricks --> Fonts (1703) --> A link to an archive of hundreds of free fonts.
TipsAndTricks --> Moving dialogs (1703) --> How to use ALT-click to drag a dialog around when the title bar is off-screen.
TipsAndTricks --> Muting the terminal beep (1703) --> How to suppress that annoying warning beep.
TipsAndTricks --> Roller Blind Dialogs (1703) --> How to reduce dialogs (or any window) to just the title bar.
TipsAndTricks --> Rox terminal (1702) --> How to quickly open a terminal session pre-positioned at (i.e. cd'd to) the current ROX folder.
Tutorials --> No-Ip.com (1703) --> Understanding Static IPs vs Dynamic IPs, and how to use no-ip.com to convert a dynamic IP into a static IP.
Tutorials --> Packaging (1702) --> A tutorial on packaging a newly-compiled application into a PET.
Tutorials --> Psip (1703) --> A link to the author's web page on Psip (PuppyPhone).
Tutorials --> Timezones (1703) --> Understanding time zones.
Tutorials --> USB Frugal Install (1701) --> A link to a YouTube video on how to install Puppy to a flash drive, using Slacko 570 as an example.

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

#26 Post by 6502coder »

greengeek wrote:Oooh, that looks pretty goodly. I'm wondering who Barry Krauler is though... :shock:
Bloody spell-check screwed up again! :evil:

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

#27 Post by 6502coder »

1. Fixed a few typos in the index file.
2. An improved version of the YAD gui, with an option to display the results in a format that is easier to read.

BTW "SPNI" now means "Sort Puppy Newsletter Index" instead of "Search..." since the app doesn't really do a search as such. "Sort" is more accurate.

I was going to call it "PNIS" (Puppy Newsletter Index Sorter) but when I read it out loud, I thought...yeah, maybe not a good idea. :lol:
Attachments
spni.sh.zip
Remove fake ".zip" extension, run in folder that contains PNI.txt
(1.84 KiB) Downloaded 326 times
PNI.txt.zip
Remove fake ".zip" extension.
(6.57 KiB) Downloaded 355 times

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#28 Post by bigpup »

Does this need YAD in the Puppy version you are using?
If yes.
I do not think YAD is in many Puppies.

I had to install YAD to make it work in Slacko 6.3

Also, I had to give the spni.sh execute permission for it to work.

However, after doing these things, it works very good.! :D
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

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

#29 Post by greengeek »

6502coder wrote:I was going to call it "PNIS" (Puppy Newsletter Index Sorter) but when I read it out loud, I thought...yeah, maybe not a good idea. :lol:
Puppy Newsletter Index Sorter sounds like a perfectly descriptive name for it. As long as there's no cock ups.
:twisted:

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

#30 Post by 6502coder »

bigpup wrote:Does this need YAD in the Puppy version you are using?
If yes.
I do not think YAD is in many Puppies.

I had to install YAD to make it work in Slacko 6.3

Also, I had to give the spni.sh execute permission for it to work.
I wrote the app on my new DebianDog Jessie OpenBox setup, so I guess YAD is one of the built-ins there. I thought YAD was pretty common in Puppies, but maybe I'll see if I can whip up an Xdialog version.
EDIT: dialog/Xdialog version posted below

Execute permission on the script probably got lost in translation because I transferred it via flash drive to my Win7 machine (where I do most of my Web activity) and posted from there.
Last edited by 6502coder on Wed 08 Mar 2017, 22:04, edited 1 time in total.

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

#31 Post by smokey01 »

Calling for articles for the April edition.

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

#32 Post by 6502coder »

Okay, here's a dialog/Xdialog version of the Puppy Newsletter Index Sorter. I tested this on my Puppy 412 Retro system so it should run on pretty much any Puppy. My Xdialog version there is 2.3.1; my dialog version is 1.0-20060221. You can switch from Xdialog to dialog with a simple edit.

Download.
Put it in the folder where you have the PNI.txt file.
Rename to remove the fake ".zip" extension.
Make executable with

Code: Select all

    chmod  +x   dspni.sh
Run with

Code: Select all

    ./dspni.sh
Attachments
dspni.sh.zip
See instructions in post
(2.81 KiB) Downloaded 411 times

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#33 Post by mcewanw »

This is great. These newletters are a great boost for the Puppy Community and that index creator is very helpful and useful.

Good to see.

William
github mcewanw

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#34 Post by bigpup »

As small as the dspni.sh and the PNI.txt are.
You should be able to make it into a pet package.
As long as it is not larger than 256K.
The forum should allow posting it here.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

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

Submission for April Newsletter

#35 Post by 6502coder »

smokey01 wrote:Calling for articles for the April edition.
Just sent you my article via email.

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

#36 Post by 6502coder »

bigpup wrote:As small as the dspni.sh and the PNI.txt are.
You should be able to make it into a pet package.
As long as it is not larger than 256K.
The forum should allow posting it here.
The PNI.txt will be updated every month, so it would be awkward to distribute it in a PET. The plan is for me to post the new PNI.txt to smokey01 each month and he will provide a place for it, probably right there with the newsletter notecase files, where people can download it.

As for the app, I've got it packaged as a PET but I'm waiting a little longer to make it more newbie-proof and to see if any suggestions for improvements come in. Then I'll post the PET here sometime next week. BTW I'm going forward with the dialog/Xdialog version and dropping the YAD version.

Meanwhile, I have two questions for anyone who wants to chime in:

1) I'm going to have the app assume the PNI.txt file is in ~/my-documents/
Of course it will check, and scream if it can't find the file. I assume that anyone who can't live with the PNI.txt file being in my-documents will at least be OK with either making a symlink or editing the script. Any objections? I really don't want to add the complication of a file selector dialog.

2) I'm having trouble deciding what category this app falls in, for purposes of adding a menu entry. I'm leaning towards Utilities just because it's the least bad fit. Any other ideas?

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#37 Post by bigpup »

1) I'm going to have the app assume the PNI.txt file is in ~/my-documents/
I have my browser set to download to ~/Downloads

Makes it easy to find what I download.

Not sure if others do the same, but that is what the ~/Downloads is for.

That is going to be the issue. Where the person downloads to. Their choice in a browser.
2) I'm having trouble deciding what category this app falls in
menu->Document

There are some document readers located here.
PNI.txt is a document file.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#38 Post by bigpup »

Tahrpup 6.0.6

Using the newest dialog/Xdialog version of dspni.sh

After selecting the options.
Nothing happens.

Get this error after selecting OK.
Attachments
capture28657.png
(5.89 KiB) Downloaded 826 times
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

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

#39 Post by 6502coder »

Thanks for the feedback, bigpup

1) Puppy 412, where I do the development work on this app, does not have a ~/Downloads directory (I just checked booting from a virgin 412 LiveCD -- no such directory). However, I see that Wary has a ~/Downloads directory and I take your point. If nobody else objects, I'm fine with making ~/Downloads the assumed location of the PNI.txt file.

Edit: skip to "LATE NEWS" below:


2) The "bad KeyA" error is puzzling. Around line 64 or so in the script, you should see this:

Code: Select all

#echo "KeyA: " $keyA " KeyB: " $keyB
#echo "addDesc: " $addDesc " formatOutput: " $formatOutput
#exit
Could you un-comment those 3 lines by removing the leading "#" and let me know what you see?

Also, could you tell me what selections you made in the sort-order and "options" dialogs?

3) It looks like you've set the script to use "dialog" instead of "Xdialog", correct? Not that it should matter. Do you get the same error if you use "Xdialog" instead of "dialog"?

Thanks for the help.

@bigpup: LATE NEWS:

I just burned a CD of TahrPup 6.0.6 and booted up a LiveCD session. I immediately copied over PNI.txt and the version of the dspni.sh attached below. It's possible this is slightly later than the version you have. At any rate, I was unable to reproduce your bug. It worked fine using either dialog or Xdialog. I also ran it from from an xterm -- because that hideous blue console was driving me blind -- and again no problems. Very strange.
Attachments
dspni.sh.zip
You know the drill. Edit to point it to where you have placed PNI.txt
(2.81 KiB) Downloaded 397 times

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#40 Post by bigpup »

Ok, I tried the dspni.sh (from above) in a clean install of Tahrpup 6.0.6

dspni.sh Xdialog is working OK.
I did not try dialog.

I broke something in my Tahrpup 6.0.6 using the save.
I have got to stop trying to use program packages made for other Linux.
We are Puppy.
We are different.
You will assimilate.

Well, I can confirm that the Xdialog version of dspni should work in most/all Puppies.
They all come with Xdialog
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

Post Reply