Skip to content

Commit

Permalink
Refine image saveToDisk documentation, closes #87 (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmilligan1 authored and ruebot committed Jan 9, 2019
1 parent 76cc397 commit 4583ddb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion content/aut/index.md
Expand Up @@ -1004,9 +1004,11 @@ only showing top 20 rows

You may want to save the images to work with them on your own file system. The following command will save the images from an ARC or WARC. Note that the trailing `/` is important for the `saveToDisk` command below. Without it, files will be saved with the prefix provided after the last `/` in the string.

For example, below, this would generate files such as `prefix-c7ee6d7c17045495e.jpg` and `prefix-a820ac93e2a000c9d.gif` in the `/path/to/export/directory/` directory.

```scala
import io.archivesunleashed._
import io.archivesunleashed.df._
val df = RecordLoader.loadArchives("example.arc.gz", sc).extractImageDetailsDF();
val res = df.select($"bytes").orderBy(desc("bytes")).saveToDisk("bytes", "/path/to/export/directory/")
val res = df.select($"bytes").orderBy(desc("bytes")).saveToDisk("bytes", "/path/to/export/directory/prefix")
```

0 comments on commit 4583ddb

Please sign in to comment.