Johnnybgoode - a new, cross-platform CLI tool for JohnnyDecimal, written in Rust

Hey folks! I am happy to announce johnnybgoode, a cross platform terminal tool to make life with Johnny Decimal a bit easier.

it can:

  • Return a path to a given folder number
  • jump you between folders (currently relying on a tiny bit of shell scripting)
  • export a full index as a Markdown file

More features are in the pipeline, including eliminating the shell scripting and changing directories directories, and onboarding tools to help build or move in to your new JD system. But for now, the project is young (v1.0.0 was released yesterday). Since it’s powered by Rust, the code is fast, and very stable.

If you use JD and spend a lot of time in a terminal, johnnybgoode will be a great tool for you to help streamline everything. I hope you take a look at it and try it out!

1 Like

Good on you! How intuitive would this be for someone who doesn’t do much programming or terminal commands? Would you be willing to write or record a short tutorial?

Assuming zero terminal experience, this might be a bit difficult. The documentation folder in the GitHub repo contains a solid amount of information already about getting started with it, and I do plan to add more in the future.

Some features I am planning for the next release include a few things to make the initial setup easier. One thing that doesn’t exist in the repo just yet that I could totally add would be a bare-minimum quick start for users who mostly just want it to export indexes.

The commands are simple, so even for a brand new terminal user, it shouldn’t be terribly difficult. I’ll work on getting a quick start guide put together.

2 Likes

I’ll give it a whack :sunglasses:

Thanks for the work on this!

Any chance of a complete step-by-step for the setup?

I must be doing something wrong. On a ubuntu 24.04 box. Cloned it, built it, copied the config file and it won’t run

 ✘ user@system  ~/Documents/50-59_code/52_src/52.03_johnnybgoode  cat ~/.config/johnnybgoode/config.yaml 
johnnydecimal_home: "/home/user/Documents" # An absolute path to the top folder of a JohnnyDecimal structure
name_scheme: ACID # Can be ACID or DACID (12.34 vs M12.34)
regex: auto

 user@system  ~/Documents/50-59_code/52_src/52.03_johnnybgoode  ./target/debug/johnnybgoode path 52.03                 
Regex present in config: auto
thread 'main' panicked at src/lib.rs:236:26:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

You have followed the directions perfectly! However, I have made a mistake in the example config file. All you need to do is remove the “regex: auto” line from the configuration. I’ve just pushed the change to the repo. Thanks for catching this and letting me know!

Originally, I had been thinking of the regex key being mandatory in the yaml and using “auto” to use the built-in one, but when I went to implement things I decided it was better to only specify a regex option when you wanted to use a custom one. If that key isn’t given, it uses the builtin. The reason yours was crashing is that it was trying to use the word “auto” as the regex pattern. I’ve also added it to my to-do list for the project to improve the error handling for these things.

Best of luck!

Still no luck, now it complains that there’s no regex

user@system  ~/Documents/50-59_code/52_src/52.03_johnnybgoode  ./target/debug/johnnybgoode path test.md
No regex present in config
thread 'main' panicked at src/lib.rs:226:10:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Alright. Actually it’s not an issue with the regex, I don’t think. I must have forgotten to remove a print() call from when I was testing. At that point, problem is that the requested location number doesn’t exist in the hash map that it builds. I think I know what is causing this but I won’t be able to address it until I’m home again in about 7 hours, after work. I’ll put a quick hotfix out to get rid of that print call though.

Apologies for things being a bit rough around the edges, I’m new to releasing software for the world to use, so i’m still learning how best to go about properly testing and releasing stuff.

1 Like