in reply to A Tagcloud For Cory Doctorow

where does the file with your notes go?

Replies are listed 'Best First'.
Re^2: A Tagcloud For Cory Doctorow
by rhenley (Initiate) on May 10, 2009 at 16:35 UTC
    It's probably simplest to put your notes file wherever you have your Perl script (or your Perl script wherever you have your notes file...however you want to think of it). You have to specify the name of your notes file when you run the Perl script. I use Windows, so at the command prompt I type 'perl tagcloud.pl notes.txt'. If you want to put your notes file in one place and your script in another, just type the full path to your notes file on the command line (for example, 'perl tagcloud.pl c:\notes\notes.txt').
      is the syntax the same for a file on a server?
        If you're using Windows, you can either map a drive to the server or use a UNC path. For example, if you mapped \\servername\sharename to f:, you could use f:\notes\notes.txt, or if you wanted to use the UNC path instead, use \\servername\sharename\notes\notes.txt. Either should work as long as you have the proper permissions on the server.
      thanks so much.
Re^2: A Tagcloud For Cory Doctorow
by Anonymous Monk on May 11, 2009 at 02:33 UTC
    Can anyone explain how to run this on a Mac?
      To start with, you have to make sure your perl installation supports the modules that the scripts uses.
      I'm doing this from Windows but in theory it should be the same for Mac.

      - Open a terminal session.
      - Run:
      ppm list
      - This will show you all of the modules that are installed.
      - If any of:
      HTML::TagCloud
      HTML::Entities
      HTTP::Server::Simple::CGI

      are missing use the command:

      ppm install <module_name_from_above>

      to install the module.

      - HTTP::Server::Simple::CGI doesn't seem to be available via ppm - I guess because it is still developmental. I had to download direct from cpan and manually install.*

      Then, when all installed quite simply:
      perl -w tagcloud.pl notes.txt


      * Manual HTTP::Server::Simple::CGI install.
      - Download from: http://search.cpan.org/dist/HTTP-Server-Simple/lib/HTTP/Server/Simple/CGI.pm
      perl Makefile.PL
      make
      make install


        I'm doing this from Windows but in theory it should be the same for Mac.
        Er... only if you've installed ActiveState's Perl on your Mac. But no worries - Mac OS X, being a Unix, comes with a native Perl install. (Which, incidentally, is what I developed the script on.)

        I've used Platypus to create an OS X application of the script, which bundles the dependent modules in the app. You can download it here at my cell. I changed the script slightly to specify the notes file via the web interface.

        I've been poking at this for a day now and am still struggling, so any further help would be appreciated.

        I don't see HTML::Entities in my ppm list output, but when I run ppm install HTML::Entities, I get "No missing packages to install". ppm install worked for HTML::TagCloud, so I have reason to think I'm doing that much right, but HTML::Entities continues to not show up. Is there a ppm configuration I need to set that determines the packages I see?

        My Perl installation seems faulty somehow, however, as running perl Makefile.PL tells me Install.pm can't be located, and indeed, it doesn't appear in any of the likely locations ("/usr/local/ActivePerl-5.10/lib/Module/" was the closest I got, but it's not there, nor in any of the other locations perl is trying to find it). I have hunted around for better info on this error, but haven't found anything either on the ActivePerl forums or Perl.org, or perlmonks itself, or any of the other likely sites.

        I love this idea and would get a lot of use out of it, but I think it's just beyond my technical grasp. Any help would be greatly appreciated. Thanks!