MakeReg - Create paper register from elector or census data =========================================================== (C)2012,2021,2022 Jonathan Harston - mdfs.net/Misc/RegTools MakeReg is a program that will create an RTF document containing a representation of the paper electoral register. Originally it used EARS data files, but has been updated to use any census style CSV file or Electoral Registration Office CSV file. Running ------- To create a paper register, run MkReg.exe. A menu will appear giving you options to select the source files, the destination RTF file, and how to process it. If selecting EARS data files it doesn't matter which polling district file is selected, just the name leaf (the name without the extension) specifies the polling district. Once you have selected a source file, the output file, and the range to process, you can create the output file and it will be created containing the register. Electors who have moved will be crossed out, new electors will have suffixed elector numbers. The electors will be listed in register order. Note that if the election office that created the original data adds new electors to the end of the register instead of adding a suffix, the RTF register will also have them at the end of the register, not in their logical position. The path to the previous selected polling district and the last output filename are saved in the registry. Command line execution ---------------------- MakeReg will take command line areguments to automate processing. These are: MkReg -a -f -n -t -? displays the above help text. -a do all the polling districts in the selected ward. -f full unedited register. -t <title> specify a title to be used for each page in addition to the ward. -n <file> specifies a CSV file containing ward and polling district names. If the filename is a relative path it is searched for in the same directory as the input file. <infile> specifies the input file. A relative path refers to the current directory. Multiple files can be specified, which will be included in the order specified. If filenames are not absolute paths, they are searched for in the directory the previously included file is in. <outfile> specifies the output file. A relative path refers to the current directory. Any items with spaces in them must be surrounded with quotes, for instance MkReg "input file" "output file" -t "WHITBY TOWN COUNCIL" CSV Source file --------------- MakeRegister scans a CSV file for fields with the following names or part of the names: PD - polling district code NUM - elector number ENO ELECTOR PD:NUM - polling district code and number NAME - individual's personal name FIRSTNAME FIRST NAME INITIALS - any middle name or initialse MIDDLE NAME LASTNAME - individual's family name LAST NAME AGE - age ADDRESS 1 - first line of a multiple field address, assumes the following ADDRESS1 fields are ADDRESS2, ADDRESS3, etc. until an empty field or ADDRESSLINE1 the postcode STREET ADDRESS - the household address, with each address line seperated ADDRESS with commas, the street name must be the final entry. For example: 18 High Street Queen's Hotel, 20 High Street 1 Queen's Hotel Yard, High Street Custom House, Queen's Hotel Yard, High Street POSTCODE - post code POSTALCODE INDIVIDUAL - census individual number or elector number in the format PDCODE:electornum STATUS - "D" if a deleted entry, "A" if absent voter Name file --------- This is a file containing ward and polling district names to generate the title on each page when the names are not included in the source files. It is expected to be of the format: PD,CONSTITUENCY,DIVISION,WARD,PARISH,POLLING DISTRICT AA,SCARBOROUGH & WHITBY,CASTLE,CASTLE,,Castle No. 1 AB,SCARBOROUGH & WHITBY,CASTLE,CASTLE,,Castle No. 2 FA,SCARBOROUGH & WHITBY,WHITBY STREONSHALH,STREONSHALH,WHITBY,Abbey FB,SCARBOROUGH & WHITBY,WHITBY STREONSHALH,STREONSHALH,WHITBY,Helredale FC,SCARBOROUGH & WHITBY,WHITBY STREONSHALH,STREONSHALH,WHITBY,Fishburn Park etc. The records are matched by the "PD" field, and can be in any order. History ------- v1.00 12-Jul-2009 Initial working version. v1.01 15-Sep-2009 Cleans output text to remove sprurious '{' and '}'s. v1.02 22-Dec-2009 Outputs total number of electors and households. v1.03 27-Aug-2012 Menu driven to allow option selections, can do multiple PDs in a ward. v1.04 03-Sep-2012 Multiple PDs have seperate page titles, title has year Can source from multiple wards to allow, eg a whole parish or a whole constituency. v1.09 25-May-2019 Can source from census CSV file, ERO elector file. v1.10 14-Jun-2019 Cleaned up processing of input data, rewrote output processing. v1.11 15-Jan-2021 If locality name same as PD or Ward, drops from address. v1.12 05-Dec-2022 Page title copes with very long polling district codes.