I am creating a program for Linux and would like to give it a man/info page; that way it is a linuxy type program. I’m not sure, however, how to do that.
Hi
I use a text editor…
Here’s one I wrote for grabby (it’s a patch, so exclude the +'s);
<https://build.opensuse.org/package/view_file?expand=1&file=grabby-add-man-page.patch&package=grabby&project=home%3Amalcolmlewis%3AMiscellanous>
On Mon, 10 Jun 2013 19:36:02 +0000, ballsystemlord wrote:
> I am creating a program for Linux and would like to give it a man/info
> page; that way it is a linuxy type program. I’m not sure, however, how
> to do that.
Learn nroff syntax is probably the easiest way. It’s not a complicated
syntax, but it takes some getting used to.
Googling on “man page format” turns up lots of useful examples, or you
could look at the source for pages installed on your system and adapt one
to suit your needs.
Jim
–
Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C
On 2013-06-10 23:00, Jim Henderson wrote:
> On Mon, 10 Jun 2013 19:36:02 +0000, ballsystemlord wrote:
>
>> I am creating a program for Linux and would like to give it a man/info
>> page; that way it is a linuxy type program. I’m not sure, however, how
>> to do that.
>
> Learn nroff syntax is probably the easiest way. It’s not a complicated
> syntax, but it takes some getting used to.
It is a pity that there is not a working GUI method to produce man/info
pages. It is a subject I have investigated several times, although not
recently. Having a working GUI would allow translations by
non-developers: most man/info pages are not translated at all, which is
a shame.
A very interesting possibility would be LyX, using perhaps linuxdoc or
docbook. I’ve never succeeded.
I do have a “lyx2man.xsl” dated 2008, does not work (“A simplistic
OpenDocument to troff converter in form of an XSLT stylesheet. See the
usage instructions below”). I don’t remember where I got it from, there
is no link in it.
There is an old GUI, easy to use, but obsolete: “manedit”. It required
an obsolete version of GTK.
+++·························
ManEdit is a UNIX manual page editor and viewer, it is designed
specifically for the editing of the UNIX manual page format using an
integrated XML interface. Although some developers with more resources
can create a source document using a much more advanced editor and then
export to multiple file formats, the average UNIX contributor is not up
to that mountainous task. So to make UNIX documentation simpler, there
is ManEdit!
Featuring:
- XML Interface and Multiple Sectional Editing
- Instant preview feature and stand-alone viewer/browser
- Drag and Drop system and templates for easy mass production
- Multiple editors/viewers and multiple files loaded per editor for
convient mass editing
·························+±
The site was:
http://www.battlefieldlinux.com/wolfpack/ManEdit
but the site has been hacked or taken by domain trolls or whatever they
are called.
Googling, I see other sites an references to version 1.2.1 the one is
have is 0.8.3.
I see a project of that name at freecode, scarce activity:
http://freecode.com/projects/manedit
If someone tries it, I’d be interested to know. I’m to busy to make it
at present
He, read this comment:
+++·························
Downtime and relocation notice 2008 June 24
The site (revealsystems.net) that hosts this project’s web page
(battlefieldlinux.com) was destroyed by error in behalf of a repair
technitian attempting to fix another site physically adjacent to this
site on 2008 June 12. This site was incorrectly identified as the site
needing repair by the technitian and all of its data was completely
erased by the “repair” which involved an attempt to install a
different operating system (Windows 2000).
·························+±
so that was it… It appears that they just recovered the site backup,
put the files somewhere, and then abandoned the project. The files are
dated Oct 12 2008
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
The lazy way is to copy an exist man page that looks to have about the right format. Rename it to what you want. Then edit the text to what you want, but preserve the existing markup (those odd looking symbols).
On 2013-06-11 03:26, nrickert wrote:
> The lazy way is to copy an exist man page that looks to have about the
> right format. Rename it to what you want. Then edit the text to what
> you want, but preserve the existing markup (those odd looking symbols).
You have to de-compress them first
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
I installed this package and it works
software.opensuse.org:
http://paste.opensuse.org/images/52818388.png
you might also need to do the following:-
According to the Debian FHS user program manpages are stored in usr/share/man/man1 or usr/local/share/man/man1.
After changing manpages it may be wise to update the manpage database by running mandb in a terminal.
Carlos E. R. wrote:
> You have to de-compress them first
Not if you use vim
It does that automatically.
On 2013-06-11 06:56, vazhavandan wrote:
>
> I installed this package and it works
> ‘software.opensuse.org:’
> (http://software.opensuse.org/package/gmanedit)
Nice! Thanks.
> source:- ‘How to create a manpage? - Ask Ubuntu’
> (http://askubuntu.com/a/42925)
I looked at the ubuntu package, but it was version 0.4 or so, obsolete.
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
On 2013-06-11 11:37, Dave Howorth wrote:
> Carlos E. R. wrote:
>> You have to de-compress them first
>
> Not if you use vim
>
> It does that automatically.
it had to be vim… X-)
For the record, emacs also opens it fine, and switches to Nroff mode.
Even mcedit opens the compressed file, but not joe.
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
Should we raise a feature request @ features.opensuse.org and include it main repos ?
On 2013-06-11 18:26, vazhavandan wrote:
>
> robin_listas;2564095 Wrote:
>> On 2013-06-11 06:56, vazhavandan wrote:
>>>
>>> I installed this package and it works
>>> ‘software.opensuse.org:’
>>> (‘software.opensuse.org:’
>> (http://software.opensuse.org/package/gmanedit))
>>
>> Nice! Thanks.
> Should we raise a feature request @ features.opensuse.org and include
> it main repos ?
That would be nice… but the package is not really maintained upstream.
How long will it keep working?
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
On Tue, 11 Jun 2013 01:08:06 +0000, Carlos E. R. wrote:
> It is a pity that there is not a working GUI method to produce man/info
> pages. It is a subject I have investigated several times, although not
> recently. Having a working GUI would allow translations by
> non-developers:
> most man/info pages are not translated at all, which is a shame.
There is a tool that I’ve used in the past to take specially formatted
text files and convert them to man pages - a2x is the tool I used, part
of the asciidoc package IIRC.
Jim
–
Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C
Thanks guys!