"""Generates a configuration file containing the version number."""
import os
from dbtk import VERSION, MODULE_LIST

if os.path.isfile("version.txt"):
    os.remove("version.txt")
version_file = open("version.txt", "wb")
version_file.write(VERSION + '\n')
categories = ['.'.join(cat.split('.')[:-1]) for cat in os.listdir("categories")
              if cat[-4:] == ".cat"]
modules = MODULE_LIST()
scripts = [module.__name__ + "," + module.VERSION for module in modules]
version_file.write(','.join(categories))
for script in scripts:
    version_file.write('\n' + script)
version_file.close()

"""Generates a configuration file containing the version number."""
import os
from dbtk import VERSION, MODULE_LIST

if os.path.isfile("version.txt"):
    os.remove("version.txt")
version_file = open("version.txt", "wb")
version_file.write(VERSION + '\n')
categories = ['.'.join(cat.split('.')[:-1]) for cat in os.listdir("categories")
              if cat[-4:] == ".cat"]
modules = MODULE_LIST()
scripts = [module.__name__ + "," + module.VERSION for module in modules
                                                  if module.main().public]
version_file.write(','.join(categories))
for script in scripts:
    version_file.write('\n' + script)
version_file.close()

Update version.py to exclude non-public datasets, meaning they won't be automatically downloaded.