Page 4 of 4 FirstFirst 1234
Results 31 to 40 of 40

Thread: HTML Editors

  1. #31
    Guest

    Default Re: HTML Editors


    > I have started using 1st page 2000. The only thing I
    > really dislike about it is the HTML tidy

    Now I can help you with HTML tidy I made a batch file, you right click your HTML file and send to the batch file, it makes three files
    (1) a copy of your work, with line numbers included at the start of the line,
    (2) a copy with corrections
    (3) a list of errors,

    You can send any htm, html, file from any where on the hard drive.
    but I have to send the contents of the batch file tonight as it is not on this computer.

  2. #32
    Guest

    Default Re: HTML Editors

    find /v /n "" %1 > %1_num.txt
    copy %1 "%1_newver.htm"
    tidy.exe -config config.txt -f %1_notes.txt -modify "%1_newver.htm"


    Copy the above lines into a text file then call it somefile.bat
    and put that batch in the same folder as tidy.exe
    then include it on your send-to list
    then you can right click your HTML work and send it to the batch file

  3. #33
    Graham Petrie
    Guest

    Default Re: HTML Editors

    Great! Thanks Eric.

    Now, how do you get the pogram to work with paths that have spaces in them?

    eg my file is E:\Graham's Documents\Flat Website\index.htm

    The find string part works fine, and a file with the line numbers is produced corretcly, but then all hell breaks loose.

    The new version file is not created, and the noes file gives the following errors:
    tidy.exe: can't open file "E:\Graham's"
    tidy.exe: can't open file "Documents\Flat"
    tidy.exe: can't open file "Website\left.htm_newver.htm"


    Something to do with tidy not reading the full path. Works OK if I place the batch file in system32, and then run it from a command window from the directory, but not from send-to. This would be because the send-to makes %1 equal to the whole path and tidy cannot handle this.

    I haven't had a proper look at it yet, but if I think of a solution before you, I will post it.

    G P

  4. #34
    Graham Petrie
    Guest

    Default Re: HTML Editors

    Oh, for this case the file would be left.htm, not index.htm, but I am sure you already worked that out.

    G P

  5. #35
    Graham Petrie
    Guest

    Default Re: HTML Editors

    Got it:

    find /v /n "" %1 > %1_num.txt
    copy %1 %1_newver.htm
    tidy.exe -config config.txt -f %1_notes.txt -modify %1_newver.htm


    (Missing the unneeded quote marks).

    Thanks Eric, I will be using this ALOT! If only I could get the menu item in 1st page to point to the batch file! (This would be where the java version of arachnofilia would be good).

    G P

  6. #36
    Elwin Way
    Guest

    Default Re: HTML Editors

    Graham,

    Stricktly speaking, web addresses should not have spaces in them. Therefore it might be a better idea to use _ instead of space. Keeps the cogs oiled

  7. #37
    Graham Petrie
    Guest

    Default Re: HTML Editors

    Elwin, the path with spaces is only to the "home" directory for my site (ie where I keep it on my HD). Once in that directory, there are no spaces. I could solve the issue by making a separate folder on my HD for webpages, or I could remove the quotes and let the prompt do the rest. :-)

    BTW Eric, I have created a batch file to remove all of the files your batch file creates after I have viewed them (for instance if you want to check heaps of pages in one directory, and then instead of trying to select the pages you want, and then delete them, you can open a command prompt at the location of the files and run the batch file). It gives you the option of deleting all of the files created by your batch file, or the option of deleting them one-by-one with confirmation required. It only targets files that have the naming convention you used in your batch file.

    Copy the following text into a text file. Rename it remtidy.bat and place a copy in your c:\windows\system32 folder. Then open a command prompt at the location you want to use it and type remtidy [enter] to view the online help.

    @echo off
    cls
    if "%1"=="" goto help
    if "%1"=="all" goto all
    if "%1"=="one" goto one
    :help
    echo.
    echo --------------REMTIDY HELP----------------
    echo.
    echo To run remtidy type "remtidy" at the command line
    echo followed by one of two parameters:
    echo.
    echo "all" deletes all files in the current folder created by tidy.
    echo.
    echo "one" deletes the files created by tidy one at a time
    echo requiring confirmation for each file.
    pause
    goto fin
    :all
    del *.htm_*.*
    goto fin
    ne
    del *.htm_*.* /p
    :fin


    Enjoy!

    G P

  8. #38
    E.ric
    Guest

    Default Re: HTML Editors

    How come your batch file is having more children?
    did I write the instructions wrong?

    Let say I have on the D drive a folder;
    D:\html-tidy in the folder is only two files we need
    tidy.exe
    somename.bat

    Then lets say I wish to check a file on the desk top called
    work.html
    buy right clicking and send to somename.bat
    it will make three more files on the desktop
    WORK.HTM_newver.htm
    WORK.HTM_notes.txt
    WORK.HTM_num.txt

    You do not have to work at the "desk top" folder, you can work in any folder and the three extra files will appear in that folder.
    When you are finished fixing out your work (HTML file) you only have three files to delete.

  9. #39
    E.ric
    Guest

    Default Re: HTML Editors

    Wow man, last night it took about 30 minutes to go from HOME page before I could enter my name & password to make a posting, This morning was only about 2 (as normal)

    What I was going add, but last after half an hour just wanted to get it finished and it might of sliped my mind.

    First: If HTML tidy fixes up your work, sometimes it will fix it up wrong, so it validates correct, it does not fix it up how you intented to make it, So I always use the error message so I can fix up the original work myself, then revalidate it until it validates correct without error messages,

    Second: Even when it passes the "HTML tidy" test it still might not pass the www.w3.org validater test. it best to do it with tidy first to reduce most errors this saves online time.



  10. #40
    Graham Petrie
    Guest

    Default Re: HTML Editors

    Eric,

    Clarification:

    Your batch didn't work with the quotation marks, so I removed tham, and it works sweet in any folder. ie just as you described above.

    My new batch is for when you have "tidied" a series of documents and you wish to remove all (or some) of the files that have been created.

    Thanks alot for the batch.

    Sorry to have confused you.

    Cheers
    G P

Similar Threads

  1. Web Page Editors
    By tirikatene in forum PressF1
    Replies: 8
    Last Post: 26-07-2005, 11:57 AM
  2. HTML editors
    By forrest44 in forum PressF1
    Replies: 15
    Last Post: 04-02-2004, 12:51 PM
  3. Web Editors
    By GeoffW in forum PressF1
    Replies: 7
    Last Post: 03-07-2002, 06:58 PM
  4. HTML text editors
    By in forum PressF1
    Replies: 6
    Last Post: 15-02-2002, 11:59 PM
  5. Map Editors
    By in forum PressF1
    Replies: 1
    Last Post: 17-12-2001, 11:30 AM

Posting Permissions

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