Last modified: 2010-05-15 15:48:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T10973, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8973 - importTextFile.php: add stdin instructions
importTextFile.php: add stdin instructions
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.9.x
PC Linux
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-02-13 20:45 UTC by Dan Jacobson
Modified: 2010-05-15 15:48 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Dan Jacobson 2007-02-13 20:45:46 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.)
Comment 1 Rob Church 2007-02-13 21:56:19 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links