This fork extends the command line interface (CLI) and is distributed as a convenient one-file-executable (Windows, Linux, Mac). It is also available via Docker Hub, PyPI and Binder.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.2 KiB

  1. #!/usr/bin/env python
  2. """
  3. Script to provide a command line interface to a Refine server.
  4. """
  5. # Copyright (c) 2011 Paul Makepeace, Real Programmers. All rights reserved.
  6. # This program is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation, either version 3 of the License, or
  9. # (at your option) any later version.
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # GNU General Public License for more details.
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <>
  16. import sys
  17. from google.refine import __main__, cli, refine
  18. # workaround for pyinstaller
  19. if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
  20. reload(sys)
  21. sys.setdefaultencoding('utf-8')
  22. if sys.platform == "win32":
  23. import codecs
  24. codecs.register(lambda name: codecs.lookup(
  25. 'utf-8') if name == 'cp65001' else None)
  26. if __name__ == '__main__':
  27. __main__.main()