Skip to content

Instantly share code, notes, and snippets.

@melvincarvalho
Created October 13, 2013 12:55
Show Gist options
  • Save melvincarvalho/6962026 to your computer and use it in GitHub Desktop.
Save melvincarvalho/6962026 to your computer and use it in GitHub Desktop.
Create a ledger from HTML table
for (i=0,s=''; i<$('.s0').length; i++) s+=('<#p_' + i + '> a <http://xmlns.com/foaf/0.1/Person> ; <http://xmlns.com/foaf/0.1/name> "' + $('.s0')[i].textContent + '" . <#l_'+ i +'> a <https://payswarm.com/vocabs/commerce#Transfer> ; <https://payswarm.com/vocabs/commerce#destination> <#p_'+ i +'> ; <https://payswarm.com/vocabs/commerce#amount> ' + $('.s1')[i].textContent + ' .\n' ); console.log(s);
putFile('FILE', s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment