Project

rowkvx

0.0
No release in over a year
Parses rows of Kvx plain text.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.0, >= 1.0.1
 Project Readme

Introducing the rowkvx

require 'rowkvx'

s = "
ruby: Time.now
snippet:
  var n = new Date().toUTCString();
  var n = new Date().toUTCString();
exact_match: false
notes: foo
resources:
  https://www.w3schools.com/jsref/jsref_toutcstring.asp
  https://www.w3schools.com/jsref/jsref_toutcstring2.asp
tags: date time

ruby: Date.now
snippet:
  var n = new Date().toUTCString();
  var n = new Date().toUTCString();
exact_match: false
notes: 
resources:
  https://www.w3schools.com/jsref/jsref_toutcstring.asp
  https://www.w3schools.com/jsref/jsref_toutcstring2.asp
tags: date time
"

rkvx = RowKvx.new(s)
rkvx.to_a

In the above example the text is parsed using the RowKvx gem which returns an Array object containing 2 Hash objects, each representing a parsed record or row.

Resources

rowkvx rowx kvx gem