<commit_before>let tpl = `
<h2>{{selectedDomain}}</h2>

<ul>
    {{#results}}
        <li>
            <a href="/mirrorjson/{{../selectedDomain}}/{{hash}}"{{#if path}} title="{{path}}"{{/if}}>{{hash}}</a>
            =>
            {{json}}
        </li>
    {{/results}}
</ul>

<form method="POST" action="/mirrorjson/{{selectedDomain}}">
    <input type="submit" name="export" value="Export listed documents" />
</form>
<form method="GET" action="/mirrorjson/{{selectedDomain}}/import">
    <input type="submit" value="Import documents from json file" />
</form>

<h2>Add a json string manually for specified path on '{{selectedDomain}}'</h2>
<form method="POST" action="/mirrorjson/{{selectedDomain}}">
    <p>Existing data for the given path will be overwritten.</p>
    <label>Path:</label>
    <input type="text" name="path" value="/" />
    <br />
    <label>Json:</label>
     <textarea name="jsondata" rows="10" cols="80"></textarea>
     <br />
    <input type="submit" value="Save element" />
</form>
`;

let headerTpl = require('../templates/header.handlebars');
let footerTpl = require('../templates/footer.handlebars');
exports.tpl = () => headerTpl.tpl() + tpl + footerTpl.tpl();
<commit_msg>Add support for protected on manually added json<commit_after>let tpl = `
<h2>{{selectedDomain}}</h2>

<ul>
    {{#results}}
        <li>
            <a href="/mirrorjson/{{../selectedDomain}}/{{hash}}"{{#if path}} title="{{path}}"{{/if}}>{{hash}}</a>
            =>
            {{json}}
        </li>
    {{/results}}
</ul>

<form method="POST" action="/mirrorjson/{{selectedDomain}}">
    <input type="submit" name="export" value="Export listed documents" />
</form>
<form method="GET" action="/mirrorjson/{{selectedDomain}}/import">
    <input type="submit" value="Import documents from json file" />
</form>

<h2>Add a json string manually for specified path on '{{selectedDomain}}'</h2>
<form method="POST" action="/mirrorjson/{{selectedDomain}}">
    <p>Existing data for the given path will be overwritten.</p>
    <label>Path:</label>
    <input type="text" name="path" value="/" />
    <br />
    <label>Json:</label>
     <textarea name="jsondata" rows="10" cols="80"></textarea>
     <br />
    <input type="checkbox" name="setprotected" />
    <label>Set this json as protected (will not be overwritten by external API data)</label>
     <br />
    <input type="submit" value="Save element" />
</form>
`;

let headerTpl = require('../templates/header.handlebars');
let footerTpl = require('../templates/footer.handlebars');
exports.tpl = () => headerTpl.tpl() + tpl + footerTpl.tpl();

{'fraction_non_alphanumeric': 0.21159754224270352, 'fraction_numerical': 0.006144393241167435, 'mean_word_length': 3.7106690777576854, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 71, 'https://': 0, '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': '4806947', 'n_tokens_mistral': 848, 'n_tokens_neox': 829, 'n_words': 192}