Code Monkey home page Code Monkey logo

mandocset's Introduction

mandocset

This is a Python script (mandocset.py) that generates a Dash docset from man pages. It takes folders with man pages as its arguments. Then in each folder it finds all folders containing digit in their name, and runs man2html -r for each file inside them.

By default the script uses the man2html utility, which should be available from your distro's package manager. If you prefer Pandoc, add -e "pandoc -f man -t html" to the command line.

How to run

python3 mandocset.py -o Linux_Man_Pages -p resource/man-pages-4.09/ resource/man-pages-posix-2013-a/ -i etc/tux.png -I etc/[email protected]

Then copy or move the generated Linux_Man_Pages.docset to ~/.local/share/Zeal/Zeal/docsets or %APPDATA%\Local\Zeal\Zeal\docsets on Windows.

You may also view help: python3 mandocset.py -h.

Looking for a pre-built Linux manpages docset?

  1. Download etc/Linux.docset.zip from this repo
  2. Extract it to Linux.docset folder
  3. Move this folder to %APPDATA%\Local\Zeal\Zeal\docsets on Windows or ~/.local/share/Zeal/Zeal/docsets/ on Linux

Generating a docset from your system's installed manpages

You can generate a docset of all manpages on your system (the script supports manpages compressed with gzip or bzip2). Usually these are located at /usr/share/man.

On a reasonably well-equipped Linux system, the included Makefile can do this for you:

cd ~/path/where/you/cloned/Yanpas/mandocset
make  # or 'make docset'

# if the above works OK
make install

# print what would happen, but don't actually do it
make install DRYRUN=1

# remove the previously-built docset
make reallyclean

# specify custom docset name and search shortcut (or just modify the Makefile)
make install DOCSETNAME='Linux manpages' SHORTCUT=man

Look inside the Makefile for other configurable settings.

Some links to man pages

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.