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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 8973 - importTextFile.php: add stdin instructions
importTextFile.php: add stdin instructions
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
PC Linux
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  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: ---


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
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
(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.