Any python libs for parsing apache config files or if not python anyone aware of such thing in other languages (perl, php, java, c#)? As i\'ll be able to rewrite them in pyt
There is also one new parser released.
It still lacks documentation, however is quite straightforward for understanding.
Example
import apache_conf_parser
import pprint
DEFAULT_VHOST = '/etc/apache2/sites-available/000-default.conf'
vhost_default = apache_conf_parser.ApacheConfParser(DEFAULT_VHOST)
print vhost_default.nodes
print vhost_default.nodes[0].body.nodes
pprint.pprint(
{
i.name: [i.arguments for i in vhost_default.nodes[0].body.nodes]
}
)