[development] Back to Curl-based content generation

Victor Kane victorkane at gmail.com
Thu Feb 19 11:11:21 UTC 2009


M. wants to shove content into a remote Drupal site from his desktop.
So he wants to know the minimum to install in terms of a script which
bootstraps Drupal and uses curl to get the content and node_save to save it
to the remote URL.
I think this might be better served by running an XMLRPC or other server
(see services module), then you can use anything you like to speak the same
protocol.

Victor Kane
http://awebfactory.com.ar

On Thu, Feb 19, 2009 at 9:04 AM, Cog Rusty <cog.rusty at gmail.com> wrote:

> On Thu, Feb 19, 2009 at 11:47 AM, M. Fioretti <mfioretti at nexaima.net>
> wrote:
> > Greetings,
> >
> > sorry if I couldn't answer earlier to all the feedback that came in
> > the original thread a couple weeks ago.
> >
> > It looks like several things I wrote were simply ignored by some
> > posters. I'm going to shortly sum them up again, and then ask one
> > (last, I promise) related question.
> >
> > Quoting from several posts of the original thread:
> >
> >> Quite frankly, shell + curl are not an adequate tool for the job,
> >> unless you grok awk and sed really well.
> >> ...
> >> You will likely also need to have a cookie
> >> ....
> >> View Source. Search '<form' . You'll see everything that needs to be
> >> post'ed for a given form.
> >> ...
> >> Everything in drupal is processed through index.php, so you don't
> >> need a sequence of URLs for your post'ing either.
> >
> > IIRC, I had already made clear, before getting these answers, that:
> >
> > - I'm already much more expert in awk/sed/bash/perl coding than with
> >  PHP, so a non-php solution is much more time-efficient for me, if at
> >  all possible. Not to mention that those tools/languages give, in the
> >  real world of desktop/usb key linux distros, more guarantees to work
> >  out of the box without tweaking or installing extra-packages than
> >  anything requiring php.
> >
> > - I know very well what HTML forms and HTTP cookies are, and have
> >  already done this with non-drupal websites. And the URLs you see in
> >  the browser when you add content by hand are NOT "index.php + some
> >  parameters"
> >
> > - (almost) the only solution I am interested into is how to add new
> >  content remotely, when I cannot alter in any way the configuration
> >  of the server where Drupal runs.
> >
> > I'm not rewriting all this to start a fight, really, just to clarify
> > why I asked what I asked and what I already know, that is to save your
> > time.
> >
> > This said, I do understand all the points about Drupal being more
> > interested in offering a flexible API than in supporting this kind of
> > things. So, I will now go back to my desk and put together, by myself,
> > my custom shell+curl hack based on the one posted here by Martin
> > Stadler (thanks, Martin!).  However, let me ask you this:
> >
> > If you already said it, I do confess I didn't recognize it: what is
> > the smallest possible set of Drupal(related) Php **files or
> > libraries** that I should install on a Linux *desktop* without HTTP
> > server but with a working PHP-CLI interpreter, to put together a PHP
> > script which can log into a remote Drupal site and add nodes?
>
>
> Maybe I lost some part of this discussion, but I wonder: Why would you
> need any kind of server or PHP on your desktop to work with a remote
> Drupal web site? And how could a web site respond to requests from any
> of those? Are you talking about putting together a CLI web browser?
>
>
> > Thanks,
> > M.
> >
> > --
> > Your own civil rights and the quality of your life heavily depend on how
> > software is used *around* you:            http://digifreedom.net/node/84
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20090219/11829206/attachment.htm 


More information about the development mailing list