11module CSVFiles
22
33using TextParse, IteratorInterfaceExtensions, TableTraits, TableTraitsUtils,
4- DataValues, FileIO, HTTP
4+ DataValues, FileIO, HTTP, TableShowUtils
55import IterableTables
66
77export load, save
@@ -18,6 +18,26 @@ struct CSVStream
1818 keywords
1919end
2020
21+ function Base. show (io:: IO , source:: CSVFile )
22+ TableShowUtils. printtable (io, getiterator (source), " CSV file" )
23+ end
24+
25+ function Base. show (io:: IO , :: MIME"text/html" , source:: CSVFile )
26+ TableShowUtils. printHTMLtable (io, getiterator (source))
27+ end
28+
29+ Base. Multimedia. mimewritable (:: MIME"text/html" , source:: CSVFile ) = true
30+
31+ function Base. show (io:: IO , source:: CSVStream )
32+ TableShowUtils. printtable (io, getiterator (source), " CSV file" )
33+ end
34+
35+ function Base. show (io:: IO , :: MIME"text/html" , source:: CSVStream )
36+ TableShowUtils. printHTMLtable (io, getiterator (source))
37+ end
38+
39+ Base. Multimedia. mimewritable (:: MIME"text/html" , source:: CSVStream ) = true
40+
2141function fileio_load (f:: FileIO.File{FileIO.format"CSV"} , delim= ' ,' ; args... )
2242 return CSVFile (f. filename, delim, args)
2343end
0 commit comments