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)
-   -   Any script to mix randomly lines? (https://gfy.com/showthread.php?t=707438)

lucas131 02-18-2007 11:05 AM

Any script to mix randomly lines?
 
Have some list o fhg and would like to mix it to random all lines. How to do it in excel or any other tool?

woj 02-18-2007 11:14 AM

if you want to invest a few bucks, icq: 33375924 :)

Quickdraw 02-18-2007 11:18 AM

Here is a php script to do it. Jace asked for a similar one some time ago, it might work for you. It outputs to the screen vs. saving another file, so copy/paste will be your friend :)
You can also remove the <br> in the echo statement and just save the output if that works better.
PHP Code:

<?php 
$file 
file("urls.txt"); 

// Strips dupes if you need, comment out if you do not need this 
$temp array_unique($file); 

//Shuffles the deck or randomizes :) 
shuffle($temp); 
//Prints each line  
foreach($temp as $value
   { 
   echo 
"$value<br>"
   } 
exit; 
?>

or,
Potter posted a way to do it in Excel or OpenOffice..
Quote:

You can also use open office. Paste all the items into a spreadsheet, then paste the random number char code into the column next to the urls, then sort by numbered column, copy the column with the urls and you're done.
Sorry Woj, you hadn't posted yet when I started..
I imagine Woj can do a lot better than this anyway, definitely worth looking into

SmokeyTheBear 02-18-2007 11:38 AM

http://blog.webspacemania.com/0fhg/

wont do very many though

lucas131 02-18-2007 12:13 PM

Quote:

Originally Posted by Quickdraw (Post 11937265)
Here is a php script to do it. Jace asked for a similar one some time ago, it might work for you. It outputs to the screen vs. saving another file, so copy/paste will be your friend :)
You can also remove the <br> in the echo statement and just save the output if that works better.
PHP Code:

<?php 
$file 
file("urls.txt"); 

// Strips dupes if you need, comment out if you do not need this 
$temp array_unique($file); 

//Shuffles the deck or randomizes :) 
shuffle($temp); 
//Prints each line  
foreach($temp as $value
   { 
   echo 
"$value<br>"
   } 
exit; 
?>

or,
Potter posted a way to do it in Excel or OpenOffice..

Sorry Woj, you hadn't posted yet when I started..
I imagine Woj can do a lot better than this anyway, definitely worth looking into

Thanks :)

bonkerz2007 02-18-2007 04:05 PM

FHG2HTML v.1.2.1
 
Here's a desktop tool:


FHG2HTML v.1.2.1


Import a list of your galleries and check the random button. It outputs html links.

Porko 02-18-2007 04:13 PM

thanks for that !!
http://www.fhgstore.com/wmtools.html

Porko 02-18-2007 04:17 PM

Do you know a software to extract urls from a text mixed with urls in a txt?

jayeff 02-18-2007 04:23 PM

This is similar to at least one above, but it will allow you to specify how many links to show from the main list. In this example, 0 through 24 = 25:
Code:

<?php
$links=file("http://yourdomain.com/yourfile.html");
shuffle($links);
$output = array_slice($links, 0, 24);
foreach ($output as $a) {
    echo $a;
}
?>

You do not need to put a full URL in for the file, but I use this code on several sites to generate random lists from a single "master".

HomeFry 02-18-2007 04:31 PM

Quote:

Originally Posted by lucas131 (Post 11937234)
Have some list o fhg and would like to mix it to random all lines. How to do it in excel or any other tool?

Here's a tool for stractings teh randomly lines from TGPs and FHGs:
http://my.opera.com/zerog/homes/blog/suicide_gun.jpg

ucv.karl 02-18-2007 04:45 PM

I am not sure how PHP became the de facto language for all tasks, but here is alternative solution using Ruby.

Code:

data=IO.readlines('urls.txt')

new_data=data.sort_by {rand}

output=File.open('output.txt','w')

new_data.each do |line|
        output.puts line
end

output.close


bonkerz2007 02-18-2007 05:44 PM

Quote:

Originally Posted by Porko (Post 11938351)
Do you know a software to extract urls from a text mixed with urls in a txt?


Depends ... if you're talking about a .csv file you can use Excel. How is the text file structured?

u-Bob 02-18-2007 06:31 PM

Code:

$n = @fhglist;
foreach (reverse 0..$n) {
my $draw = splice(@fhglist, rand $n, 1);
push @fhglist, $draw;
}


latinasojourn 02-18-2007 07:26 PM

free utility that will randomize lines, called "the hat":

http://www.harmonyhollow.net/hat.shtml


All times are GMT -7. The time now is 10:14 PM.

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