New Book From Christopher: What Makes It Worth Reading Now

by Griffith Maggie

Alright folks, let me tell you about this little experiment I did with something called “from christopher.” I stumbled upon it last week, looked kinda interesting, so I figured, “Why not?”

New Book From Christopher: What Makes It Worth Reading Now

First thing I did, I dug around online a bit. I’m not gonna lie, the description was kinda vague. Seemed like it had something to do with string manipulation, maybe some kind of text formatting. But hey, half the fun is figuring it out, right?

So, I grabbed the code and started messing with it. My initial thought was to try it on some sample text files I had lying around. I had this old project, a bunch of notes I took from a conference. Perfect test case.

Step one: Get the stuff installed. Thankfully, it was pretty straightforward. A quick `pip install from_christopher` and I was off to the races. (Yeah, I know, I should probably use a virtual environment, but sometimes I’m lazy, sue me.)

Step two: Trying to actually use it. This is where things got a little… interesting. The documentation was, shall we say, a bit sparse. Basically, I just had to poke around and see what happened. I started with a simple command:

from_christopher -i * -o *

Hoping it would magically format my notes. No such luck. Got a bunch of errors about missing arguments or something. Turns out “from christopher” needs some guidance.

New Book From Christopher: What Makes It Worth Reading Now

Step three: Dive into the source code. Alright, time to get my hands dirty. I opened up the Python files and started reading. Turns out, it’s actually a series of functions that do different things, like removing extra spaces, converting text to lowercase, and adding prefixes. The command line tool is just a wrapper around these functions.

Step four: Experimenting with different options. Okay, now we’re getting somewhere. I discovered that I could use the `-a` flag to apply a specific action. For example:

from_christopher -i * -o * -a lowercase

This converted all the text in my input file to lowercase. Cool! Then I tried `-a remove_spaces`. That got rid of all the extra whitespace. Getting closer to something useful.

Step five: Chaining actions together. This is where it got really powerful. You can chain multiple actions together using commas. So, to lowercase the text and remove extra spaces, I used:

from_christopher -i * -o * -a lowercase,remove_spaces

And bam! My text file was now nicely cleaned up. It wasn’t perfect, but it was a hell of a lot better than what I started with.

New Book From Christopher: What Makes It Worth Reading Now

The Result: My notes were now much more readable. I still had to do some manual editing, but “from christopher” saved me a ton of time. I could definitely see myself using this again for quick text cleanup tasks.

What I learned:

  • Read the source code! Especially if the documentation sucks.
  • Experimentation is key. Just try stuff and see what happens.
  • Even simple tools can be surprisingly useful when chained together.

So, yeah, that’s my “from christopher” adventure. Not the most groundbreaking thing in the world, but a fun little project that taught me something new. And hey, now you know about it too!

You may also like

Leave a Comment