Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go

File Conversions

20190308 Converting from one file format to another is a common yet complex task. Here we collect together a variety of conversion tasks and the tools to perform them. We use pandoc for much of the hard work.

Jupyter notebook conversions are provided by jupyter-nbconvert:

$ jupyter-nbconvert --to markdown doc.ipynd --stdout > doc.md
$ jupyter-nbconvert --to python   doc.ipynd --stdout > doc.py
$ jupyter-nbconvert --to python   doc.ipynd --stdout > doc.R

Another type of conversion results from MS/Windows using a different line ending convention for text files to GNU/Linux (and Unix). Originally dos2unix was used for this task which is now accomplished by flip which will convert the file in-place:

$ flip -u doc.txt # Convert to GNU/Linux format.
$ flip -m doc.txt # Convert to MS/Windows format.

Copyright © 1995-2020 Togaware Pty Ltd
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware and the author of open source software including Rattle and wajig.
Also the author of Data Mining with Rattle and Essentials of Data Science.