~ireas/rusty-man-dev

2

Interest in the Project

Details
Message ID
<C4NYN5TO45J5.Q0MRG8SBBU99@zethra-wyvern>
DKIM signature
pass
Download raw message
Hello,

My name in Ben.  I was about to start working on a similar project when
it occured to me to ask on reddit if a similar project existed and
someone linked yours.  It looks great and already does quite a bit!  The
main feature you are currently missing more me is a way to follow the
links to other pages that is present in the html docs.

Looking though your issue tracker, it appears you're already working on
this.  I'd love to contibute if I can.  I'm going to read through to
code more, but I'd like to know if you have a specific design in mind.

Cheers,
Ben
Details
Message ID
<20200804094549.GA961@spectator>
In-Reply-To
<C4NYN5TO45J5.Q0MRG8SBBU99@zethra-wyvern> (view parent)
DKIM signature
pass
Download raw message
Hi Ben,

I’m glad to hear that you like the project and that you want to
contribute!

On 2020-08-04 01:24:51, Ben Aaron wrote:
> The main feature you are currently missing more me is a way to follow
> the links to other pages that is present in the html docs.  Looking
> though your issue tracker, it appears you're already working on this.
> I'd love to contibute if I can.  I'm going to read through to code
> more, but I'd like to know if you have a specific design in mind.

You are right, this is a very important feature.  I did some
experiments, but I don’t have a working prototype for the TUI yet.  My
idea of implementing this is:

1. Add a terminal user interface that displays the documentation for an
   item.  This interface should make it possible to collapse sections of
   the documentation and to easily navigate between the sections and
   members of the documented item.
2. Add an option to open the documentation for other items from the TUI
   and to follow links (to documentation items or external links).
3. Add more navigation features, e. g. browsing history, interactive
   search.

The main question is:  How should the TUI look like?  My first prototype
looked something like this:

Documentation for std::error::Error

+ Description ---------------------------------------------------------
┌ Methods ────────────────────────────────────────────────────────────┐
| + backtrace --------------------------------------------------------│
| + cause ------------------------------------------------------------│
| + description ------------------------------------------------------│
| + source -----------------------------------------------------------│
└─────────────────────────────────────────────────────────────────────┘
+ Trait Implementations -----------------------------------------------

Each of the lines with the plus sign would be an expandable block (the
Methods block is expanded in this example).  You would use the arrow
keys or jk to navigate between the blocks and space to expand them.

This was before I came up with the man-like output that we currently
have.  We could also use the man format for the TUI and just add some
interactive features to it.

I can send you the code of my prototype on Friday or early next week if
you want to experiment with it.

Do you have any thoughts on how the TUI should look like?

> I'm going to read through to code more

Unfortunately, the parser module is quite hard to read at the moment.
I’m going to refactor it and add some documentation once I’m positive
that it supports all relevant elements.

The rest of the code should hopefully be easier to read.  If anything is
unclear, please let me know.

Best,
Robin
Details
Message ID
<20200917151157.GA1491@ireas.org>
In-Reply-To
<C4NYN5TO45J5.Q0MRG8SBBU99@zethra-wyvern> (view parent)
DKIM signature
pass
Download raw message
Hi Ben,

if you are still interested, please have a look at the tui branch:
	https://git.sr.ht/~ireas/rusty-man/log/tui

It contains a new experimental viewer, tui, using cursive.  You can use
the arrow keys to navigate links, page up/down to scroll, enter to open
a link and backspace to go back.

Currently, only links in the doc comments are supported.  My next step
will be adding links to the code snippets.

/Robin
Reply to thread Export thread (mbox)