Commit Graph

  • 09557e4608 try to fix up formatting in README some more more master Geoff Leyland 2015-05-08 08:22:53 +1200
  • 9b2356b559 try to fix up formatting in README some more Geoff Leyland 2015-05-08 08:21:54 +1200
  • dc6324a23a try to fix up formatting in README Geoff Leyland 2015-05-08 08:20:20 +1200
  • d20cd42d61 If a column value is a string, use it as the column name Geoff Leyland 2015-02-13 10:29:42 +1300
  • fb69e94a89 fix argument to makename in openstring Geoff Leyland 2015-02-13 10:29:14 +1300
  • b3d3567333 Don't skip a line if both columns and header are true Geoff Leyland 2014-09-30 12:22:21 +1300
  • 4a7fec836d be consistent about removing spaces from the end of strings Geoff Leyland 2014-09-30 09:54:46 +1300
  • 6d254a27a4 be more thorough about guessing delimiters Geoff Leyland 2014-07-21 12:58:11 +1200
  • 22d84c44ee tidy BOM handling and add a test Geoff Leyland 2014-07-21 11:15:00 +1200
  • 54a7bb2221 Whoops! Trying to find a unicode BOM at the start of a file with an anchored pattern when file_buffer:find doesn't understand anchoring lead to reading the whole file and running out of memory right at the start. Use :sub to check the first few characters of the file Geoff Leyland 2014-06-19 17:52:44 +1200
  • 1edff5f4ef Document after that last commit making it more useful Geoff Leyland 2014-06-19 16:24:04 +1200
  • 3b28558461 if use() is passed a file, uses that. If it's passed nil as the buffer, it uses stdin Geoff Leyland 2014-06-19 16:13:38 +1200
  • 8db3740230 handle blank lines better: check whether they're blank before the transform runs. Also allow blank lines before the header Geoff Leyland 2014-06-17 15:22:58 +1200
  • 8eb59774ee whoops, there was a doubled-up unprotected call to column_map.transform in there Geoff Leyland 2014-06-17 15:10:37 +1200
  • 0ebafce1f7 normalise more title characters to spaces in column_map:new - in fact the same ones as in column_map:read_header Geoff Leyland 2014-06-17 14:17:15 +1200
  • ec99b22fae skip UTF-8 or 16 BOMs if you find one. There's other BOMs but this should do for now Geoff Leyland 2014-06-09 17:58:38 +1200
  • 70c5dd6f9b csv.lua: move error handling up, again, trying to make the parser a bit shorter. Not really working, but giving it a go all the same Geoff Leyland 2014-05-27 09:48:01 +1200
  • fd9d21cb9c csv.lua: make the column map managing stuff its own class to try to make separated_values_iterator cleaner. hmmm Geoff Leyland 2014-05-27 09:28:54 +1200
  • c4f21c0264 csv.lua: move initialisation code out of separated_values_iterator to try to make it a bit easier to see what's going on Geoff Leyland 2014-05-27 08:50:51 +1200
  • 8493881362 update license and make the default buffer block size a megabyte rather than a measly 4k Geoff Leyland 2014-05-26 21:38:32 +1200
  • be4420ae62 csv.lua: now that a buffer looks like a string, reading strings is easier Geoff Leyland 2014-05-26 21:21:14 +1200
  • 3d3bbfb6c1 csv.lua: separate the buffering stuff out into a file_buffer class (that looks strangely like a string...) Geoff Leyland 2014-05-26 21:03:54 +1200
  • d9d9e419c7 csv.lua: track the buffer start with a variable called (surprisingly) buffer_start, and now field_start and line_start count from the start of the whole file, not the current state of the buffer Geoff Leyland 2014-05-26 18:17:54 +1200
  • e2ea3d2f1a csv.lua: rename anchor_pos to field_start Geoff Leyland 2014-05-26 17:51:54 +1200
  • 0daa2ae5d7 csv.lua: move find's offsetting into field_find Geoff Leyland 2014-05-26 17:49:23 +1200
  • 6892667042 csv.lua: move the offset by anchor_pos out of sub and into field_sub Geoff Leyland 2014-05-26 17:46:17 +1200
  • 46e65775bf whoops. Fix up find's return values when we've hit the end of file. How did that work? Geoff Leyland 2014-05-26 17:38:58 +1200
  • e18409d73f csv.lua: rename find's second argument 'init' to match the Lua Reference Manual Geoff Leyland 2014-05-26 17:27:50 +1200
  • 966ba6722f csv.lua: tidy up truncating the buffer (not really the right word, since we're cutting off the beginning) and advancing anchor_pos (also a bad name) Geoff Leyland 2014-05-26 17:26:24 +1200
  • 88e30b6720 Test at all buffer sizes from 1 to 16. Fix the resulting bug when an embedded quote straddles two buffer blocks Geoff Leyland 2014-05-26 17:20:17 +1200
  • 13e3b69c74 csv.lua: this all doesn't work with small buffer sizes. Whoops. Made tests at small buffer sizes and fixed the problem Geoff Leyland 2014-05-26 17:06:28 +1200
  • c40e12bb7c test.lua: add an exclamation mark to the end of newlines so that they're explicit Geoff Leyland 2014-05-26 16:44:57 +1200
  • deac119c13 csv.lua: move some variable definitions closer to their use (the aim here is to move find and sub out into a buffer object) Geoff Leyland 2014-05-26 16:21:45 +1200
  • e0123ee133 csv.lua: fix typos Geoff Leyland 2014-05-26 16:17:38 +1200
  • 6ad339da69 Merge pull request #1 from kev82/openstring Geoff Leyland 2014-05-26 14:00:44 +1200
  • f28dfe0720 Added an openstring function, by wrapping the string in an object that supports read(bytes) and passing the object to the underlying code. Modified all the tests to run with both open and openstring. Kevin Martin 2014-05-18 18:52:16 +0100
  • 1ed256e9f5 add an scm rockspec Geoff Leyland 2014-01-29 13:29:03 +1300
  • c9988c8b93 handle blank lines more correctly Geoff Leyland 2014-01-29 13:28:47 +1300
  • ac033b3075 ignore blank lines (I'm not sure this is a good thing *in* the file, but ignoring blank lines at the end is a good idea) v1 Geoff Leyland 2013-12-06 12:56:02 +1300
  • 279ca0717d added tests for embedded quotes and reading files with headers Geoff Leyland 2013-12-05 21:37:25 +1300
  • 1a8aa46661 added a makefile Geoff Leyland 2013-12-05 21:21:19 +1300
  • 50e14b7484 Added one test, for embedded newlines, and fixed all the bugs it found Geoff Leyland 2013-12-05 21:20:10 +1300
  • 7294a1bc72 fix up accidental global variables. Thanks on Ashwyn Hirschi Geoff Leyland 2013-12-05 15:01:41 +1300
  • daa18891f3 get the read size right in extend. Thanks to xxopxe@gmail.com Geoff Leyland 2013-12-05 14:46:38 +1300
  • 4856a5aca7 Trying to clarify the multiple spaces issue in README.md Geoff Leyland 2013-12-05 06:50:18 +1300
  • 542393be04 Whoops, README.md said Lua 5.1 or 5.1. Should be 5.2 the second time Geoff Leyland 2013-12-04 22:45:55 +1300
  • da57f60673 first commit of lua-csv Geoff Leyland 2013-12-04 22:16:11 +1300