<jupyter_start><jupyter_text>Instructions1. Click `Runtime > Run all`.2. Scroll to the bottom and upload a Deluge song file.3. Download the converted REAPER project file.  SetupClone the repo and install pydel and rpp:<jupyter_code>!rm -rf del2rpp
!git clone https://github.com/dcower/del2rpp.git
!pip install pydel rpp 
# TODO: Make setup.py work here.
#!cd del2rpp && python3 setup.py install<jupyter_output><empty_output><jupyter_text>ConvertUse this snippet to convert your Deluge song files to REAPER projects.Instructions:1. Run the snippet.2. Upload a Deluge song file (`.XML` extension).3. The resulting REAPER project file (`.rpp` extension) should be automatically downloaded.4. Rinse and repeat (upload another file, download another file, and so on).<jupyter_code>from google.colab import files
from del2rpp import del2rpp
import os
import types

while True:
  uploaded = files.upload()

  if len(uploaded.items()) == 0:
    break

  for name, data in uploaded.items():
    output_name = os.path.splitext(name)[0] + ".rpp"

    # If a file with the same name has been uploaded before, Colab doesn't give
    # us that new filename; so we always write the data to a known file.
    INPUT_NAME = "Song.XML"
    open(INPUT_NAME, "wb").write(data)

    args=types.SimpleNamespace()
    args.input_file = open(INPUT_NAME, "r")
    args.output_file = open(output_name, "w")

    del2rpp.convert(args)

    files.download(output_name)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09802586793737236, 'fraction_numerical': 0.010891763104152484, 'mean_word_length': 4.384615384615385, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '639404', 'license': 'MIT', 'n_tokens_mistral': 492, 'n_tokens_neox': 471, 'n_words': 160, 'path': 'del2rpp.ipynb', 'repo_name': 'dcower/del2rpp', 'size': '1469'}