[pmwiki-users] Tabular thought -- simplify conversion between markup styles of tables
Christian Ridderström
christian.ridderstrom at gmail.com
Tue Aug 26 02:54:42 CDT 2008
On Tue, 26 Aug 2008, Kathryn Andersen wrote:
> On Mon, Aug 25, 2008 at 11:54:58PM +0200, Christian Ridderstr?m wrote:
>> * IV: Using a spreadsheet software to generate a HTML with the table
>> and then use (:includurl ... :) to embed this in a wiki page.
>> This is something I started using today and I find it rather
>> convenient actually. I can recommend it, but I'd prefer better
>> support in the spreadsheet software for exporting to HTML.
>> (:includeurl doc:myspreadsheet.html :)
>> Ideally, the embedded <object> should be preceeded with a link
>> to the spreadsheet itself so that you can edit it easily.
>> Finally, if you upload an updated spreadsheet, it should
>> automatically be converted to HTML. [*]
>
> IncludeUpload will give you better support for the HTML version
> of the spreadsheet, I think.
I actually use a version control system (Subversion) for the files
(spreadsheet and HTML). For this reason I need to use a URI to refer into
the repository of the version control system. Otherwise IncludeUpload
would work.
> All you need to do is upload the spreadsheet HTML as an attachment (the
> Attach: markup) and then use the (:includuplode :) markup to display the
> HTML inside the wiki. Then when you update the spreadsheet (in your
> spreadsheet program), then update the upload with the HTML version.
In my case the update cycle goes as follows:
1. Open the spreadsheet (it's under version control in a local work
directory). Modify the spreadsheet and save changes.
2. Export to a HTML-file (in the local work directory)
3. Commit the modified files to the repository, basically
svn commit
The last step automatically sends the changes to the repository on the
server. On the wiki page I still have the markup:
(:includeurl VCS:doc/somefile.html :)
where 'VCS:' is an intra map prefix into a Subversion repository via
WebDAV. Since the content in the repository has changed, the rendered wiki
page will contain the newly exported spreadsheet.
> http://www.pmwiki.org/wiki/Cookbook/IncludeUpload
Thanks for the link. If I used a network file system (I'd probably use
AFS), then I could work on the files directly on the server, and modify
IncludeUpload to refer to the files there. That'd probably be convenient.
However, then I'd also implement the stuff I describe at the end of this
post.
> I don't think anyone has written a recipe for converting an actual
> spreadsheet file to HTML within PmWiki; I expect the spreadsheet
> software itself would do a better job of it.
Oh, I definitely agree! What I'd like is simply to have an external tool
that can export a .ods-file (OpenOffice spreadsheet) into HTML. Then I
could configure the repository of the version control system so that
whenever a new version of the spreadsheet is committed, it'll
automatically run the tool that exports to HTML.
Unfortunately I couldn't find a way to make OpenOffice export to HTML
through a command line switch. If I'd found that, the update cycle could
be reduced to the following sequence:
1. Open the spreadsheet (it's under version control in a local work
directory). Modify the spreadsheet and save changes.
2. Commit the modified files to the repository, basically
svn commit
The export to HTML could of course also be automated in the case where you
are using a networked file system. Or if you manually upload the
.ods-file. We could for instance create a wiki markup like one of the
following (the latter is the more advanced version):
(:includeExport file.ods -> file.html :)
(:includeExport source=file.ods dest=file.html converter=OpenOffice :)
This markup would then compare the time stamps of file.ods and file.html,
and if the former is more recent it'd run the converter script. Finally
the result would be included using something like (:includeupload:).
regards,
Christian
--
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list