Any script to mix randomly lines?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lucas131
    ¯\_(ツ)_/¯
    • Aug 2004
    • 11475

    #1

    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
    <&(©¿©)&>
    • Jul 2002
    • 47880

    #2
    if you want to invest a few bucks, icq: 33375924
    Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
    Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
    Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

    Comment

    • Quickdraw
      Confirmed User
      • Mar 2004
      • 1717

      #3
      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..
      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
      Last edited by Quickdraw; 02-18-2007, 09:20 AM. Reason: added woj stuff

      Comment

      • SmokeyTheBear
        ►SouthOfHeaven
        • Jun 2004
        • 28609

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

        wont do very many though
        hatisblack at yahoo.com

        Comment

        • lucas131
          ¯\_(ツ)_/¯
          • Aug 2004
          • 11475

          #5
          Originally posted by Quickdraw
          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

          Comment

          • bonkerz2007
            Confirmed User
            • Sep 2005
            • 794

            #6
            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.

            Comment

            • Porko
              SeeMyBucks.com
              • Sep 2002
              • 4014

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

              Comment

              • Porko
                SeeMyBucks.com
                • Sep 2002
                • 4014

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

                Comment

                • jayeff
                  Confirmed User
                  • May 2001
                  • 2944

                  #9
                  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".

                  Comment

                  • HomeFry
                    Confirmed User
                    • Jun 2006
                    • 1062

                    #10
                    Originally posted by lucas131
                    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:
                    Need Mushrooms Designed? Gimme-Website

                    Comment

                    • ucv.karl
                      Confirmed User
                      • Jul 2006
                      • 498

                      #11
                      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
                      It's better when you can Switch.
                      ICQ: 263079754

                      Comment

                      • bonkerz2007
                        Confirmed User
                        • Sep 2005
                        • 794

                        #12
                        Originally posted by Porko
                        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?

                        Comment

                        • u-Bob
                          there's no $$$ in porn
                          • Jul 2005
                          • 33063

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

                          Comment

                          • latinasojourn
                            Confirmed User
                            • Oct 2003
                            • 3191

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

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

                            Comment

                            Working...