This article is in response to a request by Ryan Jung. Request your own article. One of the disadvantages of using IRC over another chat medium is the lack of logging while you aren’t connected to the server. In this article, I will describe the process I used to implement logging for my favorite IRC channels. The Environment Pierc is my choice of logging bot for this article. It logs the contents of IRC channels to a MySQL instance, and presents an easy to use web interface.
Following proper coding standards is important to ensure others can read and modify your code. I make use of the following tools when writing Python to ensure I am formatting my code properly. Install Dependencies Let’s start by installing a dependency of the Vim plugin we are going to use. The Flake8 module will be needed for our vim-flake8 setup. As root (or using sudo), run the following commands:
My initial draft of the cf_pyrax.py script used in my automation deleted all the contents of a Cloud Files container, and then re-uploaded this content. This process was inefficient and also caused issues loading the site while this process was running. I have now updated this script to use the new sync_folder_to_container method from pyrax. This method was introduced to pyrax in this commit. Make sure you update your pyrax modules before using this new script.