Files
hpr-tools/Community_News/Thanking_hosts_at_end_of_year.md

52 lines
1.7 KiB
Markdown
Raw Normal View History

# Thanking hosts at the end of the year
## Introduction
Every year, in the last Community News recording (for December) it has been the
norm to list all of the hosts who have contributed. A list of host names is
assembled for this purpose, included in the notes and read out by the
volunteers.
## Method
A Bash script exists, called `thanks_to_hosts`, which manages the generation of
the list of hosts. The end product is a piece of HTML for insertion into the
notes.
The script is invoked simply by typing:
```
thanks_to_hosts
```
By default, the script uses the current year when generating the list of hosts.
If, as may happen, the list is being generated in the next year, then a 4-digit
year can be given in as an argument.
### Items required to run
The `thanks_to_hosts` script requires a number of tools and files to run:
- `query2tt2` - this is a Perl script which performs a database query and hands
the results to Template Toolkit template.
- `hpr.db` - a SQLite database which contains a copy of the live HPR database.
This needs to have been refreshed in the recent past.
- `.hpr_sqlite.cfg` - the configuration file for `query2tt2` to indicate what
type of database is being used and where to find it.
- `hosts_in_year.sqlite.sql` - a file containing the query used (using SQLite
syntax)
- `hosts_list.tpl` - the template which will be used to generate HTML
### Output file
Running the script `thanks_to_hosts`, if successful, will result in the
generation of a file called `hosts_in_year_${YEAR}.html`, where `${YEAR}` is
replaced by the default or explicit year. The script will report the name of
this file for convenience.
<!--
vim: syntax=markdown:ts=8:sw=4:ai:et:tw=78:fo=tcqn:fdm=marker:com+=fb\:-
-->