Is There Any Tool That Can Do This?

LOL-Blaster

Regular Member
Joined
Aug 29, 2012
Messages
342
Reaction score
711
So I have an csv file that looks like this:
[TABLE="width: 500"]
[TR]
[TD]url1[/TD]
[TD]kw1[/TD]
[/TR]
[TR]
[TD]url2[/TD]
[TD]kw2[/TD]
[/TR]
[TR]
[TD]url3[/TD]
[TD]kw3[/TD]
[/TR]
[/TABLE]

Is there a tool that can take the data and generate list of hyperlinks like this:

<a href="url1">kw1</a>SPACE<a href="url1">kw2</a>SPACE<a href="url2">kw1</a>...

For those who aren't aware, that's 3x3=9 combinations

Can I do it with excel?
 
Last edited:
I don't know of a specific tool, but I can do this for you. Just send me a PM.
 
Never heard of such tool.... I think you will have to do it manually...
 
Oh oops..I'm sure you can this in excel with functions.. but can't help you there. :(

You can check out some excel function tutorials.. Im sure youll find a way.
 
You can do it easily by PHP. I have coded this for you. You need to place your csv file in the same folder (named data.csv .. change it if necessary)
<?php
//variables
$filename = "data.csv"; // the file must stay in the same folder where the script is
$folder = dirname(__FILE__);
$data = $string = NULL;
// read the file
$fp = @fopen($folder."/".$filename, "r");
if(empty($fp))
throw new Exception("file could not be read");
//write string
while($data = fgetcsv($fp)){
$string .= "<a href=\"{$data[1]}\">{$data[0]}</a> ";
}
// print result
echo htmlentities($string);
 
i think You are trying to mix keywords and urls
You could do this in python yourself
Code:
urls = {r'http://xyz', r'http://xyz' , r'http://xyz'}
keywords = {'key1','key2','key3','key4'}
htmllist=[]
for url in urls :
     for keyword in keywords :
             ahref = r'[COLOR=#FFFFCC]<a href="[/COLOR]'+url+r'[COLOR=#FFFFCC]">'+keyword+r'[/COLOR][COLOR=#FFFFCC]</a>[/COLOR][COLOR=#FFFFCC]'[/COLOR]
            htmllist.append(ahref)

there might be few bugs , just wrote it off my mind
 
For a online tool. check out,

Link Coder: Generate HTML/BB/Wiki Link Code From Keywords
http://www.ubertoolz.com/demo/LinkCoder.php
 
The Excel process can be semi-automated easily, but explaining it here to make it easy for you will take some time.

So if you trust me, and allow to do it for you, you may send me the text file of your URLs and KWs, and I can complete the process and send you the entire Excel file. If so, PM me the download link of that file.... :)

You may tell me only the exact number of URLs and KWs in the file too instead of giving me the data.... then you may replace placeholders with the required data at your end.
 
Last edited:
With a bit of regex and notepad++ it's easily doable.
 
Code:
http://www.sendspace.com/file/6c5ncz

Code:
https://www.virustotal.com/en/file/d3a480670aeeea52c387e67f63bec38ba6d0c35b096aca93773a3ee1a29fe4f5/analysis/1369475716/

Coded this up for you in WinAutomation. All you have to do is save your file out of Excel as a .csv, run 'lol-blaster.exe', select the exported .csv and it will output a text file in the same location with the data like you specified. I've included a sample .csv file to show you how it works, and the .waj file in case you want to load it up in WA and see what it does.

HTH
ND
 
Code:
http://www.sendspace.com/file/6c5ncz

Code:
https://www.virustotal.com/en/file/d3a480670aeeea52c387e67f63bec38ba6d0c35b096aca93773a3ee1a29fe4f5/analysis/1369475716/

Coded this up for you in WinAutomation. All you have to do is save your file out of Excel as a .csv, run 'lol-blaster.exe', select the exported .csv and it will output a text file in the same location with the data like you specified. I've included a sample .csv file to show you how it works, and the .waj file in case you want to load it up in WA and see what it does.

HTH
ND

Ah, that's not what I want. I need a bot to make 3x3 combination of the hyperlink
 
I'm not sure about this one, but TextMechanic.com has a lot of similar tools. I use them all the time. They have permutation generators, randomizers, text combiners etc. Check it out, maybe you'll find what you need.
 
Last edited:
I'm not sure about this one, but TextMechanic.com has a lot of similiar tools. I use them all the time. They have permutation generators, randomizers, text combiners etc. Check it out, maybe you'll find what you need.

Yes, but they limit the number of input to 20 lines.
That's why I want to know how to do it by myself.
 
Last edited:
use =CONCATENATE
 
You can do it easily by PHP. I have coded this for you. You need to place your csv file in the same folder (named data.csv .. change it if necessary)

Not what I am looking for either. I need 3x3=9 combinations of the link.
 
LOL sorry I also misunderstood your question! I have recoded the PHP script for generating combinations


Ah, that's not what I want. I need a bot to make 3x3 combination of the hyperlink

Code:
<?php 
//vars
$filename = "data.csv"; // the file must stay in the same folder where the script is
$folder = dirname(__FILE__);
$data =  $array = $string = NULL;

//function

function array_cartesian() {
    $_ = func_get_args();
    if(count($_) == 0)
        return array(array());
    $a = array_shift($_);
    $c = call_user_func_array(__FUNCTION__, $_);
    $r = array();
    foreach($a as $v)
        foreach($c as $p)
            $r[] = array_merge(array($v), $p);
    return $r;
}

// read the file
$fp = @fopen($folder."/".$filename, "r");
if(empty($fp))
    throw new Exception("file could not be read");
//read from csv
while($data = fgetcsv($fp)){
    $array['url'][] = $data[0];
    $array['anchor'][] = $data[1];
}

$array_new = array_cartesian($array['url'] ,$array['anchor'] );
//print_r($array_new);

foreach($array_new as $new){
    $string .= "<a href=\"{$new[1]}\">{$new[0]}</a>  ";
}


// print result
echo htmlentities($string);
data.csv should be formatted as
Code:
name1,url1
name2,url2
name3,url3
name4,url4
name5,url5
 
LOL sorry I also misunderstood your question! I have recoded the PHP script for generating combinations




Code:
<?php 
//vars
$filename = "data.csv"; // the file must stay in the same folder where the script is
$folder = dirname(__FILE__);
$data =  $array = $string = NULL;

//function

function array_cartesian() {
    $_ = func_get_args();
    if(count($_) == 0)
        return array(array());
    $a = array_shift($_);
    $c = call_user_func_array(__FUNCTION__, $_);
    $r = array();
    foreach($a as $v)
        foreach($c as $p)
            $r[] = array_merge(array($v), $p);
    return $r;
}

// read the file
$fp = @fopen($folder."/".$filename, "r");
if(empty($fp))
    throw new Exception("file could not be read");
//read from csv
while($data = fgetcsv($fp)){
    $array['url'][] = $data[0];
    $array['anchor'][] = $data[1];
}

$array_new = array_cartesian($array['url'] ,$array['anchor'] );
//print_r($array_new);

foreach($array_new as $new){
    $string .= "<a href=\"{$new[1]}\">{$new[0]}</a>  ";
}


// print result
echo htmlentities($string);
data.csv should be formatted as
Code:
name1,url1
name2,url2
name3,url3
name4,url4
name5,url5

Can you make it so that blank values are ignored?
The number of urls does not always equal the number of keywords
 
Code:
<?php 
//vars
$filename = "data.csv"; // the file must stay in the same folder where the script is
$folder = dirname(__FILE__);
$data =  $array = $string = NULL;

//function

function array_cartesian() {
    $_ = func_get_args();
    if(count($_) == 0)
        return array(array());
    $a = array_shift($_);
    $c = call_user_func_array(__FUNCTION__, $_);
    $r = array();
    foreach($a as $v)
        foreach($c as $p)
            $r[] = array_merge(array($v), $p);
    return $r;
}

// read the file
$fp = @fopen($folder."/".$filename, "r");
if(empty($fp))
    throw new Exception("file could not be read");
//read from csv
while($data = fgetcsv($fp)){
    $array['url'][] = $data[0];
    $array['anchor'][] = $data[1];
}

$array_new = array_cartesian($array['url'] ,$array['anchor'] );
//print_r($array_new);

foreach($array_new as $new){
    $n0 = trim($new[1]);
    $n1 = trim($new[0]);
    if(!empty($n0) && !empty($n1) )
    $string .= "<a href=\"{$new[1]}\">{$new[0]}</a>  ";
}


// print result
echo htmlentities($string);

Can you make it so that blank values are ignored?
The number of urls does not always equal the number of keywords
 
Back
Top