Last modified: 2010-05-15 15:48:31 UTC
In importTextFile.php echo( "does not exist.\n" ); Say what doesn't exist. FILE:? TITLE:? Add the word 'file "..........."' $ php importTextFile.php --title Bla - Import Text File Using ...does not exist. In importTextFile.php say how one can use stdin. Not clear if importTextFile.php returns an error to the shell upon failure. P.S. Also one day have a look at importTextFile.php with emacs' show-trailing-whitespace turned on. And sure wish Mom would buy me a terminal as wide as the brand the editor uses. The 156 character long line needs column 163 to display it. All that wrapping makes one dizzy. Idea: in function showHelp(), instead of many echos, use one echo<<<EOF Import the contents of a text file into a wiki page. USAGE: php importTextFile.php [--help|--title <title>|--user <user>|--comment <comment>|--nooverwrite] <filename> --help: Show this help information --title <title> : Title for the new page; if not supplied, the filename is used as a base for the title --user <user> : User to be associated with the edit; if not supplied, a default is used --comment <comment> : Edit summary to be associated with the edit; underscores are transformed into spaces; if not supplied, a default is used --nooverwrite : Don't overwrite existing page content <filename> : Path to the file containing the wikitext to import EOF (and again, say how to use /dev/stdin etc. which didn't seem to work.)
I don't believe it's possible to feed text in through standard input with that script; use the edit.php script for that. This is targetted at mass file imports. Can you possibly make the effort to file bugs properly? As in, using one bug per issue; the right products and components, the right summaries, etc.