Subversion Repositories SmartDukaan

Rev

Rev 5346 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package in.shop2020.util;

public class MostComparedIndexGenerator {
        private String[] indentation = {"", "    ", "        ", "            ","                "};
        
        public void generate()  {
                StringBuilder sb = new StringBuilder();
                
                sb.append(indentation[1] + "<div>\n");
                sb.append(indentation[2] + "<a href='http://www.saholic.com/compare-mobile-phones?p1=1002160&amp;p2=1000541'>Samsung Galaxy Y S5360 vs Samsung Galaxy Pop S5570</a>\n");
                sb.append(indentation[1] + "</div>\n");
                
                sb.append(indentation[1] + "<div>\n");
                sb.append(indentation[2] + "<a href='http://www.saholic.com/compare-mobile-phones?p1=1002151&amp;p2=1002160'>Samsung Galaxy Y S5360 Vs HTC Explorer (Pico) A310e</a>\n");
                sb.append(indentation[1] + "</div>\n");
                
                sb.append(indentation[1] + "<div>\n");
                sb.append(indentation[2] + "<a href='http://www.saholic.com/compare-mobile-phones?p1=1002444&amp;p2=1002153'>Samsung Galaxy Y S5360 Vs Nokia 500</a>\n");
                sb.append(indentation[1] + "</div>\n");
                
                sb.append(indentation[1] + "<div>\n");
                sb.append(indentation[2] + "<a href='http://www.saholic.com/compare-mobile-phones?p1=1000483&amp;p2=1002444'>Spice Mi-270 Vs Samsung Galaxy Y Color</a>\n");
                sb.append(indentation[1] + "</div>\n");
                
                sb.append(indentation[1] + "<div>\n");
                sb.append(indentation[2] + "<a href='http://www.saholic.com/compare-mobile-phones?p1=1001224&amp;p2=1002467'>Spice Mi-310 Vs Spice Mi-280</a>\n");
                sb.append(indentation[1] + "</div>\n");
                
                sb.append(indentation[1] + "<div>\n");
                sb.append(indentation[2] + "<a href='http://www.saholic.com/compare-mobile-phones?p1=1000483&amp;p2=1002467'>Spice Mi-270 Vs Spice Mi-280</a>\n");
                sb.append(indentation[1] + "</div>\n");
                
                sb.append(indentation[1] + "<div>\n");
                sb.append(indentation[2] + "<a href='http://www.saholic.com/compare-mobile-phones?p1=1002467&amp;p2=1000483'>Spice Mi-280 Vs Spice Mi-270</a>\n");
                sb.append(indentation[1] + "</div>\n");
                
                sb.append(indentation[1] + "<div>\n");
                sb.append(indentation[2] + "<a href='http://www.saholic.com/compare-mobile-phones?p1=1002575&amp;p2=1002444'>Samsung Galaxy Y Duos S6102 Vs Samsung Galaxy Y Color S5360s</a>\n");
                sb.append(indentation[1] + "</div>\n");
                
                sb.append(indentation[1] + "<div>\n");
                sb.append(indentation[2] + "<a href='http://www.saholic.com/compare-mobile-phones?p1=1001224&amp;p2=1000483'>Spice Mi-310 Vs Spice Mi-270</a>\n");
                sb.append(indentation[1] + "</div>\n");
                
                sb.append(indentation[1] + "<div>\n");
                sb.append(indentation[2] + "<a href='http://www.saholic.com/compare-mobile-phones?p1=1000483&amp;p2=1000357'>Spice Mi-270 Vs Micromax Andro A60</a>\n");
                sb.append(indentation[1] + "</div>\n");
                
                sb.append(indentation[1] + "<div>\n");
                sb.append(indentation[2] + "<a href='http://www.saholic.com/compare-mobile-phones?p1=1000483&amp;p2=1002124'>Spice Mi-270 Vs Karbonn A 1</a>\n");
                sb.append(indentation[1] + "</div>\n");
                
                sb.append(indentation[1] + "<div>\n");
                sb.append(indentation[2] + "<a href='http://www.saholic.com/compare-mobile-phones?p1=1002575&amp;p2=1002160'>Samsung Galaxy Y Duos S6102 Vs Samsung Galaxy Y S5360</a>\n");
                sb.append(indentation[1] + "</div>\n");

                String indexFilename = Utils.EXPORT_PARTNERS_CONTENT_PATH + "most-compared-index.html";
                
                try     {
                        DBUtils.store(sb.toString(), indexFilename);
                        
                } catch (Exception e) {
                        e.printStackTrace();
                }
        }

        public static void main(String[] args) {
                MostComparedIndexGenerator g = new MostComparedIndexGenerator();
                g.generate();
        }
}