RtfGenerator.js

const RtfGeneratorHelper = require('./RtfGeneratorHelper');
const RtfContentFormatter = require('./RtfContentFormatter');

function getRtfFileContent(inputs) {
    var lines = [];
    lines.push.apply(lines, RtfContentFormatter.getProfileRtfContent(inputs.profile));
    lines.push(RtfGeneratorHelper.createLineBreak());
    lines.push.apply(lines, RtfContentFormatter.getEducationRtfContent(inputs.educations.list));
    lines.push(RtfGeneratorHelper.createLineBreak());
    lines.push.apply(lines, RtfContentFormatter.getWorkExpRtfContent(inputs.companies.list));
    lines.push(RtfGeneratorHelper.createLineBreak());
    lines.push.apply(lines, RtfContentFormatter.getSkillsRtfContent(inputs.skills.list));
    lines.push(RtfGeneratorHelper.createLineBreak());
    lines.push.apply(lines, RtfContentFormatter.getProfessionalExpRtfContent(inputs.experiences.list));
    lines.push(RtfGeneratorHelper.createLineBreak());
    lines.push.apply(lines, RtfContentFormatter.getActivitiesRtfContent(inputs.activities.list));
    lines.push(RtfGeneratorHelper.createLineBreak());
    lines.push.apply(lines, RtfContentFormatter.getObjectiveRtfContent(inputs.objective));
    return RtfGeneratorHelper.generate(lines);
}

module.exports = {
    generate: getRtfFileContent
};