GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Dump HTML CSV using CSV? (https://gfy.com/showthread.php?t=1062239)

Colmike9 03-24-2012 11:49 AM

Dump HTML CSV using CSV?
 
Hey :winkwink:

How could I change a CSV and output to another CSV with html?

For example, if I have a csv in this form:
URL|Title|img|descr

But I want to output it like this:
<a href="[URL]" title="[Title]><img src="[img]" /> | [descr]

How could I do this without typing something custom in Java or anything like that?

Thanks
:)

lucas131 03-24-2012 11:52 AM

textpad and macro action, easy to use, learn it once and thank me in future thousand times :)

Colmike9 03-24-2012 11:56 AM

Thanks, I'll give that a try :)

fris 03-24-2012 12:52 PM

Quote:

Originally Posted by Colmike7 (Post 18842443)
Hey :winkwink:

How could I change a CSV and output to another CSV with html?

For example, if I have a csv in this form:
URL|Title|img|descr

But I want to output it like this:
<a href="[URL]" title="[Title]><img src="[img]" /> | [descr]

How could I do this without typing something custom in Java or anything like that?

Thanks
:)

could do it via php

example links.txt

Code:

http://www.google.com|google|http://i.imgur.com/uwti0.jpg|google search engine
php

Code:

<?

$linkfile = dirname(__FILE__). "/links.txt";
$links = file($linkfile);
$result = array();

for ($i=0; $i<count($links); $i++) {
  $link = explode("|", $links[$i]);
  $result[] = '<a href="' . $link[0] . ' title="' . $link[1] . '"><img src="'.$link[2].'"></a> <span>'.trim($link[3]).'</span>';
  echo $result[$i];
}

?>

final output

Code:

[fris@fris ~]$ php test.php
<a href="http://www.google.com title="google"><img src="http://i.imgur.com/uwti0.jpg"></a> <span>google search engine</span>


fris 03-25-2012 02:26 PM

this help any?

just a punk 03-25-2012 02:37 PM

Quote:

Originally Posted by Colmike7 (Post 18842443)
Hey :winkwink:

How could I change a CSV and output to another CSV with html?

For example, if I have a csv in this form:
URL|Title|img|descr

But I want to output it like this:
<a href="[URL]" title="[Title]><img src="[img]" /> | [descr]

How could I do this without typing something custom in Java or anything like that?

Thanks
:)

This free app will do the trick: http://www.fhgstore.com/wmtools.html#FHG2HTML

http://www.fhgstore.com/images/fhg2html.gif

Colmike9 03-25-2012 06:36 PM

Quote:

Originally Posted by fris (Post 18844076)
this help any?

Thanks. It did but CyberSEOs suggestion is exactly what I'm looking for..

Colmike9 03-25-2012 06:36 PM

Quote:

Originally Posted by CyberSEO (Post 18844088)

YES! Thank you! :thumbsup:thumbsup

bns666 03-25-2012 06:43 PM

useful tool :thumbsup

Dirty D 03-25-2012 06:57 PM

Yep, we have used this tool for a few years.
Highly recommended.

just a punk 03-26-2012 01:41 AM

You are welcome!

martinsc 03-26-2012 01:51 AM

Quote:

Originally Posted by CyberSEO (Post 18844088)

nice.... :thumbsup:thumbsup


All times are GMT -7. The time now is 07:01 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123