how to convert text url to anchor text setup?

by 14 replies
18
Say I have a bunch of url's in plain text.profile urls....
What kind of tool is there that I can copy/paste them all into a box or something and have it convert them all into an <a href etc anchor text html setup?
No way I can do this one at a time,but would like to post them on various indexing blogs.
Thanks
#programming #anchor #convert #setup #text #url
  • Just a thought, but if you sent them to yourself via email, preferably a web based account like gmail, then doesn't it convert that into links when the viewer (in this case you) sees it? Then all you need to do is view source and copy the links.. Haven't tried it but it could work....

    If you don't come right, PM me, I'll write you a little program to do it, no charge!

    John
    • [ 1 ] Thanks
  • Thats actually a brilliant idea,but I just tried it and it doesnt seem to have any of the links in the page source info.Strange,tried the same thing posting to a blog that auto hyperlinks url's.Nothing metnioned in page source of all those url's...strange.
    Dropping you a pm,appreciate it.
  • Not sure why, but I just tested in Outlook Express and was able to view the converted anchor tags through the source.
  • hmmm..dunno why gmail wouldnt do it.
    ill try yahoo and some other services as id rather not add outlook if i dont have to
    appreciate the heads up
    • [1] reply
    • You can use find/replace feature, and use wildcards in an html editor.

      The wildcards would depend on the program you use,

      Also you can use features like add before/after.

      That's your best bet.

      I do it all the time.
  • hey bud,thanks
    i actually did think about the find/replace in a text document as i use that for other stuff all the time. but with a link,there isnt anything there to replace with the code.
    so how would that work?
    appreciate the help
    • [1] reply
    • Ok, as promised, I did come up with a little program to convert the links.

      It takes a text file that has one link per line.

      You can start the program in several ways (its a console program):
      1) Just start it and it will ask you to type in the full path and name of the file (unless the file is in the same directory, then name alone should be fine)
      2) You can start the program from a dos prompt followed by the name of the file in quotes, eg, c:\>UrlToAnchor.exe "C:\Folder 1\Folder 2\test.txt"
      3) Easiest method is open the folder that has this exe, then in a different folder open the folder with your text file, then just drag the text file onto the program.

      It will ask you 3 questions. These are related to what you want the resultant anchor text to look like:

      1) do you want a title tag? If 'y' then it will place the title="eee" into the tag, using the domain name as the title
      2) Do you want to use the title tag as the link text? If 'y' then the title tag is the link text, ie, what the user sees and clicks on
      3) Do you want the links to open in a new window? If 'y' it adds the target="_new". This is nice if you are placing these links on your own site but you don't want people to go out of your site.


      Ok, here is the disclaimer...

      1) I am giving this away for free, so there are no guarantees. However, if you need help or you want a feature added, mail me, I'd be more than happy to help. My time is very limited however so you may have to wait.

      2) I know that its scary using free software from someone you don't know, so I'll make this opensource. You can download the program and run it, or you can download the source and check it out, modify it then compile it yourself. Although I haven't test this on Linux yet, I do try to stick to ANSI C++, so this should compile on both (Please mail me if you want me to compile a Linux version.

      3) I am using a compiler I have never used before, so if you use this and it doesn't run, please send me a message immediately so I can sort it out

      That's it folk. The download URL is:

      Note: I don't have enough posts to put in a URL, so please go to the link in my sig (the softsmart one), click on resources, then blog, then search for URLToAnchor

      What do I ask in return? If you want to make a comment on the blog, make it nice! If you do download the source and modify it (or post it on your own website), please respect 2 things:

      1) Please post back to my blog to let us all benefit from the mods
      2) Please keep my title info at the top of the source file (its only one file). You can add yours below!

      John
  • I've used a text editor to do this, it can be easily done using macros. You just set your macro to record, manually go through the process of converting the first link, and then finish at the beginning of the second line. You then stop the recording and save the macro. Once you have it saved you can run it until the end of the list.

    With the macro saved you can repeat the process any time in the future. Any decent text editor can do this, I've done it with both PS Pad and UltraEdit.

    BTW, I think the "email it to yourself" idea is brilliant in its simplicity, not sure why it wouldn't work for you. It seems to me that MS Word also (sometimes annoyingly) converts URLs to hyperlinks.

    Bill
    • [1] reply
    • This can also be easily be done using Microsoft Excel, Openoffice Calc, and probably most other spreadsheet programs.

      Or, it can be done with PHP like this:

      Well, nevermind, I tried to post some code here, but the forum reports a parsing error when I click submit so I put it up at Convert URL's to links
      • [1] reply
  • If you want I could make a PHP script for you to turn these into HTML links
  • Banned
    [DELETED]
    • [1] reply
    • Please read the original question again.
  • Banned
    [DELETED]
  • You can use wildcards in an HTML editor. It is also possible to create PHP scripts that turn the text into the HTML links. You can search for this on the internet.

Next Topics on Trending Feed

  • 18

    Say I have a bunch of url's in plain text.profile urls.... What kind of tool is there that I can copy/paste them all into a box or something and have it convert them all into an <a href etc anchor text html setup? No way I can do this one at a time,but would like to post them on various indexing blogs.