Received Wed, 21 Dec 2005 18:02:09 PHT
Howto create a Yahoo sitemap out of a Google sitemap using grep - Convert your xml Google sitemap into a Yahoo sitemap
Yahoo wants a text file - one URL per line - hence you submit to Yahoo a converted Google sitemap by following the below easy 3 steps
An easy way to convert a regular Google sitemap into a regular Yahoo sitemap in 3 steps using grep and a simple text editor
cd to directory of Google sitemap sitemap.xml
then in bash or your preferred shell enter as
1st step - all ONE line:
grep "<loc>" sitemap.xml > sitemap.txt
this creates a text file of all lines containing a URL with the loc tag around
in a text editor now - using search end replace function of your editor
- follow the next 2 final steps:
2nd step search and replace the begin loc tag and replace with nothing at all
3rd step search end replace the loc container tag and replace with nothing at all
save and upload
make sure on your domain/index page you have a link to this sitemap to allow any search engine to find the txt file-based sitemap
you have now a regular text file with one URL per line
provided that all your URLs in the Google sitemap or correct of course
a final tip:
if you have this text format sitemap open in your editor
scroll down the page to see if you have any totally wrong URLs resulting from browser or other bugs - i do have usually 1 or a few that by pass the exclude URL list you may then add this wrong URL to the URL-exclude list of your Google sitemap tool if you have such an URL-exclude list.
there would of course be very simple professional ways to automate such process each time you create a regular daily Google sitemap - until the need for this additional feature has been filled by any existing sitemap tool - this method is better than no Yahoo sitemap at all !
there surely may be many others ways - this above is but one simple method easy for all users on a professional Linux system
enjoy
hans
An easy way to convert a regular Google sitemap into a regular Yahoo sitemap in 3 steps using grep and a simple text editor
cd to directory of Google sitemap sitemap.xml
then in bash or your preferred shell enter as
1st step - all ONE line:
grep "<loc>" sitemap.xml > sitemap.txt
this creates a text file of all lines containing a URL with the loc tag around
in a text editor now - using search end replace function of your editor
- follow the next 2 final steps:
2nd step search and replace the begin loc tag and replace with nothing at all
3rd step search end replace the loc container tag and replace with nothing at all
save and upload
make sure on your domain/index page you have a link to this sitemap to allow any search engine to find the txt file-based sitemap
you have now a regular text file with one URL per line
provided that all your URLs in the Google sitemap or correct of course
a final tip:
if you have this text format sitemap open in your editor
scroll down the page to see if you have any totally wrong URLs resulting from browser or other bugs - i do have usually 1 or a few that by pass the exclude URL list you may then add this wrong URL to the URL-exclude list of your Google sitemap tool if you have such an URL-exclude list.
there would of course be very simple professional ways to automate such process each time you create a regular daily Google sitemap - until the need for this additional feature has been filled by any existing sitemap tool - this method is better than no Yahoo sitemap at all !
there surely may be many others ways - this above is but one simple method easy for all users on a professional Linux system
enjoy
hans






