Import/Export:
Updates Applications and Architecture

Sean Cheren
Wolfram Research

(RowDefault[, (Spacer1), , (Spacer1), ])  #WolframTechConf

Abstract

Over the years, Wolfram Language has been built to work with data of all shapes, kinds, and sizes. This talk will give a preview of upcoming updates to some formats supported by Import and Export, and discuss some practical applications of document related formats. We will also get a chance to dive even deeper, looking at the early stages of new tools to make working with live data as seamless as possible.

Outline

New and Updated Formats

Publishing data

Connecting to data

New Formats

Document Formats

DOCX

FileFormatProperties["DOCX"]

Import[,"Elements"]

Some metadata

Import[,"Description"]

Default is plain text (Looks sensible to me)

Import[]//Snippet[#,10]&

Formatted text support

Import[,"FormattedText"]/.

Embedded images

Import[,"EmbeddedImages"]

MOBI

FileFormatProperties["MOBI"]

Default is plain text

Import[]

Images in the file

Import[,"EmbeddedImages"]

Book cover

Import[,"CoverImage"]

RData/RDS

Import["ExampleData/Sample.rdata"]

Import["ExampleData/Sample.rds"]

Format Updates

XLS/XLSX

Named Ranges

Import[,"Elements"]

Import[,"NamedRanges"]

ab=Import[,"NamedRanges"]["Sheet1","AB"]

Import[,{"Data","Sheet1",Sequence @@ ab}]

Better Missing[] detection

Compare to 13.3:

These used to be interpreted as $Failed, now $Failed is specifically if there is an actual error in reading, not for a formula that results in #DIV0, #VALUE! etc

Import[,"Data"]

Import[,"Formulas"]

Rich Text!

Import[]

Import[,"FormattedData"]/.

More bug fixes and speed improvements :)

Try it and see!

Video Subtitles

Video editing functions

Add timed text in VideoCombine:

v=Video["ExampleData/bullfinch.mkv",AudioTrackSelection->1,SubtitleTrackSelection->None];

text=Table[t->Rotate[Text[Style[RandomChoice[{"Chirp!","Tweet!"}],RandomColor[],RandomInteger[{24,40}]],Scaled[RandomReal[{.1,.9},2]]],RandomReal[{-2Pi,2Pi}]],{t,0,Duration[v,None],2}];

VideoCombine[{v,text}]

Import/Export

Export timed text along with video frames:

frames=Import["ExampleData/wave.gif",ImageSize->Large];

sub=Thread[Quantity[Range[0,3],"Seconds"]->(Style[#,RandomColor[],Bold,20]&/@{"One","Two","Three","Four"})]

Import@Export["out.mkv",{"Frames"->frames,"Subtitle"->sub},FrameRate->5]

Import subtitle text with timestamps:

Import["out.mkv","SubtitleText"]

Import styled subtitle data:

Import["out.mkv","Subtitle"]

Publish

Overview

Work in progress! All demos and design are subject to change!

Share WL created content easily

Support a wide variety of services

Architecture designed to be easily added to and maintained

Consistent and controllable behavior

Reliable and intuitive defaults

LinkedIn Example

Feel free to connect with me!

BarcodeImage["https://www.linkedin.com/in/sean-cheren-22b95362"]

A simple example

Publish["Linkedin","text..."]

More WL types

Publish["Linkedin",<|"Text" ->"text...","Video" -> Video[...]|>]

Smart default behaviors

Publish["Linkedin",{"text...", Video[...]}]

Type conversion

Publish["Linkedin",<|"Text"->"text1...","Image"->"text2..."|>]

DataConnect

Overview

Very work in progress! Subject to change!

Live connections to data whether it’s local, networked, or service based

Architecture designed to be easily added to and maintained

An emphasis on efficient tabular (especially columnar) data

Developed tightly with efficient WL data structures and live data visualization

A leap towards building iterative data modeling tools

DataConnect["DataSource"]

Related Talks