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 Tue 21 Nov 2017, 17:15
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Puppy Power
Puppy Linux Newsletter
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 8 [106 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Author Message
greengeek


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

PostPosted: Sat 04 Mar 2017, 02:52    Post subject:  

Sailor Enceladus wrote:
. 13 Down in the crossword made me chuckle,:
Does anybody still use it? Smile


6502coder wrote:
Actually it uses the format used by the "fields.awk" database tool that musher0 has promoted. If you just grep out the comment lines, you get a "fields.awk"-ready database, although I think even "fields.awk" is a bit of overkill for someone who only needs to search the index, not edit it..
I tried to open the txt file with fields.awk (early version) but couldn't get any sense out of it. What "search string" should I use? Also - should the txt file be placed inside /root/DB_FILES?

Other than fields.awk which method do you recommend to display the index?
cheers!
Back to top
View user's profile Send private message 
6502coder


Joined: 23 Mar 2009
Posts: 405
Location: Western United States

PostPosted: Sat 04 Mar 2017, 18:02    Post subject:  

If you've removed the ".zip" and looked at the PNI.txt file in geany or leafpad or whatever, you'll see

    // Puppy Newsletter Index
    // This is a flat-file index of the Puppy Newsletter.
    // Responsibility for any errors lies with me, "6502coder". Corrections are welcomed!
    // However, requests for changes to the "Description" must come from the original
    // author.
    //
    // Fields are as follows
    // YearMonth::Author::Category::Title::Description::
    // (The next line is for compatibility with the "fields.awk" database tool)
    @@@YearMonth::Author::Category::Title::Description::
    1701::666philb::Distros::Tahrpup64::Introduction to Tahrpup and a brief description of Tahrpup64 6.0.5 CE::
    1701::01micko::Distros::Slacko32/64 700 Beta 2::Announcement of the Slackos built on Slackware 14.2, and a brief description of Slacko64 Puppy 6.9.6.4::
    1701::The Fatdog Team::Distros::Fatdog64-710::Announcement of Fatdog64-710::


and so forth. The "//" lines are comments which I said have to be stripped out first with grep if you want to use "fields.awk":

Code:
grep -v '//' PNI.txt > pni_f.txt


and then you can put the "pni_f.txt" file wherever you keep your "fields.awk" databases. And of course you can use some other name if you prefer.

I don't use "fields.awk" myself but I did test to make sure that it works with my index file. As far as I know, you can use anything you want as a search string. The version of "fields.awk" that I used is the one from here:

http://www.murga-linux.com/puppy/viewtopic.php?p=874741#874741

I used the fields.awk.gz, not the PET.

I was going to throw together a simple GUI to search the index, but there are lots of people here who are much, much better at using yad etc. than I am. For my own use I just use awk.
Back to top
View user's profile Send private message 
greengeek


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

PostPosted: Sat 04 Mar 2017, 20:17    Post subject:  

6502coder wrote:
The "//" lines are comments which I said have to be stripped out first with grep if you want to use "fields.awk":
Code:
grep -v '//' PNI.txt > pni_f.txt
Thanks. I had just deleted those lines manually.
Initially I wasnt sure what search term to use to display some sort of index - I thought there may have been some way to display subsection titles alphabetically or similar (ie some sort of hiearchical tree...) but I think that is beyond fields awk. Possibly easier to view it in a spreadsheet format as you suggested.
cheers!
Back to top
View user's profile Send private message 
smokey01


Joined: 30 Dec 2006
Posts: 2657
Location: South Australia

PostPosted: Sun 05 Mar 2017, 03:47    Post subject: Re: index for the newsletter  

6502coder wrote:
I'd like feedback on whether there is interest in having an index of the articles in the newsletter.

I've created a plain text file index for the 3 newsletters so far, see attachment. This file can be searched as-is in a text editor, or easily imported into a spreadsheet. Actually it uses the format used by the "fields.awk" database tool that musher0 has promoted. If you just grep out the comment lines, you get a "fields.awk"-ready database, although I think even "fields.awk" is a bit of overkill for someone who only needs to search the index, not edit it.

If there is interest in having this index, I will commit to keeping it up to date. Perhaps someone else can whip up a nice simple GUI to search it.


Good idea. Why not Just enter the data in a speadsheet.

How did you compile the data?

_________________
Software <-> Distros <-> Tips <-> Newsletters
Back to top
View user's profile Send private message Visit poster's website 
6502coder


Joined: 23 Mar 2009
Posts: 405
Location: Western United States

PostPosted: Sun 05 Mar 2017, 13:16    Post subject:  

@greengeek, smokey01

Thanks for the feedback, guys. There were several reasons I chose not to use a spreadsheet:

1) I had the impression some recent Puppies (or quasi-Puppies) do not come bundled with with a spreadsheet app.

2) I wanted to throw a bone (pun intended) to musher0, who has lobbied for bundling fields.awk as Puppy's simple database app.

3) I figured that someone who wants to use a spreadsheet could import the index easily enough from the flatfile format.

4) The flatfile format makes it easy for someone to roll their own search app using grep or awk, possibly in conjunction with a simple GUI.

I personally prefer the flatfile format, but I'd be happy to provide it already converted to a spreadsheet as well. Any preferences as to which spreadsheet format would be best?

As for how I "compiled" the spreadsheet: I simply read each newsletter cover to cover, and typed up the index in Leafpad along the way! I also wrote myself a couple of awk scripts that help me spot malformed records and generate sorted lists of the authors, categories, and titles, making it easier to catch typos.
Back to top
View user's profile Send private message 
smokey01


Joined: 30 Dec 2006
Posts: 2657
Location: South Australia

PostPosted: Sun 05 Mar 2017, 17:31    Post subject:  

@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.

_________________
Software <-> Distros <-> Tips <-> Newsletters
Back to top
View user's profile Send private message Visit poster's website 
6502coder


Joined: 23 Mar 2009
Posts: 405
Location: Western United States

PostPosted: Sun 05 Mar 2017, 18:27    Post subject:  

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
Back to top
View user's profile Send private message 
smokey01


Joined: 30 Dec 2006
Posts: 2657
Location: South Australia

PostPosted: Sun 05 Mar 2017, 19:14    Post subject:  

Already hacked it, Couldn't help myself Laughing Laughing Laughing

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.

_________________
Software <-> Distros <-> Tips <-> Newsletters
Back to top
View user's profile Send private message Visit poster's website 
6502coder


Joined: 23 Mar 2009
Posts: 405
Location: Western United States

PostPosted: Mon 06 Mar 2017, 15:42    Post subject:  

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.
spni.sh.zip
Description  Rename to remove the fake ".zip" extension. Run in the directory where PNI.txt lives.
zip

 Download 
Filename  spni.sh.zip 
Filesize  1.62 KB 
Downloaded  41 Time(s) 
Back to top
View user's profile Send private message 
greengeek


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

PostPosted: Tue 07 Mar 2017, 02:01    Post subject:  

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... Shocked
Code:
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.
Back to top
View user's profile Send private message 
6502coder


Joined: 23 Mar 2009
Posts: 405
Location: Western United States

PostPosted: Tue 07 Mar 2017, 14:29    Post subject:  

greengeek wrote:
Oooh, that looks pretty goodly. I'm wondering who Barry Krauler is though... Shocked

Bloody spell-check screwed up again! Evil or Very Mad
Back to top
View user's profile Send private message 
6502coder


Joined: 23 Mar 2009
Posts: 405
Location: Western United States

PostPosted: Wed 08 Mar 2017, 01:19    Post subject:  

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. Laughing
spni.sh.zip
Description  Remove fake ".zip" extension, run in folder that contains PNI.txt
zip

 Download 
Filename  spni.sh.zip 
Filesize  1.84 KB 
Downloaded  41 Time(s) 
PNI.txt.zip
Description  Remove fake ".zip" extension.
zip

 Download 
Filename  PNI.txt.zip 
Filesize  6.57 KB 
Downloaded  40 Time(s) 
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 9522
Location: Charleston S.C. USA

PostPosted: Wed 08 Mar 2017, 02:13    Post subject:  

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.! Very Happy

_________________
I have found, in trying to help people, that 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 Shocked
Back to top
View user's profile Send private message 
greengeek


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

PostPosted: Wed 08 Mar 2017, 03:23    Post subject:  

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. Laughing
Puppy Newsletter Index Sorter sounds like a perfectly descriptive name for it. As long as there's no cock ups.
Twisted Evil
Back to top
View user's profile Send private message 
6502coder


Joined: 23 Mar 2009
Posts: 405
Location: Western United States

PostPosted: Wed 08 Mar 2017, 14:02    Post subject:  

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, 18:04; edited 1 time in total
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 8 [106 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Taking the Puppy out for a walk » Puppy Power
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.0698s ][ Queries: 14 (0.0063s) ][ GZIP on ]