<commit_before># xtoproto (csvtoproto, xmltoproto, etc.)

xtoproto is a library for automatically (1) inferring a protocol buffer
definition (a `.proto` file) from XML and CSV files, and (2) generating
runtime code from translating XML and CSV files to proto using the mappings
from (1).

## Quickstart {#quickstart}

### Stage 1 {#quickstart-stage-1}

```shell
infer_csv_to_proto_mapping -- \
  --csv <path to CSV file that fits in memory> \
  --mapping_out <path to .pbtxt output> \
  --package <package for the generated .proto file> \
  --message <short name for the generated message>
```

### Stage 2 {#quickstart-stage-2}

```shell
csv_to_proto_codegen -- \
  --mapping_pbtxt <path to .pbtxt output from stage 1> \
  --proto_out <path to output .proto file> \
  --go_out <path to output .go file with generaed translation code>
```

## Disclaimer
<commit_msg>Fix README.md in light of code being WIP.<commit_after># xtoproto (csvtoproto, xmltoproto, etc.)

xtoproto is a library for automatically (1) inferring a protocol buffer
definition (a `.proto` file) from XML and CSV files, and (2) generating
runtime code from translating XML and CSV files to proto using the mappings
from (1).

## Not yet operable

This repository was created on June 29, 2020. We are incrementally migrating the
code onto Github, and the project will not be functional until that migration is
finished. This README will be updated with instructions about how to use the
project once the migration is complete. In the mean time, feel free to browse
the code.

## Building

The project is buildable with Bazel. We also plan to make it buildable using `go
build` after the initial migration effort.

```
bazel build //...
```

## Disclaimer

{'fraction_non_alphanumeric': 0.08879860708067325, 'fraction_numerical': 0.009866511897852582, 'mean_word_length': 3.9971014492753625, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '7499240', 'n_tokens_mistral': 535, 'n_tokens_neox': 499, 'n_words': 242}