Tiny Core Linux

General TC => Programming & Scripting - Unofficial => Topic started by: kroovy on June 18, 2023, 03:41:10 PM

Title: pseudo man pages (quick and dirty using links)
Post by: kroovy on June 18, 2023, 03:41:10 PM
hi, i'm a tiny core learner

i was really missing man pages in tcl, so i came up with this:

Code: [Select]
function man () {
        DUMP="$(links -dump https://man.openbsd.org/OpenBSD-current/man1/${1}.1)"
        STARTING_LINE=$(echo "$DUMP" | awk '{printf("%d %s\n", NR, $0)}' | grep "General Commands Manual" | awk '{ print $1 }')
        echo "$DUMP" | awk "{if(NR>=${STARTING_LINE}) print \$0}" | less
}

the function filters the first ~114 lines (= all lines above "General Commands Manuel").
maybe someone is interested in this pseudo man pages attempt.

install:

P.S. let me know if you apreciate this post or if it is contrary to the spirit of this forum - still new and a learner
Title: Re: pseudo man pages (quick and dirty using links)
Post by: CNK on June 18, 2023, 07:53:29 PM
Looks nice, but I'd at least try to find a source of man pages that's for Linux instead of BSD.

I mainly use the Debian man pages and have them set up as a search option in Dillo. The search string is like this, where "%s" is replaced by the command you want a manual for:
Code: [Select]
https://dyn.manpages.debian.org/jump?q=%s

But I'm still not happy with this because the version of programs in current Debian packages is usually different, so there's still scope for confusion. This can be particularly annoying if you're witing a script and only notice that some option or other wasn't present in the version available for TC after you've finished.

One day I'll write a system that automatically tries a three prong approach:

The second and third prongs would be rather annoying to implement, but just the first one alone would be extremely limited because too few extensions have matching -doc.tcz extensions. It's a pain.
Title: Re: pseudo man pages (quick and dirty using links)
Post by: aus9 on June 18, 2023, 09:39:41 PM
man-pages.tcz is supposed to be any arch.
its in 14.x TC64 which Tinycore or release are you using?

http://tinycorelinux.net/14.x/x86_64/tcz/src/man-pages/build-man-pages.sh

as the dev team may not have time to upload to every release or arch just use your web browser to download the TC64 TCE by clicking link if you like
http://tinycorelinux.net/14.x/x86_64/tcz/man-pages.tcz

err I hope this is not a breach of the rules as it is an official binary?
Title: Re: pseudo man pages (quick and dirty using links)
Post by: kroovy on June 19, 2023, 04:19:44 AM
Sorry, I empebzzled that I'm Using PiCore.

I might have caused some confusion here.  :-[
Title: Re: pseudo man pages (quick and dirty using links)
Post by: aus9 on June 19, 2023, 05:59:27 AM
I am easily confused but repeat piCore 32 bit should still be able to use an any arch TCE.
I  am on  piCore64...can you search for a man page viewer in Apps?
I just downloaded the TC64 any arch TCE and "less" command kind of works without man-db. I am sure there are others