Giter Site home page Giter Site logo

ozgurhepsag / mailmerge Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 228 KB

Mail merge is a process to create personalized letters and pre-addressed envelopes or mailing labels for mass mailings from a form letter

Makefile 0.79% C 99.21%
mailmerge xml-parsing

mailmerge's Introduction

Mailmerge

Goal

In this assignment you are asked to design a mail merge program. “Mail merge is a process to create personalized letters and pre-addressed envelopes or mailing labels for mass mailings from a form letter” [1]. Feature works on a document that contains fixed text (that is same in each output document) and variables (which act as placeholders that are replaced by text from the data source).

Scenario and Implementation Requirements

Program will take the template and variable files as input, replace each placeholder with the corresponding value from the variable file for each student and output each to a file named as the value of the id and with a fixed extension “txt”. (Example: 2008900.txt) So for sure variables file will have an attribute or element named “id” for each object, and you do not need to check the existence of it. Examples input files are given below.

Screenshot

Screenshot

Be careful about the following scenarios:

  1. Scenario: Template file have a placeholder that does not exist in variables file.

Action: If not all placeholders exist in variables file that record/object will be ignored and no output will be given for it.

  1. Scenario: Variables file have extra elements that the template file does not have placeholder for.

Action: Output the related record/object as normal, just omit the extra element. Your program will take exactly and only three arguments on any order. These are arguments are:

  1. The template file that contains the fixed text and placeholders for variables. This argument will be given with the flag “-t” and it can be a single file name as well as the filename with preceding path.
Example: <-t template.xml> or <-t /home/user/Desktop/Assignment1/template.xml>
  1. The variables file to replace the corresponding placeholders with. This argument will be given with the flag “-v” and it can be a single file name as well as the filename with preceding path.
Example: <-v variables.xml> or <-v ../Desktop/variables.xml>
  1. The folder for outputting the created documents. This argument will be given with the flag “-o” and it can be a single folder name as well as the folder name with preceding path.
Example: <-o outputs> or <-o ./TestCase1/outputs>

Usage of your program is to be exactly as (arguments may change ofcourse):

./mm –t tamplate.xml –v variables.xml –o ../outputs/testcase1

mailmerge's People

Contributors

ozgurhepsag avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.