<commit_before>#include "extern.h"
#include "cx_log.h"
#include "keeper.h"
#include "sourcer.h"
#include "instancer.h"
#include "server.h"

int main(int argc, char *argv[]) {
  const char *storage;

  if (argc < 2) {
    fprintf(stderr, "Usage: %s <path_to_scan>\n", argv[0]);
    return 1;
  }

  storage = argv[1];
  cx_log_level = CX_LOG_LEVEL_DEBUG;

  CX_LOG("################");
  CX_LOG("Staring cifond with media source dir %s", storage);

  av_register_all();

  keeper_ptr keeper = keeper_create("/tmp/sifon.sqlite");

  sourcer_start(keeper, storage);
  instancer_start();

  int result = server_run(NULL, 8080);

  instancer_stop();
  sourcer_stop();
  cx_release(keeper);

  return result;
}<commit_msg>cifond: теперь можно выбрать файл базы<commit_after>#include "extern.h"
#include "cx_log.h"
#include "keeper.h"
#include "sourcer.h"
#include "instancer.h"
#include "server.h"

int main(int argc, char *argv[]) {
  const char *storage;

  if (argc < 3) {
    fprintf(stderr, "Usage: %s <path_to_scan> <filename.sqlite>\n", argv[0]);
    return 1;
  }

  storage = argv[1];
  cx_log_level = CX_LOG_LEVEL_DEBUG;

  CX_LOG("################");
  CX_LOG("Staring cifond with media source dir %s", storage);

  av_register_all();

  keeper_ptr keeper = keeper_create(argv[2]);

  sourcer_start(keeper, storage);
  instancer_start();

  int result = server_run(NULL, 8080);

  instancer_stop();
  sourcer_stop();
  cx_release(keeper);

  return result;
}
{'fraction_non_alphanumeric': 0.17156527682843473, 'fraction_numerical': 0.01161995898838004, 'mean_word_length': 4.652509652509653, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 6, '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': '4757639', 'n_tokens_mistral': 584, 'n_tokens_neox': 550, 'n_words': 124}