Put environment variables in text file templates.
Project description
A dead-stupid templating utility script that simple-mindedly replaces $ENVIRONMENT_VARIABLE-ishy tokens with the contents of the environment variable of the same name. By “-ishy” I mean “the subset of environment variables whose names you can express with only capital letters, plus numerals and underscores after the first character”.
E.g.:
$YOU_CAN_USE_ME $I2MOK $_NO_DICE_IN_MY_CASE $IWontFlyEither
Viron handles curly-braces and backslash escapes for dollar signs, in the manner you have no doubt come to expect from many civilized syntactic programming traditions, e.g.:
$I_BECOME_MY_CONTENT $WHEREAS_I_REMAIN_UNAFFECTED ${I_LOVE_YOU}BUT_I_HAVE_BOUNDARIES
Viron works hard to be this straightforardly stupid. For example, Viron is implemented on top of the python standard-lib [string.Template class](http://docs.python.org/release/2.5.2/lib/node40.html), which idiotically takes the liberty of turning any occurances of doubled-up dollar signs (or ‘$$’) into a single dollar sign (to wit, ‘$’) that it should happen across while templating… Viron specifically lacks this nonsensical ‘feature’.
Conversely, the stdlib templater’s vexing ignorance of the backslash prefix to mean “this token is stripped of its power by my fiat, fuck the standard semiotic intent” by nearly all contemporary civilized programming languages. The idea is that Viron doesn’t want to over-explain itself, so anything consistent with the “environment-variable template syntax” concept is in, like backslashes; notions requiring additional bullet points have been cut, with the most ruthless vetos going to questionable shit like “silently fucking with the number of dollar signs in your file in a way you might not immediately notice” and suchlike.
And so yeah, this was a very deliberate “software architecture” decision, so you can relax right now and go about your business without worrying if I have heard of one of the other eleventy billion scripts, tools, frameworks, plug-ins, or thingees that accomplish this exact task except better or moreso or someshit. Viron isn’t some kind of freakish zombified imperative markup like [HAML](http://haml-lang.com/), nor is it some sort of wittily elegant thing that will up and become a gosh-darned de-facto standard, such as for example [Mustache](http://mustache.github.com/). It’s just dumb ol’ environment variables in text files – truth be told, I didn’t even want to write it, but I keept needing it and none of the other solutions were stupid enough.
And so! That said, I do love you and your contributions to open source, so please do feel free to fork it up and subsequently request pulls, I would be thrilled at any work you may have to contribute! I’m not even gonna say no if you take it the other way entirely and send me a patch titled “Viron is now turing-complete and implements semantically legible Oauth2 and free foot-rubs” I will probably totally accept it. Realistically, you’re going to hack on stuff with more cachét, like e.g.
demoing a realtime notification framework and protocol that uses at least three NoSQL stores simultaneously
sharing clever Haskell type-inference schemes with other people who also write clever Haskell type-inference schemes
not subclassing NSActionCell, staying in denial by writing convenience methods all day and only touching your app’s mongoloid UI in the simulator
punching Rasmus Lerdorf in the kidneys (q.v. backslash note ¶4 [supra])
“writing” incoherent and Byzantine Oauth2 examples that do not clarify the issue or condescend to explain what all the bits are, why in fuck those bits are there, or why they are fucking different from some (but not all) of the bits on this other different Oauth2 example over here
pair-programming behavior-driven domain-specific social-graph microframeworks pivoting on a responsive user-experience, in the cloud
… So but if Viron can actually work for you, I am quite literally and unsarcastically thrilled on your behalf — do let me know, and salud.
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/fish2000/viron/trend.png)](https://bitdeli.com/free “Bitdeli Badge”)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file viron-0.6.0.tar.gz
.
File metadata
- Download URL: viron-0.6.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d41877cdbad9ef8b9afc9dd496b56d03dc2beceaf0009d2f59169ba3b3b1c10 |
|
MD5 | aba15f78667791560c45b1e1dafe10b5 |
|
BLAKE2b-256 | 9d0d3d9aafa1d97a6d89986332911e0db8b73c5f8c640ad836614446d374d850 |
File details
Details for the file viron-0.6.0-py2.py3-none-any.whl
.
File metadata
- Download URL: viron-0.6.0-py2.py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a60e31b2dd12770a0ca788efc6ef716a0db2e28910dd0078377ce9a28ec4f08f |
|
MD5 | 50175081c36233de202da078db9f4ede |
|
BLAKE2b-256 | abc14eb08f7006c016fdf742c4f5cae23191e8b54260cf09aca9531cbb49160c |