<commit_before>/*
These are routes as defined in https://docs.google.com/document/d/1337m6i7Y0GPULKLsKpyHR4NRzRwhoxJnAZNnDFCigkc/edit#
Each route implementes a basic parameter/payload validation and a swagger API documentation description
*/
'use strict';

const Joi = require('joi'),
  handlers = require('./controllers/handler');

module.exports = function(server) {

  server.route({
    method: 'GET',
    path: '/exportPDF/{id}',
    handler: handlers.getPDF,
    config: {
      validate: {
        params: {
          id : Joi.string().regex(/^[0-9]+$/).required().description('SlideWiki deck id')
        },
        query: {
          command : Joi.string().valid('automatic', 'bespoke', 'csss', 'deck', 'dzslides', 'flowtime', 'generic', 'impress', 'remark', 'reveal', 'shower', 'slide').description('Decktape slide format plugin'),
          size : Joi.string().regex(/^[0-9]+x[0-9]+$/).description('Resolution for exported slides'),
          slides : Joi.string().regex(/^[0-9]+(?:-[0-9]+)?(?:,[0-9]+(?:-[0-9]+)?)*$/).description('Selection of slides to export. Note that slides are specified by position within the deck, not by SlideWiki slide id.'),
          pdf : Joi.string().regex(/^[a-zA-Z0-9_\-,]+\.pdf$/).description('Name of exported file')
        }
      },
      tags: ['api'],
      description: 'Export the deck with id {id} as a PDF.'
    }
  });

  server.route({
    method: 'GET',
    path: '/exportOfflineHTML/{id}',
    handler: handlers.getOfflineHTML,
    config: {
      validate: {
        params: {
          id : Joi.string().regex(/^[0-9]+$/).required().description('SlideWiki deck id')
        }
      },
      tags: ['api'],
      description: 'Export the deck with id {id} as an offline HTML bundle.'
    }
  });

  

  server.on('tail', function(request) {
    return handlers.getPDFEnd(request);
  });
};
<commit_msg>Accidentally deleted exportReveal route.<commit_after>/*
These are routes as defined in https://docs.google.com/document/d/1337m6i7Y0GPULKLsKpyHR4NRzRwhoxJnAZNnDFCigkc/edit#
Each route implementes a basic parameter/payload validation and a swagger API documentation description
*/
'use strict';

const Joi = require('joi'),
  handlers = require('./controllers/handler');

module.exports = function(server) {

  server.route({
    method: 'GET',
    path: '/exportPDF/{id}',
    handler: handlers.getPDF,
    config: {
      validate: {
        params: {
          id : Joi.string().regex(/^[0-9]+$/).required().description('SlideWiki deck id')
        },
        query: {
          command : Joi.string().valid('automatic', 'bespoke', 'csss', 'deck', 'dzslides', 'flowtime', 'generic', 'impress', 'remark', 'reveal', 'shower', 'slide').description('Decktape slide format plugin'),
          size : Joi.string().regex(/^[0-9]+x[0-9]+$/).description('Resolution for exported slides'),
          slides : Joi.string().regex(/^[0-9]+(?:-[0-9]+)?(?:,[0-9]+(?:-[0-9]+)?)*$/).description('Selection of slides to export. Note that slides are specified by position within the deck, not by SlideWiki slide id.'),
          pdf : Joi.string().regex(/^[a-zA-Z0-9_\-,]+\.pdf$/).description('Name of exported file')
        }
      },
      tags: ['api'],
      description: 'Export the deck with id {id} as a PDF.'
    }
  });

  server.route({
    method: 'GET',
    path: '/exportOfflineHTML/{id}',
    handler: handlers.getOfflineHTML,
    config: {
      validate: {
        params: {
          id : Joi.string().regex(/^[0-9]+$/).required().description('SlideWiki deck id')
        }
      },
      tags: ['api'],
      description: 'Export the deck with id {id} as an offline HTML bundle.'
    }
  });

  server.route({
    method: 'GET',
    path: '/exportReveal/{id}',
    handler: handlers.getReveal,
    config: {
      validate: {
        params: {
          id: Joi.string()
        },
        query: {
          limit: Joi.string().optional(),
          offset: Joi.string().optional(),
          fullHTML: Joi.string().optional()
        }
      },
      tags: ['api'],
      description: 'Export the given deck in Reveal.js format'
    }
  });

  server.on('tail', function(request) {
    return handlers.getPDFEnd(request);
  });
};

{'fraction_non_alphanumeric': 0.18318246784182945, 'fraction_numerical': 0.012386850881372083, 'mean_word_length': 2.810344827586207, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6234501', 'n_tokens_mistral': 1386, 'n_tokens_neox': 1333, 'n_words': 304}