Advanced Search

Results 1 to 6 of 6

Thread: html converter besides MS word?

  1. #1
    Join Date
    Dec 2009
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default html converter besides MS word?

    ive got a resume web site and i want to let my viewers click on a link to a particular code sample of mine to read. ive got .as files, .cpp files, .h files, .js files, ,php files, u name it, but they're all just text. now i tried just linking the user to the unaltered file and that was buggy, and i also tried pasting the code into MS word and saving it as an html file, but that was buggy too, they couldn't get the indents right. is there some software out there that converts text files into readable html with all the indenting done correctly?

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    There are tools out there that will convert code to HTML and vice versa, but none that I have ever seen that will do all of them. You will have to look up each individual one and do the conversions, then find the next one, and so on.

    Unless someone else has seen an all in one converter.

    here is a list to help get some started
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,154
    Thanks
    260
    Thanked 690 Times in 678 Posts

    Default

    If you are just trying to format text from a text file into html code, there's very little that you need to convert. Basically line breaks and paragraphs. In order to get tabs to work, though, that's harder. Tabs in html are ignored, so you need to insert   (a non-breaking space-- a space that acts like a 'content' letter in a word) repeatedly, such as 5 times in a row:      .
    That's a VERY VERY messy way to do it, so I don't really recommend it. The better way is to use CSS formatting to set an indent for the paragraphs (as the style). But that's a little more complex-- I'm not sure if you want to get into all that quite yet. But you can, and it's a good idea.


    If you want an easy cut and paste method for this, then find any WYSIWYG editor (what you see is what you get). Examples include Dreamweaver, Frontpage, etc. And there are lots of free ones out there. Basically open it up in design mode (or 'preview' mode) and NOT 'code' mode/view. Then just paste your text and it'll format it. Save the .htm and you're done.


    There are also ways to do this dynamically with PHP (and other languages) if you'd like an automated system, but of course that's much more complex.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #4
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    That works for the HTML Daniel, but the OP said they have multiple formats. The way I read it they want to take a page that is currently written in PHP, one in AS, one in JS, one in CSS, etc and convert all of them to HTML keeping the original formatting, so someone can view the HTML, copy and paste and save as extension "whatever", and have it be formatted with line breaks and spacing, etc already done.

    I could have read it wrong though.
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,154
    Thanks
    260
    Thanked 690 Times in 678 Posts

    Default

    All of the formats are .txt "plain text" files essentially. If the idea is to DISPLAY the source code within html, it should be the same process. If not, then I read the question wrong too.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #6
    Join Date
    Dec 2009
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks, ill try dreamweaver

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •