# VSV Examples

VSV is easily converted to lists, tables, xml, and json.

(Also view the other formats, including playlist, subtitle, site summary, object notation, above in the navigation bar.)

In the examples below, each VSV code block precedes their corresponding output after the code has been parsed in javascript. Comments are basically unclosed header fields. Style to your taste.

VSV to list


List with no headers

[[vsvlist]] ,milk ,eggs ,patties ((forgot , , ,fries ,hazelnut creamer ,, ,Sliced bread , ,

List with headers

[[vsvlist]] {{Shopping List}} ,milk ,eggs ,patties ((forgot , , ,fries ,hazelnut creamer ,, ,sliced bread , , [[vsvlist]] [[loginname]] :smithj [[password]] :x [[userid]] :561 [[groupid]] :561 [[realname]] :Joe Smith [[homedir]] :/home/smithj [[shell]] :/bin/bash ((etc.

Nested Lists

Two ways to make nested lists: with and without headers. Presence of a header field (excluding the filetype header) will determine whether headers are used for the remaining of the list. Mixing both methods can lead to unpredictable results.

Nested Lists without Headers

Each consecutive delimiter (null data) at the beginning of the row will indent one tier. [[vsvlist]] *Things to do today --Feed cat +++Rinse bowl +++Open cat food +++Mix dry and wet food in bowl +++Deliver on a silver platter to Pixel --Wash car +++Vacuum interior +++Wash exterior +++Wax exterior --Grocery shopping +++Plan meals +++Clean out fridge +++Make shopping List ====milk ====eggs ====patties & buns +++Go to store *Things to do tomorrow

Nested Lists with Headers

((vsvlist)) {{ use empty enclosed brackets to indent header and subsequent data rows {{Things to do {today} (4/9)}} {{}}{{Feed ((cat))}} `Rinse bowl `Open cat food `Mix dry and wet food in bowl `Deliver on a silver platter to Pixel {{}}{{Wash car}} `Vacuum interior `Wash exterior `Wax exterior {{}}{{Grocery shopping}} `Plan meals `Clean out fridge {{}}{{}}{{Make shopping List}} ,milk ,eggs ,patties,buns {{}} {{row with only empty headers to return to that many previous tiers `Go to store {{Things to do {tomorrow} (4/10)}}

VSV to table


Table with headers and data

Header rows hold any number of header fields. They become column headers in the resulting table.

Captions for the table can be created in header fields when preceded by double ticks ``. A second double-ticks will signify the position of the caption. Use 'lcr' to align the caption left, center, or right, respectively. Use 'tb' to place the caption above or below the table, respectively. The default is 'ct'.

A table may have more than one caption.

Choose your own delimiters for data rows -- anything but space.

[[vsvtable]] ((``Demo``r)) [[Name]] {{Age}} ((Gender)) ((each row of data can have different delimiter, no problem ,Hammie, 20.5, F -Chow, Vivian-40-F :Amuseum:25:M: *Shena'Fu *18+5/12 *F |Grndr-1245|21 months|| Fairy Nuff 14 K N/A ((``Guess these names :)``b))

Configuration file

[[vsvtable]] ((``Configuration File``t)) [[General]] ((display options: fullscreen, windowed, windowedmax =display=fullscreen =width=1920 =height=1080

Horizontal table

[[vsvtable]] ((``Users``l)) [[loginname]] [[password]] [[userid]] [[groupid]] [[realname]] [[homedir]] [[shell]] :smithj:x:561:561:Joe Smith:/home/smithj:/bin/bash

VML (VSV markup language)

class="vsv2vml" (( VML (VSV markup language) (( for displaying pages, including webpages, documents, printed paper (( use leading spaces for indentation (( use [ ] to create and close elements (( use < > to start and end attributes definitions [div [p $ To: Tove ] [p $ From: Jani ] [h3 $ Reminder ] [p $ Meeting this weekend! [span < {:style:color:red:font-variant:small-caps:backgroundColor:cyan} > $ Don't forget! ] $ Or your ass is mine! ] [p $ -J ] ]

VON (VSV Object Notation)

class="vsv2von" (( VON (VSV Object Notation) (( to represent programming objects (( use leading spaces for indentation (( use { } to create and close objects, hashtables (( use [ ] to create and close arrays, lists (( use ( ) to create and close functions, code blocks (( use < > to start and end function arguments, object attributes { {menu $id$file ,value,Filename < {:style:text-decoration:underline} [:class:hover:cute] {attributes ,attr1,value1 ,attr2,value2 {belowattributes ,even,super {evendeeper ,sem,pai } [ ,some,array,under,object,atts ] } [attrArrayed ,more,under,attributes [attrArrayed ,more,under,attributes ] { ,object,UnderArray } ] } > <,color,red,text-align,right> {popup [menuitem ,one,two { ,value,New ^onclick^CreateNewDoc } { ,value,Open ^onclick^OpenDoc^file } { ,value,Close ^onclick^CloseDoc^file } [ ,3,4,5,6 ] < ,array,attribute > ,A,B,C [,internal,list,of,items] {,key1,value1,key2,value2} ] [,inlinearray,under,object] {,inlineobject,under,object,key2,value2} } } (OpenDoc < =file= > $ contents = io.open(file); $ return contents; ) }