Incubator

Test ideas and PoC for new concepts

Syncing with MobileOrg

Once your server is properly configured, you can click on the Outlines toolbar icon, then click the Sync icon to start fetching your files.

What files are transferred?

Your index.org file is fetched, then any files it links to are fetched, and so on. For example, in the following case, 4 .org files will be transferred: index.org, first.org, second.org and third.org. You may notice third.org` is linked to from two different places, but it is only downloaded once.

Contents of index.org:

* [[file:first.org][An Org file I like]]
* [[file:second.org][Another Org file I like]]
  This is a [[file:third.org][link]] in the body text.

Contents of first.org:

* Some text
* [[file:third.org][Link to third.org]]

For the sake of our example, the files second.org and third.org do not contain any links, so their contents are irrelevant.

The sync process continues until all Org files (and the Org files they link to) have been downloaded.

Are my files transferred every time?

MobileOrg uses a fairly simple caching mechanism to prevent from unnecessarily downloading the same Org files repeatedly. If a file named checksums.dat exists in parallel to your index.org file on the server, only files whos checksums have changed will be re-downloaded.

You will need to keep the checksums.dat file up-to-date any time changes are made to your Org files.

Constructing checksums.dat:

$ md5sum * >checksums.dat
$ cat checksums.dat
2b00042f7481c7b056c4b410d28f33cf  first.org
41930d894e1a4c2353b85d0b8d96f381  index.org
e5b12e4697d09fa9757d3dc6fcaa5c5b  second.org
05eaf1239d84508477cda9d0fa86b1a1  third.org

If your Org file structure consists of subdirectories as well, you can use the following script to generate the checksum file recursively:

find . -name "*.org" -type f -print | sed 's/^\.\///' | xargs md5sum >checksums.dat

MobileOrg recognizes the output of md5sum, md5 (on OSX), shasum and sha1sum.