Skip to content

Generate a tree hyperlinked hierarchy of child pages (or repo contents).

Notifications You must be signed in to change notification settings

mickeys/github-markdown-child-pages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

children — generates a Markdown tree list of child pages

SYNOPSIS

children [-a|--all-filetypes] [-u|--untracked] directory

DESCRIPTION

Generate a graphical relative representation of the child files and subfolders, providing hyperlinks to certain documents. By default only Markdown documents which are being tracked by git are shown, with the Markdown document title as the hyperlink text. Options, below, modify the set of documents shown.

Filtered out of results are the .git directory (the working store of the revision management system) and all .DS_Store files (used by macOS for housekeeping).

Options

-a, --all-filetypes

Provide hyperlinks to every child file.

-u, --untracked

Provide hyperlinks to files not tracked by git.

These options cannot be combined; -au is invalid.

EXAMPLES

For a directory with the following contents:

./children.sh
./untracked.txt
./README.md
./tracked.txt
./dir/subdir/subsubdir/untracked-file.txt
./dir/subdir/subsubdir/tracked.txt
./dir/subdir/README.md
./dir/README.md

The command children . generates a tree diagram of only the Markdown files (with their document titles as the link text). This behavior is designed to make it easy to provide an index into a repository containing many Markdown files.

github-markdown-child-pages
⎣ dir
    ⎢ The Top Level
    ⎣ subdir
        ⎣ Something Nested Within

Generated by github-markdown-child-pages.

The command children --all-filetypes . generates a tree diagram of all the files tracked by git:

github-markdown-child-pages
./children.sh
./dir/
⎢   ⎢ The Top Level
⎢   ⎣ ./dir/subdir/
⎢       ⎢ Something Nested Within
⎢       ⎣ ./dir/subdir/subsubdir/
⎢           ⎢ ./dir/subdir/subsubdir/tracked.txt
./tracked.txt

Generated by github-markdown-child-pages.
The command `children --all-filetypes --untracked .` generates a tree diagram of all files, whether tracked by git or not:

github-markdown-child-pages
NAME
./children.sh
./dir/
⎢   ⎢ The Top Level
⎢   ⎣ ./dir/subdir/
⎢       ⎢ Something Nested Within
⎢       ⎣ ./dir/subdir/subsubdir/
⎢           ⎢ ./dir/subdir/subsubdir/tracked.txt
⎢           ⎣ ./dir/subdir/subsubdir/untracked-file.txt
./tracked.txt
./untracked.txt

Generated by github-markdown-child-pages.

INSTALLATION

Move the script to a location on your $PATH and ensure it's executable.

mv children.sh /usr/local/bin/children
chmod +x /usr/local/bin/children

Move the man page to a location on your $MANPATH.

mv children.1 /usr/local/share/man/man1/

AUTHOR

Michael Sattler

SEE ALSO

children.sh white-paper

About

Generate a tree hyperlinked hierarchy of child pages (or repo contents).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages