LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-23-2014, 04:35 AM   #1
gordont8
LQ Newbie
 
Registered: Sep 2014
Posts: 13

Rep: Reputation: Disabled
How to convert files from HTML to .odt


I am using Xubuntu O/S and have a HTML document in Java that I wish to convert to .odt.
I have read about, and downloaded, what I believe to be a conversion program called 'Pandoc' but I don't have a clue how to use it. Would someone kindly give me simple step by step guidance please as I struggle to understand Linux language. I have seen an earlier answer to the same question that just gave a couple of Terminal commands without any explanation as to what you do with the HTML file.
It maybe there is an easier way to make the conversion that I have not heard of.
Thanks
 
Old 09-23-2014, 04:14 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,617

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by gordont8 View Post
I am using Xubuntu O/S and have a HTML document in Java that I wish to convert to .odt.
I have read about, and downloaded, what I believe to be a conversion program called 'Pandoc' but I don't have a clue how to use it. Would someone kindly give me simple step by step guidance please as I struggle to understand Linux language.
We have no idea what you're confused about, so we can't really tell you how to do what you want. The Pandoc documentation has a User Guide...start there:
http://johnmacfarlane.net/pandoc/README.html

...but this really isn't the place to come to get step-by-step guides. If you're having a specific problem/question, we can try to help. What have you done/tried from pandoc?
Quote:
I have seen an earlier answer to the same question that just gave a couple of Terminal commands without any explanation as to what you do with the HTML file.
...and without knowing what earlier question, what the commands are, and what programs they use, there's NO WAY we can even begin to guess.
Quote:
It maybe there is an easier way to make the conversion that I have not heard of.
Sure is...open the HTML document in Open/Libre office, click File->Save As, and select a different file type. Click save.

Last edited by TB0ne; 09-23-2014 at 04:16 PM.
 
Old 09-26-2014, 11:03 AM   #3
gordont8
LQ Newbie
 
Registered: Sep 2014
Posts: 13

Original Poster
Rep: Reputation: Disabled
After making a number of errors on the way I managed to get pandoc up and running by following the johnmacfarlane guide suggested by TBOne. Unfortunately the ODT file it produced was not in a form that was suitable for my use. Could I be try to be more specific about what I am trying to achieve in the hope that someone can help.

There is an excellent free contract bridge scoring program that is designed to work in Windows but not in Linux. However, with much assistance, I have installed the program in Xubuntu but there is one drawback which I will try to explain. When the program produces the results table the players names are right hand justified and the initial letters of the names are lower case in spite of the fact that they are upper case in the players' database. I can have the whole names in caps but cannot alter the justification (if that is the correct terminology) without re-typing practically the whole document. To correct the program is beyond my capabilities.

The program does have an alternative output, perhaps for emailing or for some other use, where the results table is fine except the headings are in very large and very bold script. I want to be able to amend the table and I was hoping to be able to reproduce the table as an amendable document. In this format the results go into a folder titled Java where five files show up for each set of results. Three of the files are in text, one is .css but the main file is .htm.

The .htm file, which carries the results table, opens in firefox or Google Chrome web browsers. If I copy the htm file, on its own, to Documents it will not open. I assume, therefore, that all five files have to be together to work. I changed the htm file to odt in pandoc but the output, as you probably have guessed, was not a duplication of the htm results table in odt format. I now conclude, rightly or wrongly, that playing about with just one of the five files is not going to get me anywhere. Any solutions please?
 
Old 09-26-2014, 01:16 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
seeing as ".odt" is Libreoffice/openofice format and that libreoffice can read html
use openoffice or libreoffice
 
Old 09-27-2014, 10:27 AM   #5
gordont8
LQ Newbie
 
Registered: Sep 2014
Posts: 13

Original Poster
Rep: Reputation: Disabled
If life were only that straightforward John. When I open with AOO no script appears. I ditched libre as i had been using AOO in Windows and was therefore familiar with its workings. I suppose I could reinstall libre but why should one work and not the other. As I said, the documents open just fine in the browsers but, as far as I can observe, there is no way to amend them.
 
Old 09-27-2014, 12:50 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
if all you want is the html code
oo will do that
just open the html file as a text file

HTML is a plain text file
any text editor will read it
 
Old 09-28-2014, 03:25 PM   #7
gordont8
LQ Newbie
 
Registered: Sep 2014
Posts: 13

Original Poster
Rep: Reputation: Disabled
I have no wish to waste your time John or anyone else's but, for one reason or another this particular .htm file will not show up in AOO.

I am not knowledgeable enough to know why this file should behave differently but all I can say is that the file in question comes with four others as I explained earlier. If I remove a couple of the other files the .htm file then fails to open in a web browser. There is clearly a connection between the five files and I can only conclude that the .htm file is dependent on the others to function and, while the connection is retained when using a browser it is lost in AOO.

I use the program only a couple of times a week so it is no big deal for me to make do with the output files as they are. Thank you for your interest anyway.
 
Old 09-28-2014, 04:25 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
did you save the htm file correctly ?

if it is a web page you can not just "save file"
that will not work


what dose the file say if you open it in Gedit or Kate ?

or any normal everyday text editor ( except for MS's "notepad" )

all a "htm" file is is a text file with html code in it
FOR EXAMPLE :
----- the header of THIS page as i type this post ---
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

<meta name="keywords" content="How,convert,files,HTML,odt, How to convert files from HTML to .odt, Linux,how to,tutorial,operating system,linux,red hat,mandrake,security,linux help,installation,question,forum" />
<meta name="description" content="I am using Xubuntu O/S and have a HTML document in Java that I wish to convert to .odt. I have read about, and downloaded, what I believe to be a" />


<!-- CSS Stylesheet -->
<style type="text/css" id="vbulletin_css">
/**
* vBulletin 3.8.8 Beta 1 CSS
* Style: 'LQ Style - child of default'; Style ID: 7
*/
@import url("clientscript/vbulletin_css/style-7eb8640c-00007.css");
</style>
<link rel="stylesheet" type="text/css" href="clientscript/vbulletin_important.css?v=388b1" />


<!-- / CSS Stylesheet -->
that is it
just text
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Libreoffice - how can I convert many odt files to doc or pdf automatically? charlemagne-is-my-son Linux - Software 3 12-10-2012 11:32 AM
[SOLVED] How to convert html to odt or doc using linux command line? zoghbi Linux - Newbie 5 12-26-2011 03:49 AM
What program in Windows to convert ODT files? ToothlessRebel General 13 10-06-2009 11:54 PM
convert odt or .doc into html linuxmandrake Linux - Software 6 02-23-2008 03:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration