Closed svilupp closed 7 months ago
@svilupp I'm sorry for missing this helpful PR.
I think this is a great addition. I will give it more attention soon.
Thanks! I added some methods for when there is no tabular input.
Proof things work for tables
julia> t = (a = [1, 2], b = [3, 4]);
julia> mwetable(t)
df = """
a,b
1,3
2,4
""" |> IOBuffer |> CSV.File
julia> io = IOBuffer();
julia> mwetable(io, t);
julia> println(String(take!(io)))
df = """
a,b
1,3
2,4
""" |> IOBuffer |> CSV.File
julia> cliptable(t);
julia> mwetable()
df = """
a,b
1,3
2,4
""" |> IOBuffer |> CSV.File
julia> io = IOBuffer();
julia> mwetable(io);
julia> println(String(take!(io)))
df = """
a,b
1,3
2,4
""" |> IOBuffer |> CSV.File
tests look good! We should merge.
@alecloudenback Good to merge?
We will do a release after this (don't make a release yet)
I am not real familiar off hand with IO and the mwe usage in the tests. I think with a couple hours I could digest that but wouldn’t want to commit to that in the next 1.5 weeks. Don’t let me hold things up if you think it’s good.
Fixes https://github.com/pdeffebach/ClipData.jl/issues/29
Changes:
returnstring=false
(=default)FYI. I didn't add the default IO for the "reading" functionality
mwetable()
, because that seemed superfluous (it then passes everything tomwetable(t)
anyway).Tests pass. PR Should be ready for review.