[support] I can't believe you can't add content from the command line...

eric Farris eafarris at gmail.com
Sun Jul 2 16:50:26 UTC 2006


On 7/2/06, dondi_2006 <dondi_2006 at libero.it> wrote:
> Hello,
>
> Some days ago I had asked on this list how to add content in
> Drupal from the mysql command line.
> I only got one suggestion to try the import_HTML module (http://drupal.org/node/46008) but it really seems an overkill,
> and not the best approach to what I have to do.
>
> I had also asked how to do the same thing in two different ways in
> the forums:
> http://drupal.org/node/62954
> http://drupal.org/node/68605
>
> without result so far: no feedback from others who posted, who I contacted directly, no usable documentation I could recognize, nothing...
>
> Honestly, I can't believe this has never been done before: What
> I need to do is something that (OUTSIDE Drupal) reads a .txt file like this:
>
> ARTICLE_CATEGORIES="travel/england/london,  food/foreign/restaurants"
> TEXT="path/to/some/local/html/file/"
> CREATED_ON_DATE="YYYY/MM/DD"
> AUTHOR="John Doe"
>
> etc etc.... (other variables like, for example, "create_a_forum_for_this_node")
>
> and upload the node inside the Drupal database, just if I had inserted everything by hand in the proper drupal form.
>
> I don't want to do it via drupal because I need this to happen regularly  and automatically (say, a cron job on my home PC which publishes via ssh whatever file in $DRUPAL_CONTENT folder changed in the last hour): it's not a one-time job.
>
> I've also tried to look for scripts doing this via the blogger API
> (or usable documentation on how to write them so they _are_ drupal compatible): nothing.
>
> What am I missing? Is it really possible that everybody is happy
> pasting and changing stuff manually in a tiny textarea, EVERY
> darned time some node must be added or updated??
>
> Thanks,
>
> O.
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>

Have a look at the mailhandler.module, which allows creation of
content from email. This is probably the closest thing to what you're
after, and could probably be modified to create content from the
filesystem.

-- 
e
www.eafarris.com


More information about the support mailing list