Skip to contentSkip to conversation

"Hello Xen Project" Book.

Xen-users Mohsen 2 participants 4 messages Mar 28, 2017 – Apr 12, 2017 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Mohsen

author
#1 lore raw

I'm using LibreOffice 4.3.3.2 on Debian amd64 and this version not have MediaWiki export function!!
--------------------------------------------
On Tue, 3/28/17, M A Young <[email protected]> wrote:

Subject: Re: [Xen-users] [Xen-devel] "Hello Xen Project" Book.
To: "Juergen Gross" <[email protected]>
Cc: "Lars Kurth" <[email protected]>, "[email protected]" <[email protected]>, "Mohsen" <[email protected]>, "[email protected]" <[email protected]>
Date: Tuesday, March 28, 2017, 5:16 PM

Quoted 1 line · Juergen Gross
Quoted 3 lines · Lars Kurth
Quoted 3 lines
Quoted 3 lines

On 16 Mar 2017, at

05:00, Juergen Gross <[email protected]>

Quoted 5 lines · wrote:
Quoted 5 lines
Quoted 1 line
Quoted 2 lines · Mohsen
Quoted 2 lines

Thank you so much Lars.
I used LibreOffice and I will

test HTML format and inform you.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

You are aware of the

MediaWiki export function of LibreOffice?

Quoted 2 lines
Quoted 2 lines

Yes, but I

have not been able to find the extension at https://extensions.libreoffice.org/

Quoted 1 line
Quoted 1 line

The extension seems to have been

discontinued some time ago

Quoted 1 line
Quoted 1 line

I

don't know whether there are any distros, where you can still get it from.

Quoted 2 lines

openSUSE seems to have it (libreOffice

5.2.3.3).

and fedora has
the libreoffice-wiki-publisher package as part of ite LibreOffice build (5.2.6.2 in F25)

    Michael Young

_______________________________________________
Xen-users mailing list
[email protected]
https://lists.xen.org/xen-users

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 8 lines · Juergen Gross
Quoted 4 lines · Mike Wright
Quoted 2 lines · Mohsen

I'm using LibreOffice 4.3.3.2 on Debian amd64 and this version not have MediaWiki export function!!

Quoted 6 lines
Quoted 2 lines

There was a deb for the libreoffice extension
libreoffice-wiki-publisher. Give that a try.

In the end you need that only once for the initial conversion. So instead of trying to find the correct package you could just use your Xen skills to create an openSUSE VM and do it there. :-)

Juergen, thanks for the tip. I installed an openSUSE VM and the libreoffice-wiki-publisher came as default, which is good. So I ran a few tests.

First, what I couldn't get to work: I tried Send > MediaWiki in the hope that this would allow transferring of images, but could not get it to work. There seems to be an issue with authentication on the XenProject wiki side. But File > Export [MediaWiki (.txt)] works.

Also, I couldn't find any docs for the converter: the help links to pages which do not exist. But hey, we can live with that.

Here is what I learned:
=======================
* The export granularity is 1 LibreOffice document to 1 Wiki Page
* Most of the basic formatting such as lists and tables get correctly converted, but the converter introduces an awful lot of <span style"...">...</span> and <div style"...">...</div> attributes. Basically it does this every time, something slightly out of the ordinary has been done with text. These may have to be stripped with on-line tools such as http://www.unit-conversion.info/texttools/strip-tags/ or similar, otherwise the wiki pages become a nightmare to edit in future.
* URLs are correctly converted
* Headlines (aka text marked as "Heading 1", "Heading 2", etc. are not converted) to = ... =, == ... ==, etc.
* Images are not converted: when an image is found, "[[image:|top]]" is inserted
* I don't know how code snippets will come across in terms of formatting, as I don't have the ODT source of the book

What does this mean:
====================
In principle, this means that should be doable with 1-2 days worth of work. However it's not going to be entirely trivial. What we would need to do is to:
* Break the original book ODT file into smaller sections (probably along the chapter structure as exposed in the Contents)
* Then take each of the ODT files and do the following
** Save as MediaWiki (.txt) [1]. If appropriate remove tags using http://www.unit-conversion.info/texttools/strip-tags/
** Save as html [2] - to get the images. The bad news is that the images are saved using some hash names and not in the order they are in the document
** Create the wiki page from [1]
** Fix up bad formatting (such as missing = ... =, == ... ==, etc.)
** Manually upload the images from [2]
** Add appropriate [[Category:...]] tags at the bottom of each page. At least one for the wiki-book, e.g. [[Category:HelloXenProjectBook]] or something similar. But of course further categories per topic can be added as needed.

Once we have all the content, create the common pages such as contents, credits, etc. - and we should have a good starting point.

Best Regards
Lars

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author
#5 lore raw

Thank you for openSUSE VM and the libreoffice-wiki-publisher but you must split the .odt file?

Quoted 7 lines · Lars Kurth

On 29 Mar 2017, at 05:51, Juergen Gross <[email protected]> wrote:

Quoted 4 lines · Mike Wright
Quoted 2 lines · Mohsen

I'm using LibreOffice 4.3.3.2 on Debian amd64 and this version not have MediaWiki export function!!

Quoted 6 lines
Quoted 2 lines

There was a deb for the libreoffice extension
libreoffice-wiki-publisher.  Give that a try.

In the end you need that only once for the initial conversion. So instead of trying to find the correct package you could just use your Xen skills to create an openSUSE VM and do it there. :-)

Juergen, thanks for the tip. I installed an openSUSE VM and the libreoffice-wiki-publisher came as default, which is good. So I ran a few tests.

First, what I couldn't get to work: I tried Send > MediaWiki in the hope that this would allow transferring of images, but could not get it to work. There seems to be an issue with authentication on the XenProject wiki side. But File > Export [MediaWiki (.txt)] works.

Also, I couldn't find any docs for the converter: the help links to pages which do not exist. But hey, we can live with that.

Here is what I learned:
=======================
* The export granularity is 1 LibreOffice document to 1 Wiki Page
* Most of the basic formatting such as lists and tables get correctly converted, but the converter introduces an awful lot of <span style"...">...</span> and <div style"...">...</div> attributes. Basically it does this every time, something slightly out of the ordinary has been done with text. These may have to be stripped with on-line tools such as http://www.unit-conversion.info/texttools/strip-tags/ or similar, otherwise the wiki pages become a nightmare to edit in future.
* URLs are correctly converted
* Headlines (aka text marked as "Heading 1", "Heading 2", etc. are not converted) to = ... =, == ... ==, etc.
* Images are not converted: when an image is found, "[[image:|top]]" is inserted
* I don't know how code snippets will come across in terms of formatting, as I don't have the ODT source of the book

What does this mean:
====================
In principle, this means that should be doable with 1-2 days worth of work. However it's not going to be entirely trivial. What we would need to do is to:
* Break the original book ODT file into smaller sections (probably along the chapter structure as exposed in the Contents)
* Then take each of the ODT files and do the following
** Save as MediaWiki (.txt) [1]. If appropriate remove tags using http://www.unit-conversion.info/texttools/strip-tags/
** Save as html [2] - to get the images. The bad news is that the images are saved using some hash names and not in the order they are in the document
** Create the wiki page from [1]
** Fix up bad formatting (such as missing = ... =, == ... ==, etc.)
** Manually upload the images from [2]
** Add appropriate [[Category:...]] tags at the bottom of each page. At least one for the wiki-book, e.g. [[Category:HelloXenProjectBook]] or something similar. But of course further categories per topic can be added as needed.

Once we have all the content, create the common pages such as contents, credits, etc. - and we should have a good starting point.

Best Regards
Lars

_______________________________________________
Xen-users mailing list
[email protected]
https://lists.xen.org/xen-users

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#6 lore raw

Hi all,

I had a go at converting the first chapter
* See https://wiki.xenproject.org/wiki/Category:HelloXenProjectBook <https://wiki.xenproject.org/wiki/Category:HelloXenProjectBook> (and https://wiki.xenproject.org/wiki/Book/HelloXenProject/Instructions_for_Conversion <https://wiki.xenproject.org/wiki/Book/HelloXenProject/Instructions_for_Conversion>)
* And https://wiki.xenproject.org/wiki/Book/HelloXenProject/0-Contents <https://wiki.xenproject.org/wiki/Book/HelloXenProject/0-Contents>

All relevant information for people to help out is there. If anyone wants to help and needs some advice, feel free to do so

Best Regards
Lars

Quoted 62 lines · Mohsen

Thank you for openSUSE VM and the libreoffice-wiki-publisher but you must split the .odt file?

Quoted 7 lines · Lars Kurth

On 29 Mar 2017, at 05:51, Juergen Gross <[email protected] <mailto:[email protected]>> wrote:

Quoted 4 lines · Mike Wright
Quoted 2 lines · Mohsen

I'm using LibreOffice 4.3.3.2 on Debian amd64 and this version not have MediaWiki export function!!

Quoted 6 lines
Quoted 2 lines

There was a deb for the libreoffice extension
libreoffice-wiki-publisher. Give that a try.

In the end you need that only once for the initial conversion. So instead of trying to find the correct package you could just use your Xen skills to create an openSUSE VM and do it there. :-)

Juergen, thanks for the tip. I installed an openSUSE VM and the libreoffice-wiki-publisher came as default, which is good. So I ran a few tests.

First, what I couldn't get to work: I tried Send > MediaWiki in the hope that this would allow transferring of images, but could not get it to work. There seems to be an issue with authentication on the XenProject wiki side. But File > Export [MediaWiki (.txt)] works.

Also, I couldn't find any docs for the converter: the help links to pages which do not exist. But hey, we can live with that.

Here is what I learned:
=======================
* The export granularity is 1 LibreOffice document to 1 Wiki Page
* Most of the basic formatting such as lists and tables get correctly converted, but the converter introduces an awful lot of <span style"...">...</span> and <div style"...">...</div> attributes. Basically it does this every time, something slightly out of the ordinary has been done with text. These may have to be stripped with on-line tools such as http://www.unit-conversion.info/texttools/strip-tags/ <http://www.unit-conversion.info/texttools/strip-tags/>or similar, otherwise the wiki pages become a nightmare to edit in future.
* URLs are correctly converted
* Headlines (aka text marked as "Heading 1", "Heading 2", etc. are not converted) to = ... =, == ... ==, etc.
* Images are not converted: when an image is found, "[[image:|top]]" is inserted
* I don't know how code snippets will come across in terms of formatting, as I don't have the ODT source of the book

What does this mean:
====================
In principle, this means that should be doable with 1-2 days worth of work. However it's not going to be entirely trivial. What we would need to do is to:
* Break the original book ODT file into smaller sections (probably along the chapter structure as exposed in the Contents)
* Then take each of the ODT files and do the following
** Save as MediaWiki (.txt) [1]. If appropriate remove tags using http://www.unit-conversion.info/texttools/strip-tags/ <http://www.unit-conversion.info/texttools/strip-tags/>
** Save as html [2] - to get the images. The bad news is that the images are saved using some hash names and not in the order they are in the document
** Create the wiki page from [1]
** Fix up bad formatting (such as missing = ... =, == ... ==, etc.)
** Manually upload the images from [2]
** Add appropriate [[Category:...]] tags at the bottom of each page. At least one for the wiki-book, e.g. [[Category:HelloXenProjectBook]] or something similar. But of course further categories per topic can be added as needed.

Once we have all the content, create the common pages such as contents, credits, etc. - and we should have a good starting point.

Best Regards
Lars

Quoted 5 lines

_______________________________________________
Xen-users mailing list
[email protected] <mailto:[email protected]>
https://lists.xen.org/xen-users <https://lists.xen.org/xen-users>

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel