Friday, 04 Jul 2008
Friday, 04 Jul 2008
As all of you are hopefully by now as enthusiastic about the ODF@WWW as I am, and as all of you by now know how it works, I would like to give detailed instructions on how to install it.
The prerequisites are the following:
You need some documents and images to get started with the ODF Wiki.
Last but not least you need some glue code, to tie everything together.
For your safety&convenience I packed everything into a tar file to be downloaded from mediacast. On my system I use the following directories:
"/var/www" - For all the content, e.g. the documents listed above.
"/usr/lib/cgi-bin" - For all the scritpts, and finally ...
"/etc/apache2/" - For the httpd.conf file.
I did unzip the JODConverter in the "/usr/lib/cgi-bin" directory for easy access. You may need to move the files to the appropriate directories and may slightly need to adapt them to match your system. I just needed to untar the "odf-at-www.tgz" in the root directory:
> su - > cd / > tar -xvzf odf-at-www.tgz > apache2ctl restart > soffice -accept="socket,port=8100;urp;"
That's it ... I hope you enjoy it :*)
Best regards
Kay
And here comes the code (without any warranty ;-) :
httpd.conf
LoadModule dav_module /usr/lib/apache2/modules/mod_dav.so
LoadModule dav_fs_module /usr/lib/apache2/modules/mod_dav_fs.so
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
DAVLockDB /var/apache2/DAVLock
<Directory /var/www>
Dav On
RewriteEngine On
# Rewrite directory "/" to index.html, apply other rules.
RewriteRule ^/$ /index.html [next]
# Forward any html request to the converter.
RewriteRule ^.*\.html$ cgi-bin/convert.sh [PT=application/x-httpd-cgi]
# Forward any odf indirector request to redirector.
RewriteRule ^.*\.od.r$ cgi-bin/redirect-odf.sh [PT=application/x-httpd-cgi]
</Directory>
convert.sh
#!/bin/sh # Abort on error. set -e # Save stdout and stderr. exec 6>&1 exec 7>&2 # Redirect stdout and stderr to log file. exec 2>&1 > /tmp/convert.sh.log # Do some logging. echo '********arg********\n' $* echo '********env********\n' $(env) echo '********set********\n' $(set) echo '*******************' # The file we need to provide. file=$DOCUMENT_ROOT$REDIRECT_URL # Ensure that a HTML file is available. make -f convert.mk $file # Reset stdout redirection. exec 1>&6 # Dump the content. echo "Content-Type: text/html" echo cat $file echo
redirect-odf.sh
#!/bin/sh
# Abort on error.
set -e
# Save stdout and stderr
exec 6>&1
exec 7>&2
# Redirect stdout and stderr to log file.
exec 2>&1 > /tmp/redirect-odf.sh.log
# Do some logging.
echo '********arg********\n' $*
echo '********env********\n' $(env)
echo '********set********\n' $(set)
echo '*******************'
# The documents base file name
# is everything but the last 'r'.
bfile=${REDIRECT_URL%r}
# Ensure that an ODF file is available.
make -f convert.mk "$DOCUMENT_ROOT$bfile"
# Reset stdout redirection.
exec 1>&6
# Dump the content.
echo "Content-Type: text/url"
echo
echo "http://$HTTP_HOST$bfile"
convert.mk
# Don't delete any intermediates.
.SECONDARY:
# Create a '.html' from an '.ods'.
%.html: %.ods
./convert_ods.sh $^ $@ $(notdir $*)
# Create a '.html' from an '.odt'.
%.html: %.odt
./convert_odt.sh $^ $@ $(notdir $*)
# Create a '.html' from template.
%.html:
./make_dummy.sh $(dir $@)/dummy.html $@ $(notdir $*)
# Create an '.odt' from template.
%.odt:
cp $(dir $@)/dummy.odt $@
# Create an '.ods' from template.
%.ods:
cp $(dir $@)/dummy.ods $@
convert_odt.sh
#!/bin/sh
# Abort on error.
set -e
source=$1 ; shift
target=$1 ; shift
stem=$1 ; shift
thisDir=$(dirname $0)/
temp=$(mktemp)
java -jar ${thisDir}jodconverter-2.2.1/lib/jodconverter-cli-2.2.1.jar $source $temp.html
btemp=$(basename $temp)
body_tag='<BODY LANG="en-US" DIR="LTR">'
edit_tag='<div style="position: fixed; background: url('tbbg.png') repeat-x; height: 38px; left: 0%;
padding-left: 5px; width: 100%; top: 0px; bottom: 38px;">\n <a href="http://'${HTTP_HOST}
/${stem}.odtr'">\n <img alt="Edit..." src="tbbtn.png" width="112" height="38" border="0"
longdesc="Edit document in OpenOffice.org"/>\n </a>\n</div>\n<br>\n<br>'
sed "s!smb://!http://!g" $temp.html | \
sed "s!\.odt\"!\.html\"!g" | \
sed "s!\.ods\"!\.html\"!g" | \
sed "s!SRC=\"$btemp!SRC=\"$stem!g" | \
sed "s!${body_tag}!${body_tag}${edit_tag}!" > $target
set +e
files=$(ls ${temp}_html_*)
set -e
target_stem=${target%%.*}
for file in $files ; do
varpart=${file##*_}
cp $file ${target_stem}_html_${varpart}
done
convert_ods.sh
#!/bin/sh
# Abort on error.
set -e
source=$1 ; shift
target=$1 ; shift
stem=$1 ; shift
thisDir=$(dirname $0)/
temp=$(mktemp)
java -jar ${thisDir}jodconverter-2.2.1/lib/jodconverter-cli-2.2.1.jar $source $temp.html
btemp=$(basename $temp)
body_tag='<BODY TEXT="#000000">'
edit_tag='<div style="position: fixed; background: url('tbbg.png') repeat-x; height: 38px; left: 0%;
padding-left: 5px; width: 100%; top: 0px; bottom: 38px;">\n <a href="http://'${HTTP_HOST}
/${stem}.odsr'">\n <img alt="Edit..." src="tbbtn.png" width="112" height="38" border="0"
longdesc="Edit document in OpenOffice.org"/>\n </a>\n</div>\n<br>\n<br>
\n<br>'
sed "s!\.odt\"!\.html\"!g" $temp.html | \
sed "s!\.ods\"!\.html\"!g" | \
sed 's!file://!http://localhost!g' | \
sed "s!SRC=\"$btemp!SRC=\"$stem!g" | \
sed "s!${body_tag}!${body_tag}${edit_tag}!" > $target
set +e
files=$(ls ${temp}_html_*)
set -e
target_stem=${target%%.*}
for file in $files ; do
varpart=${file##*_}
cp $file ${target_stem}_html_${varpart}
done
make_dummy.sh
#!/bin/sh # Abort on error. set -e # Save stdout and stderr exec 6>&1 exec 7>&2 # Redirect stdout and stderr to log file. exec 2>&1 > /tmp/make_dummy.sh.log # Do some logging. echo '********arg********\n' $* echo '********env********\n' $(env) echo '********set********\n' $(set) echo '*******************' source=$1 ; shift target=$1 ; shift stem=$1 ; shift sed 's!localhost/dddddddd!'$HTTP_HOST/$stem'!g' $source > $target
tags: apache odf opendocument openoffice.org wiki
Thursday, 03 Jul 2008
OpenOffice.org Beta 2 Release Candidate 1 build BEB300_m2 has been
uploaded to the mirror network.
The version will install as
OpenOffice.org 3.0.
As I expect another build I have uploaded the install sets for en-US
only and added language packs to the extended mirrors.
Attention: unfortunately the Bouncer links linked from the download page
do not work (yet).
If you find severe issues within this build please file them to
OpenOffice.org's bug tracking system IssueTracker and notify the
OpenOffice.org releases mailing list.
Please take the following link:
http://download.openoffice.org/3.0beta2rc/index.html
Alternative download page:
http://download.openoffice.org/3.0beta2rc/index-nojs.html
MD5SUMS:
http://download.openoffice.org/3.0beta2rc/md5sums.html
tags: openoffice.org qa rc release
Wednesday, 02 Jul 2008
OOo-Dev3.0 Developer Snapshot build DEV300_m22 which installs as OOo-Dev 3.0 has been uploaded to the mirror network.
The rename of the product name to OOo-Dev allows the installation of
the OpenOffice.org snapshot parallel to an OpenOffice.org 'final'
(released) version. For this version some language packs have been
uploaded and they should install into the OOo-Dev
installation.
If you find severe issues within this build please file them to
OpenOffice.org's bug tracking system IssueTracker.
Please use the following link
http://download.openoffice.org/680/index.html
MD5SUMS:
http://download.openoffice.org/680/md5sums.html
tags: openoffice.org qa release snapshot
Monday, 30 Jun 2008
The validation service supports multiple modes. In the conformance test mode it is checked whether the individual streams of the ODF document, like content.xml or styles.xml, are valid with respect to the OpenDocument schema after the pre-processing of foreign elements and attributes described in section 1.5 of the OpenDocument specification has been applied. This comes very close to a conformance test for ODF documents, but not all provisions for conforming documents are checked.
The validation mode is like the conformance mode, except that the pre-processing of foreign elements and attributes is omitted. Which means that a document only passes this test if it does not contain any elements or attributes not defined by ODF. The only exception are elements and attributes in the meta data and formatting properties, because the ODF schema allows arbitrary elements and attributes to appear here.
The third mode is the strict validation mode. In this mode, the streams are validated with respect to the strict variants of the ODF schema. The difference to the regular schemas is that meta data and formatting properties are restricted to those elements and attributes that ODF itself defines. This mode is useful if you want to check that a document contains only elements and attributes that ODF defines, but no extensions. You should use this mode in particular if you do development on OpenOffice.org (or any other ODF implementation), and want to make sure that your document does not only validate in regards to the ODF schema, but also does not use any extensions. Like the validation mode, this most is more restrictive than a conformance test. That means that errors may be reported for documents that are actually conforming to the ODF specification.
The validation service is based on a Java ODFValidator tool, which again is based on MSV. This tools is available in source code and provides also a command line interface. I will describe this tool in a separate post next week or so.
A last remark: When you use the ODF Validation service to check arbitrary documents you have on you hard drive and get error messages, please consider that these documents may not have been stored by an up-to-date version of OpenOffice.org or other ODF applications. That means you may get error messages for issues that have have been resolved already. We at OpenOffice.org take these issues serious and aim to resolve them as soon as possible (which does not mean that it is always possible to resolve them in the next release). But resolving an issues in OpenOffice.org of cause does not change the documents that have already been stored.
One reason we provide this service is actually that we want you, the community, to help us to find issues in OpenOffice.org. Therefore, if you find errors in documents that have been stored by the current OpenOffice.org versions, please submit an issue. We are also working on some rules that help us to link validation error messages to issues. But this will be a topic for another post, too.
tags: conformance odf opendocument openoffice.org relax-ng validation
Friday, 27 Jun 2008
While demoing the ODF Wiki to OpenOffice.org and Sun Folks (and by the way, I happily demo it to everybody stumbling into my office :-), I recognized different reactions of people, there were the ones who obviously use Wikis in their daily work and who immediately understood what I wanted to show, namely the possibility of an ODF based Wiki with rich editing capabilities (including graphics, formulas etc.), than there were the ones who seemed to be disappointed, as I just recombined already available stuff, and finally the ones, whose first thought was about how I did implement this. So, this posting is just for the people curious about how it works :-)
For
implementing the prototype of an ODF Wiki I used off-the-shelf
components only, I have to admit, that I only tried it on Linux and
OpenSolaris ... Windows just seemed too far away ;-)
Actually it is fairly simple, the OpenOffice.org suite already has WebDAV support build in, that means that you already can load and store documents from WebDAV enabled servers. For Apache the WebDAV extension can be enabled like this:
LoadModule dav_module mod_dav.so
LoadModule dav_fs_module mod_dav_fs.so
DAVLockDB /var/apache2/DAVLock
<directory "/var/www">
Dav On
<directory>
What was missing yet was a way to make any stored documents
available as HTML to web browsers, while ensuring that a browser can forward a
document to OOo again for editing purposes. WebDAV was already there,
thus I looked how I could interpose delivering HTML pages by the web server, Apache provides for this the "rewrite_module", e.g. with the following
rule
RewriteRule .*\.html$ cgi-bin/convert.sh [PT=application/x-httpd-cgi]
I can ask Apache to always call my "convert.sh" script the moment an HTML page gets requested, OK, the foot was in the door for HTML pages. Next problem was, that the browsers I knew of always downloaded any linked file which they could not render themselves to the "/tmp" directory, to than call any registered helper apps with this copied file. For my ODF documents that meant, that OOo always opened a copy, located in the "/tmp" directory, of any linked ODF file instead of the genuine file on the server. Changing respectively saving such copy does obviously not touch the genuine file at all. The (only) solution which came to my mind was, to use an indirection file which contains the URL of the genuine document. For that I "invented" the new HTTP Content-Type "text/url". Such an indirection dump look like this:
Content-Type: text/url http://localhost/aspread.ods
This URL gets then downloaded by the browser, which stores it in a temporary file and than executes a little helper, this helper retrieves the URL from the indirection file and calls OOo with it.
What I needed was a rule for Apache to be able to generate the
indirection content (the URL of the genuine document) on the fly, while not conflicting with OOo WebDAV
access (to retrieve and store .odt, .ods etc.):
RewriteRule .*\.od.r cgi-bin/redirect-odf.sh [PT=application/x-httpd-cgi]
The "redirect.sh" script gets executed because of an indirector URL, which basically is the URL of a genuine document with a trailing 'r' (for "redirect"), it than removes the trailing 'r' and puts the reduced URL into the reply, while the Content-Type is "text/url" :-)
Only missing piece was now the conversion from ODF to HTML and the addition of the "Edit" button to the resulting HTML documents.
Coincidently Stefan Zimmermann pointed me to the JODConverter, which actually did provide exactly the functionality I needed, I now could create HTML documents from ODF documents on the command line on the fly. A little sed script and some glue code than helped to patch the generated HTML documents to include the "Edit..." button and the indirector link (e.g. "http://localhost/aspread.odsr" - notice the trailing 'r'). I am no artist and happily accepted Lutz Hoegers offer to create the images for the buttons etc., now everything was together, quite hacky but usable to give a demo and to create the screencast ... :-)
I am sorry that I didn't yet give installation instructions but hope explaining how it works is already helpful. My next blog posting, going to be called "ODF@WWW - Simply Install", is already in preparation, please be patient, it is only a matter of days :-)
To be continued ...
Regards
Kay
tags: apache odf opendocument openoffice.org wiki
Wednesday, 25 Jun 2008
Here is my weekly update on what is hot in our development teams in calendar week (CW) 26.
IN FOCUS
ODF Toolkit project at OOo: ODFDOM released
The new version ODFDOM 0.6.4 has been uploaded!
Please find more at http://wiki.services.openoffice.org/wiki/ODFDOM
WEEKLY SCHEDULE
CHART
http://graphics.openoffice.org/chart/chart.html
Started:
-
Ongoing:
Bugfixes
Finished:
-
DATABASE
http://dba.openoffice.org/
Started:
-
Ongoing:
Finished:
IMPRESS, DRAW & GRAPHIC SYSTEM LAYER
http://graphics.openoffice.org/
http://gsl.openoffice.org/
Started:
-
Ongoing:
Template Pack II
Evaluating/Selecting Extras/Templates OOo3.0
Consolidating Layout and Presentation Templates for OOo3.0
Mac OS X Aqua Port: performance optimization for pixel operations
Finished:
ODF tasks (bullet rework)
Template Pack II: Replacing Meta information in documents with appropriately branded strings
WRITER, MATH & FRAMEWORK
http://sw.openoffice.org/
http://framework.openoffice.org/
Started:
-
Ongoing:
XML: Support for RDFa and RDF XML meta data in ODF 1.2 documents
Writer: docx import: Import of OLE objects
Writer: docx Import: import of document properties
Writer: Refactoring – separate core from layout
Writer: Changes for lists in ODF 1.2
Framework: service for action logging
Linguistic: convert dictionaries in OOo cvs to extensions
Finished:
Framework: Centralize management of caption bar titles
PROGRAMMABILITY
http://api.openoffice.org/
http://extensions.openoffice.org/
http://installation.openoffice.org/
http://ucb.openoffice.org/
http://udk.openoffice.org/
http://util.openoffice.org/
Started Tasks:
-
Ongoing Tasks:
System integration: file type registration and OOo program association for docx, pptx, xlsx, ...
Netbeans OOo API Plugin 1.1.3 : Support for OOo 3.0
OOo Vista Readiness: OOo 3.0 Tasks
SDK : Adaptions to 3-layer-office
Installation: Windows: Install MSVC 9 Runtime system-wide
Finished:
OOo Help System: Migration to new indexer (Lucene)
Extensions Infrastructure : Bundled Extensions : some Enhancements/Fixes for OOo 3.0
Extensions Infrastructure : new Extension Manager UI : custom icons for extensions
ODF / XML
http://xml.openoffice.org/
Started:
-
Ongoing:
ODF2XHTML enhancements (CWS xsltfilter10)
OOo Metadata API - Review/Adaption
Finished:
ODF TC: Default Properties Values
ODF TOOLKIT
http://odftoolkit.openoffice.org/
Started:
Restructuring of OOo packages: three-layer-office: support for editions
Ongoing:
Restructuring of OOo packages: three-layer office: bug fixing
Restructuring of OOo packages: new package structure
ODFDOM Implementation
Finished:
-
VISUAL DESIGN
http://ui.openoffice.org/VisualDesign/
Started:
-
Ongoing:
Beta Bug Fixes - Galaxy project
Finished:
OOo 3.0 Document icon design
OOo 3.0 Template icon design
OOo 3.0 Main Appicaton icon (Starter) design
Create 4bit version of OOo 3.0 Mimetype icons for Windows
LIGHTNING – a PIM for OOo
http://www.mozilla.org/projects/calendar/lightning/
Started:
-
Ongoing:
Scheduling API and CalDEV scheduling
Editing of future occurrences of a recurring series (only)
Error Notification Improvements
Support for multiple alarm types
Finished:
Updatable Timezones
ALL TEAMS
Started:
-
Ongoing:
OOo 3.0 bugfixing
Patch evaluation and integration
Evaluation of requirements in Issuetracker
Finished:
-
tags:
Tuesday, 24 Jun 2008
OOo-Dev3.0 Developer Snapshot build DEV300_m21 which installs as OOo-Dev 3.0 has been uploaded to the mirror network.
The rename of the product name to OOo-Dev allows the installation of
the OpenOffice.org snapshot parallel to an OpenOffice.org 'final'
(released) version. For this version some language packs have been
uploaded and they should install into the OOo-Dev
installation.
If you find severe issues within this build please file them to
OpenOffice.org's bug tracking system IssueTracker.
Please use the following link
http://download.openoffice.org/680/index.html
MD5SUMS:
http://download.openoffice.org/680/md5sums.html
tags: openoffice.org qa release snapshot
Monday, 23 Jun 2008
First, let me congratulate the Mozilla community on the very, very high download number of Firefox 3 in the first 24 hours. The download-day was in my eyes a great success for the Mozilla community. Marketing and all background-members of Mozilla.org did a good job and raise the bar for a software-rollout.
Back to OpenOffice.org and its versions. Looking back on our last download numbers we can see them increasing version by version. We grow over 20% from Version 2.3.1 to 2.4.0. Now the 2.4.1 started and it looks good to beat our own record.
Well, certainly our OpenOffice.org is a good product, for free and localized in many languages. We have extensions to extend office functionality if needed. In the back-ground runs the update-service to guarantee that the user get the latest updates. Apropos notification, our friends from java.com notified by each java-update that you can get the office productity suite. Big thank you for this hint! - But beside this we also changed some things in the web-area.
The OpenOffice.org website-team, here explicit named Maarten and Ivan did a very good job changing the whole web-design to a new look-and-feel plus a redesign of our pages. This improves the usability enormously.
Another factor is the one-download-click that enables the user to get the download starting with one-click from the homepage or the download main-page. In numbers, before we started with the one-click and the redesign of the pages 10% of visitors started a download of OpenOffice.org after visting the homepage. After the introduction of the one-click and the other web-changes 20%. Hey, this was a big step forward to grow.
The OpenOffice.org 2.4.1 is on the way and I believe it will break our previous download-numbers. Looking at Firefox and their version number 3, I hope we will also have a big success with our upcoming OpenOffice.org 3. Please help testing and fixing latest issues, get the Beta!
tags: download ooo openoffice.org web
Friday, 20 Jun 2008
OOo-Dev3.0 Developer Snapshot build DEV300_m20 which installs as OOo-Dev 3.0 has been uploaded to the mirror network.
The rename of the product name to OOo-Dev allows the installation of
the OpenOffice.org snapshot parallel to an OpenOffice.org 'final'
(released) version. For this version some language packs have been
uploaded and they should install into the OOo-Dev
installation.
If you find severe issues within this build please file them to
OpenOffice.org's bug tracking system IssueTracker.
Please use the following link
http://download.openoffice.org/680/index.html
MD5SUMS:
http://download.openoffice.org/680/md5sums.html
tags: openoffice.org qa release snapshot
Thursday, 19 Jun 2008
Using OOo in my daily work as well as the OOo Wiki, I noticed an obvious disconnect between these two, especially taking into consideration, that we like to promote ODF with OOo.
OOo is used to create and to modify rich documents, which are mostly stored as data files on the local hard disk. Typical scenarios include attaching these documents/files to mails or uploading them somewhere. OOos strength is it's WYSIWYG approach for changing rich documents, which includes spreadsheets, drawings, presentations and certainly texts. Though nowadays this does not seem to be sufficient anymore, "sharing" as by publication to a few or many individuals needs to be addressed as well. Not supporting this is OOos weakness ...
Wikis, as opposed to rich documents, are more lightweight and allow the direct editing of pages of a particular website by clicking an unspectacular "edit" link. Unfortunately one has to learn a dedicated "programming language", which is not suitable for creating expressive tables or graphics but mostly for simple text only. The document handling is a Wikis strength, but the document editing and simpleness are it's weaknesses ...
Thinking about that, I understood that these two approaches may be married to become an "ODF Wiki", combing their strength - simple editing and simple publishing - while eliminating their weaknesses.
No sooner said than done, I installed an apache webserver, enabled WebDAV, did some (hacky) bash scripting, and got the following:
(YouTubes resolution is not the best, you can download the video as 1280x720 from mediacast. It is showing OpenOffice.org used as a WYSIWYG editor for documents stored on a webserver. Demoing Wiki like capabilities of adding, retrieving, manipulating and publishing documents.)
One may notice, that the "full" experience with an "ODF Wiki" may be achieved by donating a browse-mode to OOo. Nothingness the "ODF Wiki" does certainly support HTML access as well. The demoed scenario is only one of many use cases natively supporting ODF on the server and using OOo as a client. The Wiki approach may be applied to blogging as well, though this is only the tip of the iceberg. Just imagine what you could do, if you make the parts (such as paragraphs, styles etc.) or the content of the stored documents accessible, e.g. from the "gallery" (the thing I copied the image from), you could easily recombine it (either by inserting copies or references) to create other documents.
If you like, or even if you don't like, what you see, please comment. I believe this approach has huge potential and would love to hear your thoughts, impressions etc. and would certainly like to see YOU helping with bringing this forward :-)
Setting up the "ODF Wiki" with the scripts etc. is very simple. I am going to give the details in one of my next blogs :-)
To be continued ...
Regards
Kay
tags: apache odf opendocument openoffice.org wiki