From: Mohsen Subject: Re: [Xen-users] "Hello Xen Project" Book. Date: Tue, 4 Apr 2017 14:25:27 +0000 (UTC) Message-ID: <8472611.6234222.1491315927128@mail.yahoo.com> References: <1158994522.440219.1490728267390.ref@mail.yahoo.com> <1158994522.440219.1490728267390@mail.yahoo.com> <9f591831-d0e8-ca74-3b0b-c5d311e66014@suse.com> <867A6A45-B01C-4708-B742-C64D837560D8@gmail.com> Reply-To: Mohsen Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1172924479156437814==" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvPOl-0004Ed-EA for xen-devel@lists.xenproject.org; Tue, 04 Apr 2017 14:25:31 +0000 In-Reply-To: <867A6A45-B01C-4708-B742-C64D837560D8@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Lars Kurth , Mohsen Mostafa Jokar Cc: Juergen Gross , xen-devel , "xen-users@lists.xenproject.org" List-Id: xen-devel@lists.xenproject.org --===============1172924479156437814== Content-Type: multipart/alternative; boundary="----=_Part_6234221_1326007334.1491315927125" Content-Length: 10644 ------=_Part_6234221_1326007334.1491315927125 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thank you for=C2=A0openSUSE VM and the libreoffice-wiki-publisher but you m= ust split the .odt file?=C2=A0=20 On Monday, April 3, 2017 8:38 AM, Lars Kurth = wrote: =20 =20 > On 29 Mar 2017, at 05:51, Juergen Gross wrote: >=20 > On 28/03/17 21:33, Mike Wright wrote: >> On 03/28/2017 12:11 PM, Mohsen wrote: >>> I'm using LibreOffice 4.3.3.2 on Debian amd64 and this version not >>> have MediaWiki export function!! >>=20 >> There was a deb for the libreoffice extension >> libreoffice-wiki-publisher.=C2=A0 Give that a try. >=20 > 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 th= at this would allow transferring of images, but could not get it to work. T= here seems to be an issue with authentication on the XenProject wiki side. = But File > Export [MediaWiki (.txt)] works.=20 Also, I couldn't find any docs for the converter: the help links to pages w= hich do not exist. But hey, we can live with that. Here is what I learned: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D * The export granularity is 1 LibreOffice document to 1 Wiki Page * Most of the basic formatting such as lists and tables get correctly conve= rted, but the converter introduces an awful lot of ... and
...
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-convers= ion.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 conv= erted) to =3D ... =3D, =3D=3D ... =3D=3D, etc. * Images are not converted: when an image is found, "[[image:|top]]" is ins= erted * I don't know how code snippets will come across in terms of formatting, a= s I don't have the ODT source of the book What does this mean: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 th= e 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://ww= w.unit-conversion.info/texttools/strip-tags/ ** Save as html [2] - to get the images. The bad news is that the images ar= e 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 =3D ... =3D, =3D=3D ... =3D=3D, e= tc.) ** Manually upload the images from [2] ** Add appropriate [[Category:...]] tags at the bottom of each page. At lea= st one for the wiki-book, e.g. [[Category:HelloXenProjectBook]] or somethin= g similar. But of course further categories per topic can be added as neede= d. Once we have all the content, create the common pages such as contents, cre= dits, etc. - and we should have a good starting point. Best Regards Lars =C2=A0=20 =20 _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org https://lists.xen.org/xen-users =20 ------=_Part_6234221_1326007334.1491315927125 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thank you for openSUSE VM and= the libreoffice-wiki-publisher but you must split the .odt file? 


<= div dir=3D"ltr"> On Monday, April 3, 2017 8= :38 AM, Lars Kurth <lars.kurth.xen@gmail.com> wrote:
=


> On 29 Mar 2017, at 05:51, Juergen Gross <jgross@suse.c= om> wrote:
>
> On 28/03/1= 7 21:33, Mike Wright wrote:
>> On 03/28/2017 12:11 = PM, Mohsen wrote:
>>> I'm using LibreOffice 4.3.= 3.2 on Debian amd64 and this version not
>>> hav= e MediaWiki export function!!
>>
>> There was a deb for the libreoffice extension
&= gt;> libreoffice-wiki-publisher.  Give that a try.
>
> In the end you need that only once for the i= nitial conversion. So
> instead of trying to find the = correct package you could just use
> your Xen skills t= o create an openSUSE VM and do it there. :-)

Juergen, thanks for the tip. I installed an openSUSE VM and the libr= eoffice-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 au= thentication on the XenProject wiki side. But File > Export [MediaWiki (= .txt)] works.

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

Here is wh= at I learned:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D
* 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 conver= ter introduces an awful lot of <span style"...">...</span> and = <div style"...">...</div> attributes. Basically it does this ev= ery time, something slightly out of the ordinary has been done with text. T= hese 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 tex= t marked as "Heading 1", "Heading 2", etc. are not converted) to =3D ... = =3D, =3D=3D ... =3D=3D, 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:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D
In principle, this means that sh= ould be doable with 1-2 days worth of work. However it's not going to be en= tirely trivial. What we would need to do is to:
* Break t= he original book ODT file into smaller sections (probably along the chapter= structure as exposed in the Contents)
* Then take each o= f 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/
** S= ave as html [2] - to get the images. The bad news is that the images are sa= ved 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 =3D ... =3D, =3D=3D ... =3D=3D, etc.)
** Manually upload the images from [2]
** A= dd appropriate [[Category:...]] tags at the bottom of each page. At least o= ne for the wiki-book, e.g. [[Category:HelloXenProjectBook]] or something si= milar. But of course further categories per topic can be added as needed.
Once we have all the content, create th= e common pages such as contents, credits, etc. - and we should have a good = starting point.

Best Regards
Lars

 






____= ___________________________________________
Xen-users mai= ling list
Xen-users@lists.xen.o= rg
https://lists.xen.org/xen-users
<= br>
------=_Part_6234221_1326007334.1491315927125-- --===============1172924479156437814== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============1172924479156437814==--