Yet Another Feed Importer (yafi) - Command line script

View: New views
4 Messages — Rating Filter:   Alert me  

Yet Another Feed Importer (yafi) - Command line script

by Timothy Ding :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi list,

I am having problem executing the yafi command to import feeds, i
created one feed record in pid2 and below is what i have entered. i
think my syntax is wrong because cli_dispatch won't start. can someone
give me a hint?

typo3$./cli_dispatch.phpsh yafi -p 2 - l 1 -n 1 -v

typo3/cli_dispatch.php yafi import -p pid [-l limit]
        -p pid      Mandatory. Defines page uid where feed records are located
        -l limit    Limits import to given feeds. Parameters is a
comma-separated list of
        -n number   Limit import to this number of feeds
        -s          Be silent (good for cron jobs)
        -v          Be verbose

PHP Version 5.2.1
typo3 4.2.1

Thanks,
Tim
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

Re: Yet Another Feed Importer (yafi) - Command line script

by Dmitry Dulepov [typo3] :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Tim!

Timothy Ding wrote:
> I am having problem executing the yafi command to import feeds, i
> created one feed record in pid2 and below is what i have entered. i
> think my syntax is wrong because cli_dispatch won't start. can someone
> give me a hint?
>
> typo3$./cli_dispatch.phpsh yafi -p 2 - l 1 -n 1 -v

Firsts, cli_dispatch.phpsh should be started from one level up (TYPO3 base directory). Next, there is a space between "-" and "l". Third, "import" is missing :) So correct command would be:

$ ./typo3/cli_dispatch.phpsh yafi import -p 2 -l 1 -n 1 -v

This should work :)

--
Dmitry Dulepov
TYPO3 Core team
Latest article: http://typo3bloke.net/post-details/do_not_ask_more_than_you_need/
More about TYPO3: http://typo3bloke.net/
Subscribe: http://typo3bloke.net/rss.xml
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

Parent Message unknown Re: Yet Another Feed Importer (yafi) - Command line script

by Timothy Ding :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for the hint Dmitry! getting real close now but i see a new error :(

>Firsts, cli_dispatch.phpsh should be started from one level up (TYPO3 base directory). Next, there is a space between "-" and >"l". Third, "import" is missing :) So correct command would be:

>$ ./typo3/cli_dispatch.phpsh yafi import -p 2 -l 1 -n 1 -v

$ ./typo3/cli_dispatch.phpsh yafi import -p 2 -l 1 -n 1 -v

Warning: Missing argument 2 for t3lib_div::trimExplode(), called in
/var/www/typo3-421/typo3conf/ext/yafi/class.tx_yafi_api.php on line
150 and defined in /var/www/typo3-421/t3lib/class.t3lib_div.php on
line 1566
Import successful. Statistics:
Array
(
    [imported_feeds] => 0
    [ignored_feeds] => 0
    [imported_articles] => 0
    [ignored_articles] => 0
)

kind regards,
Tim
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

Re: Yet Another Feed Importer (yafi) - Command line script

by Dmitry Dulepov [typo3] :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

Timothy Ding wrote:
> Warning: Missing argument 2 for t3lib_div::trimExplode(), called in
> /var/www/typo3-421/typo3conf/ext/yafi/class.tx_yafi_api.php on line
> 150 and defined in /var/www/typo3-421/t3lib/class.t3lib_div.php on
> line 1566

Not important for command line script. But I will fix the warning.

--
Dmitry Dulepov
TYPO3 Core team
Latest article: http://typo3bloke.net/post-details/do_not_ask_more_than_you_need/
More about TYPO3: http://typo3bloke.net/
Subscribe: http://typo3bloke.net/rss.xml
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
LightInTheBox - Buy quality products at wholesale price