This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import subprocess | |
import re | |
def containers(): | |
lxcOutput = subprocess.check_output( ['lxc', 'list' ] ) | |
ips = re.compile( '\d+\.\d+\.\d+\.\d+' ).findall( str( lxcOutput ) ) | |
nodes = dict( hosts = ips, vars = { "ansible_user": "root" } ) | |
inventory = dict( nodes = nodes ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python i18njson-translate.py --help | |
Usage: i18njson-translate.py [OPTIONS] INPUTFILE OUTPUT | |
Process and translate .po or JSON files and generate translated .po file | |
in result. Can work with exist .po files and if in initial file msgid | |
dissapear then mark translaed string as obsolete. Try to play nice with | |
version control systems and follow initial file order format, you will get | |
predicteable diffs. | |
Options: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" |