Difference between revisions of "Talk:Import CSV data into a wiki"
From Organic Design wiki
(→Running from windows: need to specify perl on windows) |
|||
Line 1: | Line 1: | ||
Here lies the documentatation for csv2wiki.pl | Here lies the documentatation for csv2wiki.pl | ||
− | ==Description== | + | == Description == |
− | |||
csv2wiki is a way to import data from a CSV file into a wiki running mediawiki. There are two versions of this program. The first is a command-line driven version written in the Perl language. The second is a PHP version that can be run from a web browser. | csv2wiki is a way to import data from a CSV file into a wiki running mediawiki. There are two versions of this program. The first is a command-line driven version written in the Perl language. The second is a PHP version that can be run from a web browser. | ||
− | ==How It Works | + | == How It Works == |
− | |||
− | |||
+ | === Source File === | ||
− | |||
+ | === Template === | ||
− | |||
+ | === Logging In === | ||
− | |||
+ | == Windows == | ||
If you are needing to run Csv2wiki from a Windows machine, you will first need to install [http://www.activestate.com/store/productdetail.aspx?prdGuid=81fbce82-6bd5-49bc-a915-08d58c2648ca Active Perl]. Refer to their site for documentation. | If you are needing to run Csv2wiki from a Windows machine, you will first need to install [http://www.activestate.com/store/productdetail.aspx?prdGuid=81fbce82-6bd5-49bc-a915-08d58c2648ca Active Perl]. Refer to their site for documentation. | ||
+ | == Install and Run == | ||
*Copy your job description file (eg job.txt) to the same directory as the csv2wiki.pl and wiki.pl scripts | *Copy your job description file (eg job.txt) to the same directory as the csv2wiki.pl and wiki.pl scripts | ||
*Open up a command prompt | *Open up a command prompt |
Revision as of 20:21, 26 March 2008
Here lies the documentatation for csv2wiki.pl
Contents
Description
csv2wiki is a way to import data from a CSV file into a wiki running mediawiki. There are two versions of this program. The first is a command-line driven version written in the Perl language. The second is a PHP version that can be run from a web browser.
How It Works
Source File
Template
Logging In
Windows
If you are needing to run Csv2wiki from a Windows machine, you will first need to install Active Perl. Refer to their site for documentation.
Install and Run
- Copy your job description file (eg job.txt) to the same directory as the csv2wiki.pl and wiki.pl scripts
- Open up a command prompt
- change to the directory containing the csv2wiki.pl script
perl csv2wiki.pl job.txt
Job file syntax
The job files contain the following parameters to specify a parsing job:
- csv: c:\foo.csv (the full pathname of the CSV file for this job)
- wiki: http://www.mywiki.com/wiki/index.php (the URL of the wiki to update, must be long-form)
- user: WikiUser (the username to log in to the wiki as)
- pass:
- title: 7 (index of field to use as article title, zero is first field)
- template: MyTemplate (defaults to "Record" if not included)