<commit_before>package org.mauritania.photosync.main

import org.mauritania.photosync.olympus.api.CameraApi
import org.mauritania.photosync.olympus.sync.FilesManager
import org.slf4j.LoggerFactory

case class Config(hostname: String = "oishare",  debug: Boolean = false, mode: String = "", kwargs: Map[String,String] = Map())

object Starter {

  type FileInfo = (String, Long)

  val logger = LoggerFactory.getLogger(this.getClass)

  // TODO add parameters
  // TODO add README.md
  // TODO add tasks to generate binaries
  // TODO try to use mockups? (to learn)

  def main(args: Array[String]): Unit = {

    val parser = new scopt.OptionParser[Config]("photosync") {
      head("photosync", "0.1")
      opt[String]('h', "hostname") required() valueName("<hostname>") action { (x, c) =>
        c.copy(hostname = x) } text("hostname or IP address of the camera server")
      note("some notes.\n")
      help("help") text("Please read README.md file.")
    }

    parser.parse(args, Config()) match {
      case Some(config) =>

        logger.info("Starting...")

        val cameraApi = new CameraApi(
          serverName = config.hostname
        )

        val manager = new FilesManager(cameraApi)

        logger.info("Synchronizing...")

        manager.sync()

        logger.debug("Done.")

      case None =>
      // Bad arguments
    }

  }

}
<commit_msg>Make "hostname" parameter optional<commit_after>package org.mauritania.photosync.main

import org.mauritania.photosync.olympus.api.CameraApi
import org.mauritania.photosync.olympus.sync.FilesManager
import org.slf4j.LoggerFactory

case class Config(hostname: String = "oishare",  debug: Boolean = false, mode: String = "", kwargs: Map[String,String] = Map())

object Starter {

  type FileInfo = (String, Long)

  val logger = LoggerFactory.getLogger(this.getClass)

  // TODO add parameters
  // TODO add README.md
  // TODO add tasks to generate binaries
  // TODO try to use mockups? (to learn)

  def main(args: Array[String]): Unit = {

    val parser = new scopt.OptionParser[Config]("photosync") {
      head("photosync", "0.1")
      opt[String]('h', "hostname") valueName("<hostname>") action { (x, c) =>
        c.copy(hostname = x) } text("hostname or IP address of the camera server")
      note("some notes.\n")
      help("help") text("Please read README.md file.")
    }

    parser.parse(args, Config()) match {
      case Some(config) =>

        logger.info("Starting...")

        val cameraApi = new CameraApi(
          serverName = config.hostname
        )

        val manager = new FilesManager(cameraApi)

        logger.info("Synchronizing...")

        manager.sync()

        logger.debug("Done.")

      case None =>
      // Bad arguments
    }

  }

}

{'fraction_non_alphanumeric': 0.135605511240029, 'fraction_numerical': 0.002175489485134155, 'mean_word_length': 2.8913963328631875, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3630485', 'n_tokens_mistral': 866, 'n_tokens_neox': 840, 'n_words': 214}