kitty - console code viewer


Tweet rated
(Posted 11 months ago) tricky

I'm currently developing a very quick and simplistic tool which can show code on the command console in full syntax highlight.
I don't have a downloadable version yet, but I can at least show you how it works, and with which language could I do this better than with BlitzMax
image

The current version also supports

  • NIL
  • Lua
  • C#
  • GINI
  • BlitzMax

And I'm working to support many more languages. I do also intend to support Blitz3D and BlitzPlus, but I've never worked with BlitzPlus, but I believe its syntax is the same as Blitz3D, right? (And I haven't touched Blitz3D in ages, so forgive me if I got rusty in that).
Of course C/C++ is planned, Pascal, Python and some more... There are also some needed features missing, so this can be a bit messy... :-/

(Posted 11 months ago) RonTek commented:

Hey! this looks interesting and nice! Does it work only on powershell or can you use standard command prompt window as well?

(Posted 11 months ago) tricky commented:

It should work on the regular Windows prompt as well... I used PowerShell in that screenshot because I prefer that, personally. Since it's been coded in C#, you will need .NET to be installed, but I guess any Windows 10 computer should have that... right?
(BTW. The code you see in that screenshot's not mine. I simply used the code of a demo program that came with my BlitzMax installment) ;)

(Posted 11 months ago) tricky commented:

A quick Alpha Release can be found here. It's still pretty pre-mature, but it should work.
Note for Blitzers... Only BlitzMax has been put in yet... Blitz3D/BlitzPlus have not yet been implemented, and neither has Monkey Coder.

This first alpha version should support the next languages:

  • BlitzMax
  • BrainFuck
  • C/C++
  • C#
  • GINI
  • Lua
  • NIL
  • Pascal

NOTE: I cannot fully rule out I forgot some keywords. Be sure to write me a ticket on that ;)

(Posted 11 months ago) RonTek commented:

nice, will check this out!

(Posted 11 months ago) tricky commented:

Good... btw ALPHA2 has been uploaded here now, and BlitzBasic (which includes Blitz3D and BlitzPlus) has been added, as well as more languages ;)

(Posted 11 months ago) RonTek commented:

That's great! I'm actually having trouble building the sources and getting errors. Is this for VS2017 only? Perhaps you can provide a binary release for a quick test or a Travis CI binary version would be more awesome if you are already familiar with it.

(Posted 11 months ago) tricky commented:

Yeah I used VS2017, indeed.... But can't you just extract the binaries from the Kitty_Alpha.zip I provided in the releases?

What I think you suffer from is that you may not have the 'dependency classes' that the tool needs to compile, so that's why I provided a ready-to-go executable already in both release links.

(For those who really insist on compiling themselves here's a guide)

I've never worked with Travis before, but thanks for the tip ;)

(Posted 11 months ago) RonTek commented:

Works great! I see what you did there with the name.. cat and kitty. nice. perhaps adding a pause between screens like what dir /p does would be nice as well.

I've never worked with Travis before, but thanks for the tip ;)

Another tool would be Appveyor which I actually meant instead of Travis, but both are same CI Tools. Same here and I have seen a lot of handy stuff that it can do particularly making sure it builds as expected and the availability of the automated binaries for just a quick check out got me interested. Blitz3D-NG has its binary builds on Appveyor available so it's easy to try the latest commits without building it yourself (on Windows).

I am not sure which one is much easier, but I will try to check out Appveyor first and try it with a test project. Things are moving fast on the developer landscape so I hope we can have a CI binary building on github short guide posted as an extra resource eventually.

(Posted 11 months ago) tricky commented:

perhaps adding a pause between screens like what dir /p does would be nice as well.

My current plan is to add support to make it able to (if the user requests it) use ANSI, and then tools like "more" and "less" can work that out, although adding a "more" based page view such as "dir/p" can indeed be a good idea, as why use a dependency when you don't need one ;) Anyway, I've added your suggestion to my issue board: check this out, uh-huh, uh-huh, uh-huh!.

Another tool would be Appveyor which I actually meant instead of Travis

It could take away a lot of headaches from me that's for sure, so I will surely study it when I got the time. ;)

You may also wanna look on my itch.io page for Kitty. Thanks to the very simple to use "butler" CLI tool I can keep builds up-to-date there without even visiting the site, and since butler support binary diffing, it doesn't even take me too much time, either, and since I create my full releases always from my PowerShell prompt I can just make my own personal build script compile and upload in one go (I love my powershell scripter), and that means that itch.io has become a very easy medium for me to keep stuff up-to-date in.Could be a nice link to remember whenever I announce a new release.

(Posted 11 months ago) RonTek commented:

My current plan is to add support to make it able to (if the user requests it) use ANSI, and then tools like "more" and "less" can work that out, although adding a "more" based page view such as "dir/p" can indeed be a good idea, as why use a dependency when you don't need one ;) Anyway, I've added your suggestion to my issue board: check this out, uh-huh, uh-huh, uh-huh!.

That is nice. looking forward to more updates.

It could take away a lot of headaches from me that's for sure, so I will surely study it when I got the time. ;)

Yes, you should try it as well. You know most opensource devs and users are meticulous about downloading binaries just to be on the safe side.

Looking good on the itch.io page btw, I'm not really a fan of their butler tools and would prefer more on the github side and stuff.. it's just me.

(Posted 11 months ago) tricky commented:

The issue on github is, that I cannot release binaries on github by means of a tool, so I will always have to upload through the browser, and I hate that... Unless I make the binaries part of the repository, which is overall considered bad practice. Butler takes that trouble away from me, and with Kitty it won't be a real issue, as that program is rather small. Wanna guess how big my RPG games are if you have the versions with full audio? So that's why I quite often use Butler as I can easily integrate it with my (power)shell scripts, but that's a rather personal choice. Of course if Appveyor takes the trouble away, that would be very cool ;)

When it comes to a built in "more" feature, it's there now.

kitty -p very_long_code.c

Please note put the "-p" prior to the source code you wanna view and not after it, or the switch may be ignored. Now the "more" inside Kitty does not work exactly the same as the regular more tool. This "more" feature accepts three keys.

  • Spacebar = Only one more line
  • Enter = Entire next page
  • Escape = Turn "more" off and go on like "-p" was never requested.

The download from itch.io has already been updated. The github release page will likely be updated next weekend.
I've also added a kind of a "help page" which will appear if you run Kitty without any command line arguments.

(Posted 11 months ago) RonTek commented:

That's ok and the new update works great.

(Posted 11 months ago) tricky commented:

New update:
Somebody known as FreezerNick made me a pull request allowing Kitty to support Visual Basic. I've merged this, and the new binary is on itch.io, I'll later update the github release.

(Posted 11 months ago) RonTek commented:

Cool Tricky! Great to hear that it's getting some traction.

Reply To Topic (minimum 10 characters)

Please log in to reply