您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
此仓库已存档。您可以查看文件和克隆,但不能推送或创建工单/合并请求。

11 年前
123456789101112131415161718192021222324252627
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. '''
  4. Generates files from csv table.
  5. Part of Kai's Text Tools
  6. (c) 2013 Ivan "Kai SD" Korystin
  7. License: GPLv3
  8. '''
  9. from sys import argv
  10. from atg import ATG
  11. from data import CSVData
  12. from template import TemplateV2
  13. from os.path import split
  14. if __name__ == '__main__':
  15. if len(argv) == 3:
  16. generator = ATG(CSVData(argv[1]), TemplateV2(argv[2]))
  17. generator.write_files()
  18. elif len(argv) == 4:
  19. generator = ATG(CSVData(argv[1]), TemplateV2(argv[2]))
  20. generator.write_files(argv[3])
  21. else:
  22. print 'Usage:', split(argv[0])[-1], '<CSV file>', '<Template file>', '[Output directory]'
  23. print '(c)2013 Ivan "Kai SD" Korystin'