Advantages of FODT format in LibreOffice
----------------------------------------
Last edited: $Date: 2017/02/26 09:51:40 $
LibreOffice, the free office suite, has several components. Writer
is the component that is used for text documents, just like
Microsoft Word. Writer can handle lots of formats. The OpenDocument
Text format (short: odt) is the native format for LibreOffice.
## Open doucment format
It is very important to use open formats for files and documents.
Closed source vendors, like Microsoft, use their file formats as a
weapon to force users into buying new versions. LibreOffice, like
most open source appilcations. use open formats to encourage
collaboration with other applications. Because their open format and
the absense of the commercial need to force users into new versions,
open format can be used for many years and will still be readable in
future decades.
## FODT format
A special variant of the odt format is the fodt format.
The fodt format is a single XML document, also known as Flat XML or
Uncompressed XML Files. The normally used odt file is a collection
of several sub-documents that are zipped together. The resulting
file, the odt, of a LibreOffice text document will be smaller then
the fodt- version of the same document. However, the fodt has some
advantages.
## First advantage: use of Version Control System (VCS).
The fodt is a flat file XML document, so the contents of this file
is just plain text. This makes it ideal for use with a Version
Control System. With the help of a Version Control System it is
possible to track every change in the document between commits to
the version control system. So a history of the document gets build.
Also, this makes it possible to revert to an older version.
> Version control, not just for developers
Version control systems are developed to make it possible to have a
team work on the same set of documents. However, it is alse very
useful to have a personal version control system.
Version control systems were origanally created for collaborative
development of computer applications. Developpers were writing
source code and the version conrol system made it possible that more
then one developer was working on the same source code files.
Changes coming from several different developers can be merged
into one new version. There is a complete track history of the
development of the source code. Revsion control makes it possible to
track every change to the person who commited the change. What works
for source code, works for other text files too. Version control
systems are very useful, and not only for developers.
## Private or personal version control system
Even when not working with several people on the same file a version
control system has it's value. This is the area where a personal
version control system comes to use. Important functions of a
private or personal version control system are to bring the ability
to revert to older versions and to have a central document
management system in place.
For bringing fodt files under a personal version control system, one
can use several options, like the following.
* RCS
* CVS
* Git
### RCS
Revision Control System or RCS is a rather old version control
system. However, it is still in use, for example Emacs offers
default support for RCS as a version control system. Of course one
can use any other VCS with Emacs,
It is easy to adopt Vim to automatically save backup versions in
RCS.
RCS uses the same storage as the files it has under version control.
Normally, in the directory with the documents that are under
revision control, there will be a RCS subdirectory. This makes it
easy for applications like Emacs and Vim to commit changes to it.
The disadvantage is that RCS will not help you in a backup strategy.
### CVS
Concurrent Versions System or CVS followes the client-server model.
The server provides a central repository and the clients commit
their changes to this repository.
CVS is heavenly used in open source systems like FreeBSD and
OpenBSD, so it is very stable and robust.
When using CVS in your home network, you will have to set up an CVS
server. If you are already running a FreeBSD, OpenBSD or Linux
server in your network, this will not be much work and also not very
complicated.
The storage of the central repository is seperated from the user
work area. When using CVS on the local workstation the user has to
check the change in and out the documents from the central
repository. So using a personal CVS immediately helps to protect the
document from crashes of your local workstation storage.
When putting all important files under control of the central
repository, taking care of the backup of this repository alone is a
great policy to protect your work.
### Git
Git is a much newer version control system then both RCS and CVS.
Git is a distributed version control system. This means several
instances of a repository can live on many places.
Working with Git as a personal version control system in your home
network is very easy if there is already a FreeBSD, OpenBSD or Linux
server running in your network. You only have to install Git on the
server and on your workstation. Add a user (often: "git") on your
server. For every project let this user create a separate git
repository in its home directory. Now on your workstation you can
clone this repository (this is how Git calls a checkout) and at
regular intervals commit your changes back to this repository. Git
uses ssh to collect the files, so you use
git clone @yourserver:repository.git
to clone a repository from the server to your local workstation.
This way you have a central repository with all your important
files, which can be the basis for a backup policy (see above at
CVS).
## Second avantage: Generate fodt files
Because fodt are just flat text files. This makes it possible to use
rather simple but non the less very powerful tools like awk to
generate fodt files from other plain text files.
Also with scripts like shell scripts or Perl or Puthon scripts fodt
files can be generated.
When generating fodt files, special care have to be taken to convert
some special characters to their html entities, like the characters
< and >.
$Id: fodtformat.txt,v 1.3 2017/02/26 09:51:40 matto Exp $