<commit_before>gulp         = require "gulp"
extend       = require "extend"
rsync        = require("rsyncwrapper").rsync

conf = require '../gulpconfig'
secret = require '../secrets'




_rsyncDo = (rsyncOpts = {}) ->
  rsyncOpts = extend {
    port: conf.ssh.port
    ssh: true
    recursive: true
    compareMode: "checksum"
    args: ["--verbose"]
  }, rsyncOpts

  gutil.log "Rsyncing from #{rsyncOpts.src} to #{rsyncOpts.dest}"

  rsync rsyncOpts, (error, stdout, stderr, cmd) ->
    gutil.log error if error
    gutil.log cmd, stderr, stdout

_rsyncPrepare = (prop, isToRemote = true, rsyncOpts = {}) ->
  ["dest", "src"].forEach (curr) ->
    remoteHost = "#{secret.username}@#{secret.domain}:"
    rsyncOpts[curr] = if rsyncOpts[curr] then rsyncOpts[curr] else conf.rsync[prop][curr]

    rsyncOpts[curr] = "#{remoteHost}#{rsyncOpts[curr]}" if isToRemote && curr == "dest"
    rsyncOpts[curr] = "#{remoteHost}#{rsyncOpts[curr]}" if !isToRemote && curr == "src"

  rsyncOpts.exclude = conf.rsync[prop].exclude || ""<commit_msg>Added gutil to rsync<commit_after>gulp         = require "gulp"
extend       = require "extend"
rsync        = require "rsyncwrapper"
gutil        = require "gutil"

conf = require '../gulpconfig'
secret = require '../secrets'




_rsyncDo = (rsyncOpts = {}) ->
  rsyncOpts = extend {
    port: conf.ssh.port
    ssh: true
    recursive: true
    compareMode: "checksum"
    args: ["--verbose"]
  }, rsyncOpts

  gutil.log "Rsyncing from #{rsyncOpts.src} to #{rsyncOpts.dest}"

  rsync rsyncOpts, (error, stdout, stderr, cmd) ->
    gutil.log error if error
    gutil.log cmd, stderr, stdout

_rsyncPrepare = (prop, isToRemote = true, rsyncOpts = {}) ->
  ["dest", "src"].forEach (curr) ->
    remoteHost = "#{secret.username}@#{secret.domain}:"
    rsyncOpts[curr] = if rsyncOpts[curr] then rsyncOpts[curr] else conf.rsync[prop][curr]

    rsyncOpts[curr] = "#{remoteHost}#{rsyncOpts[curr]}" if isToRemote && curr == "dest"
    rsyncOpts[curr] = "#{remoteHost}#{rsyncOpts[curr]}" if !isToRemote && curr == "src"

  rsyncOpts.exclude = conf.rsync[prop].exclude || ""
{'fraction_non_alphanumeric': 0.16563541170871013, 'fraction_numerical': 0.0, 'mean_word_length': 3.5596529284164857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '5379259', 'n_tokens_mistral': 756, 'n_tokens_neox': 775, 'n_words': 167}