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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-23-2014, 04:35 AM
|
#1
|
LQ Newbie
Registered: Sep 2014
Posts: 13
Rep: 
|
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
|
|
|
09-23-2014, 04:14 PM
|
#2
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,682
|
Quote:
Originally Posted by gordont8
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.
|
|
|
09-26-2014, 11:03 AM
|
#3
|
LQ Newbie
Registered: Sep 2014
Posts: 13
Original Poster
Rep: 
|
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?
|
|
|
09-26-2014, 01:16 PM
|
#4
|
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,688
|
seeing as ".odt" is Libreoffice/openofice format and that libreoffice can read html
use openoffice or libreoffice
|
|
|
09-27-2014, 10:27 AM
|
#5
|
LQ Newbie
Registered: Sep 2014
Posts: 13
Original Poster
Rep: 
|
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.
|
|
|
09-27-2014, 12:50 PM
|
#6
|
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,688
|
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
|
|
|
09-28-2014, 03:25 PM
|
#7
|
LQ Newbie
Registered: Sep 2014
Posts: 13
Original Poster
Rep: 
|
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.
|
|
|
09-28-2014, 04:25 PM
|
#8
|
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,688
|
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
|
|
|
All times are GMT -5. The time now is 03:12 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|