<commit_before><!--
  Copyright 2014 IBM Corp.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<script type="text/x-red" data-template-name="dropbox-config">
    <div class="form-row">
        <label for="node-config-input-appkey"><i class="fa fa-bookmark"></i>App Key</label>
        <input class="input-append-left" type="text" id="node-config-input-appkey" style="width: 40%;" >
    </div>
    <div class="form-row">
        <label for="node-config-input-appsecret"><i class="fa fa-bookmark"></i>App Secret</label>
        <input class="input-append-left" type="password" id="node-config-input-appsecret" style="width: 40%;" >
    </div>
    <div class="form-row">
        <label for="node-config-input-accesstoken"><i class="fa fa-bookmark"></i>Access Token</label>
        <input class="input-append-left" type="password" id="node-config-input-accesstoken" style="width: 40%;" >
    </div>
    <div class="form-tips">
        To obtain these credentials, visit the <a
        href="https://www.dropbox.com/developers">Dropbox developer home</a>.
        Once signed up:
        <ol>
           <li>click "Create app",</li>
           <li>select "Dropbox API app",</li>
           <li>select "Files and datastores",</li>
           <li>choose an appropriate answer as to whether your node should be
               limited to its own folder or given full access. (This can be
               changed later so choose "Yes" to restrict the application
               while testing might be a good idea.)</li>
           <li>choose an app name</li>
           <li>click "Create app".</li>
        </ol>
        The subsequent app page will contain the App key, App secret and a
        "Generate" button to produce a suitable "access token".
    </div>
</script>

<script type="text/javascript">
(function() {
    RED.nodes.registerType('dropbox-config',{
        category: 'config',
        defaults: { },
        credentials: {
            appkey: {type:"text",required:true},
            appsecret: {type: "password",required:true},
            accesstoken: {type: "password",required:true},
        },
        label: function() {
            return 'Dropbox'; // TODO: get display_name from account info?
        },
        exportable: false,
    });
})();
</script>

<script type="text/x-red" data-template-name="dropbox in">
    <div class="form-row">
        <label for="node-input-dropbox"><i class="fa fa-user"></i> Dropbox</label>
        <input type="text" id="node-input-dropbox">
    </div>
    <div class="form-row node-input-filepattern">
         <label for="node-input-filepattern"><i class="fa fa-file"></i> Filename Pattern</label>
         <input type="text" id="node-input-filepattern" placeholder="Filepattern">
    </div>
    <div class="form-row">
        <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
        <input type="text" id="node-input-name" placeholder="Name">
    </div>
</script>

<script type="text/x-red" data-help-name="dropbox in">
    <p>Dropbox watch node. Watches for file events on Dropbox. By
    default all file events are reported, but the filename pattern can
    be supplied to limit the events to files which have full filenames
    that match the glob pattern. The event messages consist of the
    full filename in <b>msg.payload</b> property, the filename
    in <b>msg.file</b>, the event type in <b>msg.event</b> and
    the <a href="https://github.com/dropbox/dropbox-js">dropbox.js</a>
    API <a href="http://coffeedoc.info/github/dropbox/dropbox-js/master/classes/Dropbox/Http/PulledChange.html">PulledChange</a>
    object in <b>msg.data</b>.</p>
</script>

<script type="text/javascript">
    RED.nodes.registerType('dropbox in',{
        category: 'storage-input',
        color:"#C0DEED",
        defaults: {
            dropbox: {type:"dropbox-config",required:true},
            filepattern: {value:""},
            name: {value:""}
        },
        inputs: 0,
        outputs: 1,
        icon: "dropbox.png",
        label: function() {
            return this.name||this.filepattern||'Dropbox';
        }
    });
</script>

<script type="text/x-red" data-template-name="dropbox">
    <div class="form-row">
        <label for="node-input-dropbox"><i class="fa fa-user"></i> Dropbox</label>
        <input type="text" id="node-input-dropbox">
    </div>
    <div class="form-row node-input-filename">
         <label for="node-input-filename"><i class="fa fa-file"></i> Filename</label>
         <input type="text" id="node-input-filename" placeholder="Filename">
    </div>
    <div class="form-row">
        <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
        <input type="text" id="node-input-name" placeholder="Name">
    </div>
</script>

<script type="text/x-red" data-help-name="dropbox">
    <p>Dropbox input node. Downloads content from Dropbox. The
    filename on Dropbox is taken from the node <b>filename</b>
    property or the <b>msg.filename</b> property. The downloaded
    content is sent as <b>msg.payload</b> property. If the download
    fails <b>msg.error</b> will contain an error object.</p>
</script>

<script type="text/javascript">
    RED.nodes.registerType('dropbox',{
        category: 'storage-input',
        color:"#C0DEED",
        defaults: {
            dropbox: {type:"dropbox-config",required:true},
            filename: {value:""},
            name: {value:""}
        },
        inputs: 1,
        outputs: 1,
        icon: "dropbox.png",
        align: "right",
        label: function() {
            return this.name||this.filename||'Dropbox';
        }
    });
</script>

<script type="text/x-red" data-template-name="dropbox out">
    <div class="form-row">
        <label for="node-input-dropbox"><i class="fa fa-user"></i> Dropbox</label>
        <input type="text" id="node-input-dropbox">
    </div>
    <div class="form-row node-input-filename">
         <label for="node-input-filename"><i class="fa fa-file"></i> Filename</label>
         <input type="text" id="node-input-filename" placeholder="Filename">
    </div>
    <div class="form-row node-input-localFilename">
         <label for="node-input-localFilename"><i class="fa fa-file"></i> Local Filename</label>
         <input type="text" id="node-input-localFilename" placeholder="Local Filename">
    </div>
    <div class="form-row">
        <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
        <input type="text" id="node-input-name" placeholder="Name">
    </div>
</script>

<script type="text/x-red" data-help-name="dropbox out">
    <p>Dropbox out node. Uploads content to Dropbox. The filename on Dropbox is taken from the node <b>filename</b> property or the <b>msg.filename</b> property. The content is taken from either the node <b>localFilename</b> property, the <b>msg.localFilename</b> property or the <b>msg.payload</b> property.</p>
</script>

<script type="text/javascript">
    RED.nodes.registerType('dropbox out',{
        category: 'storage-output',
        color:"#C0DEED",
        defaults: {
            dropbox: {type:"dropbox-config",required:true},
            filename: {value:""},
            localFilename: {value:""},
            name: {value:""}
        },
        inputs:1,
        outputs:0,
        icon: "dropbox.png",
        align: "right",
        label: function() {
            return this.name||this.filename||this.localFilename||'Dropbox';
        }
    });
</script><commit_msg>Update dropbox node html info<commit_after><!--
  Copyright 2014 IBM Corp.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<script type="text/x-red" data-template-name="dropbox-config">
    <div class="form-row">
        <label for="node-config-input-appkey" style="width:120px;"><i class="fa fa-key"></i> App Key</label>
        <input class="input-append-left" type="text" id="node-config-input-appkey" style="width: 60%;" >
    </div>
    <div class="form-row">
        <label for="node-config-input-appsecret" style="width:120px;"><i class="fa fa-lock"></i> App Secret</label>
        <input class="input-append-left" type="password" id="node-config-input-appsecret" style="width: 60%;" >
    </div>
    <div class="form-row">
        <label for="node-config-input-accesstoken" style="width:120px;"><i class="fa fa-bookmark"></i> Access Token</label>
        <input class="input-append-left" type="password" id="node-config-input-accesstoken" style="width: 60%;" >
    </div>
    <div class="form-tips">
        To obtain these credentials, visit the <i><a href="https://www.dropbox.com/developers" target="_new">Dropbox developer home</a></i>.<br/>
        Once signed up:
        <ol>
           <li>click "Create app",</li>
           <li>select "Dropbox API app",</li>
           <li>select "Files and datastores",</li>
           <li>choose an appropriate answer as to whether your node should be
               limited to its own folder or given full access. (This can be
               changed later so choose "Yes" to restrict the application
               while testing might be a good idea.)</li>
           <li>choose an app name</li>
           <li>click "Create app".</li>
        </ol>
        The subsequent app page will contain the App key, App secret and a
        "Generate" button to produce a suitable "access token".
    </div>
</script>

<script type="text/javascript">
(function() {
    RED.nodes.registerType('dropbox-config',{
        category: 'config',
        defaults: { },
        credentials: {
            appkey: {type:"text",required:true},
            appsecret: {type: "password",required:true},
            accesstoken: {type: "password",required:true},
        },
        label: function() {
            return 'Dropbox'; // TODO: get display_name from account info?
        },
        exportable: false,
    });
})();
</script>

<script type="text/x-red" data-template-name="dropbox in">
    <div class="form-row">
        <label for="node-input-dropbox"><i class="fa fa-user"></i> Dropbox</label>
        <input type="text" id="node-input-dropbox">
    </div>
    <div class="form-row node-input-filepattern">
         <label for="node-input-filepattern"><i class="fa fa-file"></i> Filename Pattern</label>
         <input type="text" id="node-input-filepattern" placeholder="Filepattern">
    </div>
    <div class="form-row">
        <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
        <input type="text" id="node-input-name" placeholder="Name">
    </div>
</script>

<script type="text/x-red" data-help-name="dropbox in">
    <p>Dropbox watch node. Watches for file events on Dropbox.</p>
    <p>By default all file events are reported, but the filename pattern can
    be supplied to limit the events to files which have full filenames
    that match the glob pattern.</p>
    <p>The event messages consist of the
    full filename in <b>msg.payload</b> property, the filename
    in <b>msg.file</b>, the event type in <b>msg.event</b> and
    the <a href="https://github.com/dropbox/dropbox-js">dropbox.js</a>
    API <a href="http://coffeedoc.info/github/dropbox/dropbox-js/master/classes/Dropbox/Http/PulledChange.html">PulledChange</a>
    object in <b>msg.data</b>.</p>
</script>

<script type="text/javascript">
    RED.nodes.registerType('dropbox in',{
        category: 'storage-input',
        color:"#C0DEED",
        defaults: {
            dropbox: {type:"dropbox-config",required:true},
            filepattern: {value:""},
            name: {value:""}
        },
        inputs: 0,
        outputs: 1,
        icon: "dropbox.png",
        label: function() {
            return this.name||this.filepattern||'Dropbox';
        }
    });
</script>

<script type="text/x-red" data-template-name="dropbox">
    <div class="form-row">
        <label for="node-input-dropbox"><i class="fa fa-user"></i> Dropbox</label>
        <input type="text" id="node-input-dropbox">
    </div>
    <div class="form-row node-input-filename">
         <label for="node-input-filename"><i class="fa fa-file"></i> Filename</label>
         <input type="text" id="node-input-filename" placeholder="Filename">
    </div>
    <div class="form-row">
        <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
        <input type="text" id="node-input-name" placeholder="Name">
    </div>
</script>

<script type="text/x-red" data-help-name="dropbox">
    <p>Dropbox input node. Downloads content from Dropbox.</p>
    <p>The filename on Dropbox is taken from the node <b>filename</b>
    property or the <b>msg.filename</b> property.</p>
    <p>The downloaded content is sent as <b>msg.payload</b> property. If the download
    fails <b>msg.error</b> will contain an error object.</p>
</script>

<script type="text/javascript">
    RED.nodes.registerType('dropbox',{
        category: 'storage-input',
        color:"#C0DEED",
        defaults: {
            dropbox: {type:"dropbox-config",required:true},
            filename: {value:""},
            name: {value:""}
        },
        inputs: 1,
        outputs: 1,
        icon: "dropbox.png",
        align: "right",
        label: function() {
            return this.name||this.filename||'Dropbox';
        }
    });
</script>

<script type="text/x-red" data-template-name="dropbox out">
    <div class="form-row">
        <label for="node-input-dropbox"><i class="fa fa-user"></i> Dropbox</label>
        <input type="text" id="node-input-dropbox">
    </div>
    <div class="form-row node-input-filename">
         <label for="node-input-filename"><i class="fa fa-file"></i> Filename</label>
         <input type="text" id="node-input-filename" placeholder="Filename">
    </div>
    <div class="form-row node-input-localFilename">
         <label for="node-input-localFilename"><i class="fa fa-file"></i> Local Filename</label>
         <input type="text" id="node-input-localFilename" placeholder="Local Filename">
    </div>
    <div class="form-row">
        <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
        <input type="text" id="node-input-name" placeholder="Name">
    </div>
</script>

<script type="text/x-red" data-help-name="dropbox out">
    <p>Dropbox out node. Uploads content to Dropbox.</p>
    <p>The filename on Dropbox is taken from the node <b>filename</b> property or the <b>msg.filename</b> property.</p>
    <p>You can pass in content either as a filename by setting the <b>localFilename</b> field or
    <b>msg.localFilename</b> property, or you can pass in content directly using <b>msg.payload</b>.</p>
    <p>The file will be uploaded to a directory on Dropbox called Apps/{appname}/{appfolder}
    where {appname} and {appfolder} are set when you set up the Dropbox application key and token.</p>
</script>

<script type="text/javascript">
    RED.nodes.registerType('dropbox out',{
        category: 'storage-output',
        color:"#C0DEED",
        defaults: {
            dropbox: {type:"dropbox-config",required:true},
            filename: {value:""},
            localFilename: {value:""},
            name: {value:""}
        },
        inputs:1,
        outputs:0,
        icon: "dropbox.png",
        align: "right",
        label: function() {
            return this.name||this.filename||this.localFilename||'Dropbox';
        }
    });
</script>
{'fraction_non_alphanumeric': 0.1602599472748452, 'fraction_numerical': 0.003371957574642879, 'mean_word_length': 2.8535317741554453, 'pattern_counts': {'":': 0, '<': 356, '<?xml version=': 0, '>': 356, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6677379', 'n_tokens_mistral': 5029, 'n_tokens_neox': 4957, 'n_words': 1309}