Jump to:

328 Posts in 212 Topics by 160 members

Migrating a Site to Silverstripe

SilverStripe Forums » Migrating a Site to Silverstripe » CSVBulkLoader

What you need to know when migrating your existing site to SilverStripe.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 4998 Views
  • Yakiv
    Avatar
    Community Member
    59 Posts

    Re: CSVBulkLoader Link to this post

    Though no one is responding here, I noticed that the StaticImporter plugin was massively upgraded yesterday (I am downloading from SVN). Wow! I am checking it out now, on a local install. ...I see some logical steps here now and something about wget. Ironically, I just came across wget yesterday too, before I saw it here in the plugin! It must have been meant to be!

    Hope the documentation starts to churn out too! Thanks to the developer on the work!

  • Yakiv
    Avatar
    Community Member
    59 Posts

    Re: CSVBulkLoader Link to this post

    I am using XAMPP on a Windows Vista 32 Bit machine, with a local install of SilverStripe. I even have the virtual machine set-up, so that I access my SilverStripe at http://silverstripe.loc/ . Pretty cool, eh? My own SilverStripe (local) domain!

    I just downloaded Wget 1.11.4-1 from the following:

    http://gnuwin32.sourceforge.net/packages/wget.htm

    It installs (by default) in the following directory:

    C:\Program Files\GnuWin32

    At the following:

    http://silverstripe.loc/StaticImporter/

    I see:

    Step 1
    Download

    And then I see:

    Site URL: http://

    However, this does not appear to be a real field to enter the domain.

    Then I see the button:

    Download site using wget

    But when I press the button, I get the following error message:

    Website Error
    There has been an error
    The website server has not been able to respond to your request

    I am hoping someone knowledgeable about StaticImporter will respond. Maybe the developer?

  • Yakiv
    Avatar
    Community Member
    59 Posts

    Re: CSVBulkLoader Link to this post

    I am looking at the following code in /staticimporter/code/StaticImporter.php:

       // STEP 1

       /**
        * Downloads a website using wget.
        */
       function doDownload() {
          $url = self::$url;
          if(!$url) {
             trigger_error('StaticImporter URL was not set.', E_USER_ERROR);
          }
          
          // Create the accepted extensions argument to pass to wget
          $accepted = array();
          foreach(self::$allowed_extensions as $extension) {
             $accepted[] = "*.$extension";
          }
          $acceptedTxt = implode(',', $accepted);
          
          if(!file_exists('../assets/staticimport')) {
             mkdir('../assets/staticimport');
          
             $command = "wget -r -nH --directory-prefix=../assets/staticimport -A "
                . escapeshellarg($acceptedTxt) . ' ' . escapeshellarg($url);
             echo "<p>Running $command</p>";
             exec($command);
          
             echo "<p><b>Done!</b></p>";
          } else {
             echo '<p><b>Site already downloaded.</b></p>';
          }
       }

    I see the command for wget. I am able to use wget my self, with command line. I have successfully downloaded and processed a couple sites using the regular windows Command Prompt. However, I want to use the StaticImporter as it is intended. So, I am wondering, is there a config setting in the plugin, so that it knows where the local wget is?

    In my case, I have two installations of wget now:

    C:\Program Files\GnuWin32\bin\

    C:\Wget\

    The first was with the Windows installer version (already mentioned) and the second was with the standard version here:

    http://www.christopherlewis.com/WGet/WGetFiles.htm

  • Yakiv
    Avatar
    Community Member
    59 Posts

    Re: CSVBulkLoader Link to this post

    It's been 10 days since I last posted and again no one is responding. ...Hoping someone will take interest in this thread. Hoping the developer (sminnee? or aoneil?) of StaticImporter will keep enhancing the module. No updates since July 22nd (and it is presently August 2nd) and no posts here either. Here is the page on the wiki, where documentation should be:

    http://doc.silverstripe.com/doku.php?id=StaticImporter

    It would be great if one of the developers, such as sminnee? or aoneil?, would fill all of the documentation out, so that we can use this great and promising module! Thanks!

  • Yakiv
    Avatar
    Community Member
    59 Posts

    Re: CSVBulkLoader Link to this post

    I have tried the August 12th SVN update for the StaticImporter. I am so happy to see the improvements and continued development on this module! Is there a way that I could communicate with one of the StaticImporter developers, to get some questions answered? I still don't see any documentation done for this plugin, on the wiki and no one is replying on the forums, with help on how to use this module. So, if someone would be willing to communicate by e-mail, that would be fine too. Please help! I am loving SilverStripe, but I need help on this module. Thanks!!!

  • JeremyW
    Avatar
    Core Development Team
    4 Posts

    Re: CSVBulkLoader Link to this post

    Heya,

    I've posted a bit of info on StaticImporter over at http://www.silverstripe.org/migrating-a-site-to-silverstripe/show/261977?showPost=267797

    Hopefully this sheds a bit of light!

    Cheers

    Jeremy

    4998 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.