Difference between revisions of "Simple Email Lists"

From GlueXWiki
Jump to: navigation, search
 
(15 intermediate revisions by one other user not shown)
Line 1: Line 1:
We have several "simple" email lists for notification-type messages of interest to a limited audience. The idea is to keep automatically generated notifications off the collboration-wide official mailing lists. Interested parties can subscribe and unsubscribe themselves and others, you need only have privilege to check out and check in to the Hall D Subversion repository.
+
We have several "simple" email lists for notification-type messages of interest to a limited audience, usually the results of automated tasks. The idea is to keep these notifications off the collboration-wide official mailing lists. Interested parties can subscribe and unsubscribe themselves and others, you need only have privilege to push to the JeffersonLab/simple_email_list repository on GitHub.
  
=The Lists=
 
  
{| border
+
==The Lists==
|-
+
! List Name || Frequency || Description
+
|-
+
| nightly_build || daily || Errors and warnings from the [[Nightly Builds of GlueX Software|nightly build of GlueX software]]
+
|-
+
| b1pi || Mondays and Thursdays || Notification of completion of the bi-weekly [[Automatic Tests of GlueX Software|b1pi reconstruction job]]
+
|-
+
| single_track || Tuesdays and Fridays || Notification of completion of the bi-weekly single track reconstruction job
+
|}
+
  
=Subscribing=
+
The roster of current lists can be found on the [[Email Lists#Simple Email Lists|Email Lists]] wiki page.
 +
 
 +
==Subscribing==
  
 
If you would like to subscribe to one of these lists there are two methods for doing so.
 
If you would like to subscribe to one of these lists there are two methods for doing so.
  
==Method A==
+
===Method A===
  
 
Write an email to marki@jlab.org and say that you want to subscribe.
 
Write an email to marki@jlab.org and say that you want to subscribe.
  
==Method B==
+
===Method B===
  
 
<ol>
 
<ol>
<li> Check out the directory "listname" using the command:
+
<li> Clone the repository:
 
<pre>
 
<pre>
svn checkout https://halldsvn.jlab.org/repos/trunk/scripts/simple_email_list/lists/listname
+
git clone https://github.com/jeffersonlab/simple_email_list
 +
</pre>
 +
<li> Go to the directory for the list of interest:
 +
<pre>
 +
cd simple_email_list/lists/<listname>
 +
</pre>
 +
where <listname> is the name from the [[Email Lists#Simple Email Lists|list roster]].
 +
<li> Edit the file "list.txt" adding your email address on a new line.
 +
<li> Add and commit the new "list.txt".
 +
<pre>
 +
git add list.txt
 +
git commit list.txt
 +
</pre>
 +
<li> Push your changes back to GitHub on the master branch.
 +
<pre>
 +
git push
 
</pre>
 
</pre>
where "listname" is the name from the table above.
 
<li> In the resulting directory, edit the file "list.txt" adding your email address.
 
<li> Check "list.txt" back in.
 
 
</ol>
 
</ol>
  
=Unsubscribing=
+
==Unsubscribing==
  
 
Reverse one of the subscription methods mentioned above.
 
Reverse one of the subscription methods mentioned above.
  
=Creating a New List=
+
==Creating a New List==
  
 
<ol>
 
<ol>
<li>Under subversion, create a directory, for example my_new_list, under trunk/scripts/simple_email_list/lists:
+
<li>Clone the repository.
<pre>svn mkdir https://halldsvn.jlab.org/repos/trunk/scripts/simple_email_list/lists/my_new_list</pre>
+
<li>Create a directory, for example my_new_list, under simple_email_list/lists:
<li> Populate that directory (under subversion) with two files:
+
<pre>
 +
cd simple_email_list/lists/
 +
mkdir <new listname>
 +
</pre>
 +
<li> Populate that directory with two files:
 
<ul>
 
<ul>
 
<li><b>subject.txt</b>: one line containing the subject of all mail messages
 
<li><b>subject.txt</b>: one line containing the subject of all mail messages
 
<li><b>list.txt</b>: email addresses, one per line
 
<li><b>list.txt</b>: email addresses, one per line
 
</ul>
 
</ul>
 +
<li> Add, commit, and push your changes to the master branch on GitHub.
 
</ol>
 
</ol>
  
=Installing a List=
+
==Installing simple_email_lists==
  
The following is not necessary<ref>The not necessary part is that you will get all of the lists, not just the one you are interested in.</ref>, but sufficient:
+
To install in /home/user/simple_email_list:
 +
<pre>
 +
cd /home/user
 +
git clone https://github.com/jeffersonlab/simple_email_list
 +
</pre>
  
To install in the current working directory
+
At JLab, for the gluex account, the lists are installed in <code>/home/gluex/simple_email_list</code> .
 +
 
 +
==Sending to a List==
 +
 
 +
Assume in the following that simple_email_list was installed in /home/user/simple_email_list and the email list to which you want to send is mylist.
 +
<ol>
 +
<li> Compose a message and call it <code>message.txt</code> (it must be called this).
 +
<li> Copy the message into the list directory
 
<pre>
 
<pre>
svn checkout $HDSVN/trunk/scripts/simple_email_list
+
cp message.txt /home/user/simple_email_list/lists/mylist/
 
</pre>
 
</pre>
 +
<li> cd into the list directory
 +
<pre>
 +
cd /home/user/simple_email_list/lists/mylist/
 +
</pre>
 +
<li> send the message to the list by executing the script:
 +
<pre>
 +
/home/user/simple_email_list/scripts/simple_email_list.pl
 +
</pre>
 +
Note that this '''must''' be done from inside the mylist directory.
 +
</ol>
 +
 +
The script will destroy the copy of message.txt that it finds in the local directory. Since the script checks and will not send an empty message, this ensures that repeated invocations of the script will not send the same message over and over unless a new message.txt is explicitly copied into the directory.

Latest revision as of 18:02, 14 August 2020

We have several "simple" email lists for notification-type messages of interest to a limited audience, usually the results of automated tasks. The idea is to keep these notifications off the collboration-wide official mailing lists. Interested parties can subscribe and unsubscribe themselves and others, you need only have privilege to push to the JeffersonLab/simple_email_list repository on GitHub.


The Lists

The roster of current lists can be found on the Email Lists wiki page.

Subscribing

If you would like to subscribe to one of these lists there are two methods for doing so.

Method A

Write an email to marki@jlab.org and say that you want to subscribe.

Method B

  1. Clone the repository:
    git clone https://github.com/jeffersonlab/simple_email_list
    
  2. Go to the directory for the list of interest:
    cd simple_email_list/lists/<listname>
    

    where <listname> is the name from the list roster.

  3. Edit the file "list.txt" adding your email address on a new line.
  4. Add and commit the new "list.txt".
    git add list.txt
    git commit list.txt
    
  5. Push your changes back to GitHub on the master branch.
    git push
    

Unsubscribing

Reverse one of the subscription methods mentioned above.

Creating a New List

  1. Clone the repository.
  2. Create a directory, for example my_new_list, under simple_email_list/lists:
    cd simple_email_list/lists/
    mkdir <new listname>
    
  3. Populate that directory with two files:
    • subject.txt: one line containing the subject of all mail messages
    • list.txt: email addresses, one per line
  4. Add, commit, and push your changes to the master branch on GitHub.

Installing simple_email_lists

To install in /home/user/simple_email_list:

cd /home/user
git clone https://github.com/jeffersonlab/simple_email_list

At JLab, for the gluex account, the lists are installed in /home/gluex/simple_email_list .

Sending to a List

Assume in the following that simple_email_list was installed in /home/user/simple_email_list and the email list to which you want to send is mylist.

  1. Compose a message and call it message.txt (it must be called this).
  2. Copy the message into the list directory
    cp message.txt /home/user/simple_email_list/lists/mylist/
    
  3. cd into the list directory
    cd /home/user/simple_email_list/lists/mylist/
    
  4. send the message to the list by executing the script:
    /home/user/simple_email_list/scripts/simple_email_list.pl
    

    Note that this must be done from inside the mylist directory.

The script will destroy the copy of message.txt that it finds in the local directory. Since the script checks and will not send an empty message, this ensures that repeated invocations of the script will not send the same message over and over unless a new message.txt is explicitly copied into the directory.