update manual and version

* README: update manual
* pkg-list.scm: updated version
master
Nala Ginrut 13 years ago
parent cd0a55e4a8
commit 516451cde6

@ -3,12 +3,43 @@ guile-csv
Guile csv reader Guile csv reader
* usage: ==USAGE==
* install
./configure && make ./configure && make
sudo make install sudo make install
* read csv
(use-modules (csv)) (use-modules (csv))
(define my-csv-reader (make-csv-reader #:\,)) (define my-csv-reader (make-csv-reader #:\,))
(call-with-input-file "file.csv" my-csv-reader) (call-with-input-file "file.csv" my-csv-reader)
* csv->xml
(call-with-input-file "file.xml" csv->xml)
and file.xml could be:
<record-0>
<name>aaa</name>
<age>11</age>
<email>aaa@aaa.com</email>
</record-0>
<record-1>
<name>bbb</name>
<age>12</age>
<email>bbb@bbb.com</email>
</record-1>
* sxml->csv or csv-write to output a csv format file
(call-with-output-file "file.csv"
(lambda (port)
(sxml->csv
'((name age email) ("aaa" "11" "aaa@aaa.com") ("bbb" "12" "bbb@bbb.com"))
port)))
and file.csv would be:
name,age,email
aaa,11,aaa@aaa.com
bbb,12,bbb@bbb.com
Enjoy! Enjoy!

@ -14,7 +14,7 @@
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(package (csv (0 0 1)) (package (csv (0 0 2))
(depends (csv)) (depends (csv))
(synopsis "Guile csv reader") (synopsis "Guile csv reader")
(description (description

Loading…
Cancel
Save