bash ansi codes to html for html reports from shell script

2017-02-20 1 min read Bash

How many times you have felt that there was some simple way to convert bash ansi escape sequences ( colors as well in terminal ) to html equivalent so that you can send the same as html report in email. Here is simple solution. One way is to use ccze if you are using this for logs – colorize your logs and for more generic solution.

 

dnf install python3-ansi2html.noarch

after this is installed, you can use something like this:

Continue reading

sysreporter on Fedora – basic system report in email

2016-07-18 1 min read Fedora

From the packages github page:

 

{#user-content-sysreporter.anchor}SysReporter

SysReporter (System Reporter) is a bash script that runs and aggregates a set of reports about its host system. The report can then be emailed to the system administrator on a daily, hourly, minutely basis.

and from dnf info

Name        : sysreporter
Arch        : noarch
Epoch       : 0
Version     : 3.0.4
Release     : 1.fc24
Size        : 17 k
Repo        : @System
From repo   : updates
Summary     : Basic system reporter with emailing
URL         : https://github.com/onesimus-systems/sysreporter
License     : MIT
Description : Basic system reporter with emailing

Continue reading

geary mail – gnome mail client

2014-05-30 1 min read GNOME

A new mail client is coming in town.

Gnome is working on new mail client called geary. Currently only supports imap accounts.

Description:

              Geary is a new email reader for GNOME designed to let you read your
email quickly and effortlessly. Its interface is based on
conversations, so you can easily read an entire discussion without
having to click from message to message. Geary is still in early
development and has limited features today, but we’re planning to add
drag-and-drop attachments, lightning-fast searching, multiple account
support and much more. Eventually we’d like Geary to have an
extensible plugin architecture so that developers will be able to add
all kinds of nifty features in a modular way.

Continue reading

ssmtp configuration and installation – raspberry pi.

2013-06-04 2 min read Raspberry Pi
English: Extract from Raspberry Pi board at Tr...
English: Extract from Raspberry Pi board at TransferSummit 2011 (Photo credit: Wikipedia)

To get your email working on your raspberry pi, First thing that you should probably do is to set up outgoing emails from your RPi. The easiest way to do so is with ssmtp.

Install ssmtp:

sudo apt-get install ssmtp

Next configure the ssmtp client to send emails using your ISP, open up the file /etc/ssmtp/ssmtp.conf file and make the changes as suggested below:

Continue reading

sendmail or sending mail

2013-04-19 1 min read Fedora Linux

If you want to use sendmail so that you can send all your mails from the local system to your email address, then you have to use sendmail.  Now, configuring sendmail has never been that easy and if you are working internally on your corporate network then for sending mails to the same domain, generally you don’t have to login. That being the case, you can use something simpler like “sstmp“. Install ssmtp with:

Continue reading

Adding a sub-menu in the wordpress admin menu :)

2010-07-29 2 min read Wordpress

For the impatient ones, first the code:
(in wp-admin folder, open the file menu.php) and locate the code:

$submenu[’edit.php’][10]  = array( _x(’Add New’, ’post’), ’edit_posts’, ’post-new.php’ );

and add the below:

$submenu[’edit.php’][7]  = array( _x(’Pending’, ’post’), ’edit_posts’, ’edit.php?post_status=pending&post_type=post’ );

And now the explanation and why do you need this 🙂

Problem:

There is no direct mechanism to access the pending posts in WP admin. I generally post through email and mark them as pending. So, whenever I go to my admin POSTs page, I will look through the list of pending items and post them as and when required. For this, when I am done with changes in one item, I need to either modify the address bar or need to go to posts link and then click the Pending items.

Continue reading

email with templates (with variables) from the command line with sendmail or any other MTA.

2010-06-09 2 min read Bash Fedora Linux

I was trying to get templates to work on evolution and found that although templates are there in evolution mail client, its not that efficient to use. What I thus wanted was to have something that could allow me to send mails to (and cc and bcc) to specified people with predefined template, only some values changed, like changelog and so on. So I wrote a set of files and below files to achieve the same. Hope it helps you too 🙂

Continue reading
Older posts