vsml: a (v)ery (s)imple (m)arkup (l)anguage
“avoiding complexity reduces bugs.” - linus torvalds
table of contents
features
current features
- simple ini-like syntax
- lightning fast python functions
- comments
planned features
- toml-like subsections
- make initFile check for more possible issues
file syntax
# a comment before a section!
[ExampleSection]
ExampleKey1=ExampleValue1
ExampleKey2=ExampleValue2
# a comment between sections!
[ExampleSection2]
# a comment inside a section!
ExampleKey1=ExampleValue1
ExampleKey2=ExampleValue2
ExampleKey3=ExampleValue3
# a comment at the end of the file!
functions
initFile
the initFile function checks if the file exists, and can be written to.
if it is possible to write to the file, it will strip the file of unneeded whitespace so that the following functions will work properly.
in future versions, this function will attempt to fix files with syntax errors.
it is highly recommended to run this function before any others.
usage:
initFile("/path/to/file.vsml")
findSec
the findSec function returns the first line, and last line of a section, in the form of a list.
usage:
findSec("/path/to/file.vsml", "ExampleSection1") # returned: [ 0, 2 ]
findKey
the findKey function returns where a key is in a file.
usage:
findKey("/path/to/file.vsml", "ExampleKey1", "ExampleSection1") # returned: 1
readKeyValue
the readKeyValue function returns the value of a key.
usage:
readKeyValue("/path/to/file.vsml", "ExampleKey1", "ExampleSection1") # returned: "testValue1"
editKeyValue
the editKeyValue function changes the value of a key.
usage:
editKeyValue("/path/to/file.vsml", "ExampleKey1", "NotExampleValue1", "ExampleSection1")
rename
the rename function changes the name of a key, or a section.
usage (key):
rename("/path/to/file.vsml", "NotExampleKey1", "ExampleSection1", key="ExampleKey1")
usage (section):
rename("/path/to/file.vsml", "NotExampleSection1", "ExampleSection1")
add
the add function adds a key, or section.
usage (key, by section):
add("/path/to/file.vsml", section="ExampleSection1", key="ExampleKey2", value="ExampleValue2")
usage (key, by line number):
add("/path/to/file.vsml", lineNum=27, key="ExampleKey2", value="ExampleValue2")
usage (section, add to end of file):
add("/path/to/file.vsml", section="ExampleSection2")
usage (section, by line number):
add("/path/to/file.vsml", lineNum=26, section="ExampleSection2")
delete
the delete function deletes a key, or section.
usage (key):
delete("/path/to/file.vsml", section="ExampleSection1", key="ExampleKey1")
usage (section):
delete("/path/to/file.vsml", section="ExampleSection1")
usage (line number):
delete("/path/to/file.vsml", lineNum=27)
Metadata
Release files for vsml 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vsml-0.3.1.tar.gz | 4.8 kB | Without provenance | Details for vsml-0.3.1.tar.gz |
Release files / vsml-0.3.1.tar.gz
| Download URL | vsml-0.3.1.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
809466c94c9240b2b725c215dc6f72daf4f494e7070301a70cea594cefa1e396
|
|
BLAKE2b-256 checksum How to use checksums |
8ae282615c97f774a4fb235f4b333e8152c813373a1607b6f5a08df4b411d276
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
|
Security for vsml 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.