# -*- coding: utf-8 -*-
"""
```
# 1.
$ cp -r ~/.zipline/data/quandl-xjpx/2016-12-28T08\;14\;58.046694 \
        /tmp/quandl-xjpx/

# 2.
$ python transform_quandl_xjpx_archive.py
```
"""
import tarfile


with tarfile.open('/tmp/quandl-xjpx.tar', 'w') as f:
    f.add('/tmp/quandl-xjpx')

@@ -194,16 +194,26 @@
 tarfile%0A
+import os%0A
 %0A%0Awith t
@@ -267,13 +267,16 @@
     
-f.add
+os.chdir
 ('/t
@@ -292,8 +292,57 @@
 -xjpx')%0A
+    for fn in os.listdir('.'):%0A        f.add(fn)%0A

Fix bug on transform quandl archive