[ANN] TerminalPager.jl v0.2.0

Thanks! Let’s see if I can make everything works fine to propose it to be merged into stdlib. My current problem is how to create tests.

@dpr stands for “docs pager”. I did not use @help since it is a very common name and can interfere with some existing codes.

Nice! :slight_smile:

1 Like

But wouldn’t this other @help macro most probably do a similar thing (meaning it’s unlikely that a user would use both)? To me it sounds a bit like an interpolation package that doesn’t want to define interpolate because it could clash with other interpolation implementations :slight_smile: .

3 Likes

hum, good point. I will think about it :slight_smile:

3 Likes

So why this was a breaking change? I don’t see any breaking change in the ChangeLog either

It is not, but I thought I had to increment the minor version (pre-1.0) if I add a new feature. In this case, we have two new macros. Am I wrong?

Yes: PSA: If your package's version is of the form `0.y.z`, please do NOT bump the minor version for new features.

The semver world is much easier if you use all three numbers instead of restraining yourself to just two: How can we encourage Julia package developers to release version 1.0.0?.

4 Likes

Oops, sorry :sweat_smile: I read that, but I confused minor version with the patch version.

Yes, you are right. I just need to stabilize things and create a good set of tests before tagging 1.0.

2 Likes

I think you are right :slight_smile: I just tagged the v0.2.1 with @dpr replaced by @help. The old name is now deprecated.

3 Likes

This is great!

I think that the screenshot below the code

julia> @stdout_to_pager for i = 1:100
       println("$(mod(i,9))"^i)
       end

Is for a different example where you print a random 100x100 matrix.

Also, do you have any plans to make this a REPL mode? That way when you are using TerminalPager, you could hit a key to enter the pager mode, where all outputs are sent to the pager. Similar to how ? and ] work with the help and the package manager right now.

1 Like

Thanks!

Really? Everything seems right here. Can you please refresh the page?

What an amazing idea! I will see if I can do this :slight_smile:

The example displayed in announcement above seems to be the one in the package usage section:
rand(100,100) |> pager

@Ronis_BR, the key “freeze panes” functionality (say, freeze 1 row and 1 column) does not seem to be working on TerminalPager v0.2.1 and Julia 1.6.1.
(both Win10 and linux)

Could you please verify? Thank you.

It is working here. I entered in the pager and typed f, then the command line as for the number of rows and columns to freeze. Can you please describe what you are doing?

After digging into the internals of Pkg.jl, I could create a REPL mode! In this case, it should works just like the julia command line for all output that fits on the screen. If the output is larger, then if uses the pager.

In this case, I am getting the output from display of the returned object and also everything that was printed to stdout. Hence, pretty_table will also work here.

Gravação de Tela 2021-05-23 às 14.06.59

I just need to polish it a little bit because some functionalities are not working, like pasting commands with julia> prefix.

P.S.: The REPL stdlib is very nice and the customization options are amazing! It just need better documentation. I will add it to my todo list.
There are so many nice things that can be done with those modes!

11 Likes

Here it goes:

rand(100,100) |> pager
:f
Freeze rows (0): 1
Freeze columns (0): 1

then used the keyboard arrows to move around the table but no freeze effect is observed.

NB: tried also with no avail (in terms of freezing):
DataFrame(rand(100,100),:auto) |> pager

It worked here. Notice that the first column is frozen and the first line also. The first column in this example contains 1 in the first row and only spaces afterwards. The first line is being shown even though we are not at the first line. Can you provide a screenshot?

Great package. @help alone is worth a lot.

I tried @rafael.guerra example with freeze rows/columns and it did not work for me either.

2 Likes

Thanks!!

Hum, very strange. Can you please try another value like 10?

@Ronis_BR, sorry, misunderstood you on the larger test.
Editing this same post to not overcrowd this thread.

Win10:
Tried a 10 rows x 10 columns freeze and got a table in the REPL that took forever to print the updates and had to kill the REPL.

Linux on Android cellphone:
Tried a 3 rows x 3 columns freeze, and got a few digits of freeze on first column, and 2 rows of freeze at top.

1 Like