Category Archives: Program

Pandoc-flavored markdown: Perfect!

I’d been looking for a way to convert my notes to webpages. Typically I wrote my notes in .txt form and then went through them and added links, formatting… when I was ready to blog them. Recently, I had asked StackOverflow if I could convert MediaWiki format to HTML. I’m an Administrator for the Arch Wiki so I’m very familiar writing this format. This is when I learned about pandoc. Pandoc’s author describes pandoc as, “If you need to convert files from one markup format into another, pandoc is your swiss-army knife…“.

Plain Text Example

I planned to write my notes in mediawiki format and then convert to HTML, however I’d been using StackOverflow lately and started to learn Markdown Prose and really like it. Markdown’s is designed to be easy to write and read: “Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML)“. Markdown is so easy to write that it makes sense that sites like StackOverflow and GitHub are using it.

Markdown, Markup Languange

Pandoc has extended markdown to use code blocks ```, tables, and a few other things and converting is very basic:

pandoc file.md -o file.htm

I’m in love, I’m in love, I’m in love :), as it will save me a good bit of time in editing/creating Documentation. Tomorrow, I’ll post a bash script to clean up the HTML to be able to put it in a WordPress Blog.

Setting Up Irssi



Irssi is a command line client for IRC, developed since 1999 and written in the beautiful language of C. It is a very good client with a lot of options for those willing to learn a command line interface. If not, check out Xchat.

When I came upon a couple of install problems I was recommended to connect to the Gentoo freenode channel with and IRC client. I’ve used IRC before (really got into mIRC in Windows, had a brief foray of Xchat) and discovered that IRC is a pretty good way to meet people and exchange information. Xchat to me was just to difficult to set up as I liked (and I felt that I was missing something using it). When I used mIRC, BitchX was all the talk. Now irssi is and have been using it for years.

Installing Irssi

Install irssi however you distro tells you to.

I’m the type of person that learns by getting my hands dirty-and-tweaking-and-learn-by-example so I didn’t comb through all the pages of documentation but this guide should be enough to create a basic setup. If you’re like me the minimum that needs to be done is to comb through the starter’s guide and get feel of it. Irssi installs very very raw with really nothing set up so I added the few tweaks they recommend. After doing that I fire up irssi and set my Nick:

/set nick NICKNAME

Irssi saves the name between sessions but it won’t be reserved that will be done after a few more steps.

Freenode is a great project that hosts a lot of open source channels, including a lot of Linux distro help channels. If you ever run across them be sure to thank them, they do a great deed. To connect to a server:

/connect irc.freenode.net

And join a channel by doing (for example):

/j gentoo

Irssi is actually pretty easy. Another I like doing is automatically joining a network when irssi starts. Typing /network show the pre-configured networks. If your irssi is set up like mine, Freenode isn’t one of the default servers built in. If it’s not add it so it will make connecting quicker in the future:

/server add -auto -network Freenode irc.freenode.net 6667

The -auto command is optional if choosing to use it will automatically connect to that server when irssi starts. Nicks can be associated with a network:

/network add -nick Gen2ly Freenode

And channels in networks can be automatically set to be joined by doing:

/channel add -auto #gentoo Freenode

Setting up Freenode

The freenode faq is in good working order and can explain in better detail more about what freenode is and what a user can do. I just needed to register (this also reserves) my nickname:

/msg nickserv register <password> <email>

Responding to the email will be necessary of the registration will be dropped.

To keep the Nick’s email hidden:

/msg nickserv set hidemail on

Login to Freenode so your nick is official, though this too can be done automatically:

/msg nickserv identify <password>
/network add -autosendcmd "/msg nickserv identify <password> ;wait 2000" Freenode

Identd and irssi

Note: Some servers require an identification daemon (identd) to be installed (linux-identd, for example).

Basic Commands

It’s not really necessary to read any more documentation unless more advanced functions are needed. Most of the basic commands can be seen with:

/help

The /help command should provide all the information necessary to use it. The only commands I use are /j, /leave, /msg user, /away, and /quit.

The basic key presses are: Alt+1, Alt+2,… to switch between windows; and PageUp to PageDown to scroll up and down.

Tips and Tricks

If you’re in channels with a lot of people, seeing all the joins, parts, quits, afks can be distracting, they can be turned off with:

/ignore #channelname ALL -PUBLIC -ACTIONS

Or you can ignore them in all channels by using * instead of #channelname.

With a rambler or someone wanting to ignore they can be ignored for a specific amount of time by doing:

/ignore -time 3600 <nick>

to ignore them for an hour.

Resources

Follow

Get every new post delivered to your Inbox.

Join 52 other followers