Well, I've just committed a batch of updates to txtckr, which has finally moved beyond a mix of php & pseudo-php to a stage where I run it on a laptop without any errors (with the included very simple test).
It's almost at the stage of adding the finishing touches to the name handling, where the various openurl name parts get humpty-dumptied again. It's just skeleton coding at this stage, but hopefully a pretty sound basis for what's to come!
Showing posts with label php. Show all posts
Showing posts with label php. Show all posts
Sunday, September 27, 2009
Thursday, August 6, 2009
Dealing with humans' (names)
Recently I hit a slight snag on a fairly common problem... dealing with names. This is a problematic area, given that everyone has one, and trying to build in what we know about names into software is actually a bit of a slog!
What I'm doing is trying to parse names, (mainly author names), for txtckr, so that one of the output display formats could be a reference, (APA, for example). To do this, I also need to untangle the "rft.au" information which is delivered through OpenURL, and I'm trying to build in some "forgiveness" to allow for people/companies that don't follow spec's properly!
Things to consider:
What I'm doing is trying to parse names, (mainly author names), for txtckr, so that one of the output display formats could be a reference, (APA, for example). To do this, I also need to untangle the "rft.au" information which is delivered through OpenURL, and I'm trying to build in some "forgiveness" to allow for people/companies that don't follow spec's properly!
Things to consider:
- with a full name, is it supplied first-name(s) last-name/surname, and if so, where does the surname begin? This is fine for a fair number of relatively simple names, but what about surnames which aren't, such as "van der Weerden"?
- if you're going to receive name fragments, how do you build these sensibly into software, so you can give permutations of the name, e.g. Pasley, Tom == Pasley, T. == Tom Pasley == T. Pasley?
Labels:
authors,
databases,
names,
openurl,
openurl resolver,
php,
programming,
references,
txtckr
Friday, November 28, 2008
NTS:: PEAR installation for OAI-0.4.1
Log for installing PEAR modules for OAI-0.4.1
\php5>pear config-set http_proxy http://proxy.somewhere.net:8081
config-set succeeded
\php5>pear install --ignore-errors channel://pear.php.net/HTTP_Session-0.5.6
WARNING: "pear/HTTP_Session" is deprecated in favor of "pear/HTTP_Session2"
WARNING: "pear/DB" is deprecated in favor of "pear/MDB2"
WARNING: "pear/MDB" is deprecated in favor of "pear/MDB2"
Did not download optional dependencies: pear/DB, pear/MDB, pear/MDB2, use --alldeps to download automatically
pear/HTTP_Session can optionally use package "pear/DB" (version >= 1.7.6)
pear/HTTP_Session can optionally use package "pear/MDB" (version >= 1.1.4)
pear/HTTP_Session can optionally use package "pear/MDB2" (version >= 2.0.1)
downloading HTTP_Session-0.5.6.tgz ...
Starting to download HTTP_Session-0.5.6.tgz (15,343 bytes)
.....done: 15,343 bytes
install ok: channel://pear.php.net/HTTP_Session-0.5.6
\php5>pear install channel://pear.php.net/MDB2
downloading MDB2-2.4.1.tgz ...
Starting to download MDB2-2.4.1.tgz (119,790 bytes)
..........................done: 119,790 bytes
install ok: channel://pear.php.net/MDB2-2.4.1
MDB2: Optional feature fbsql available (Frontbase SQL driver for MDB2)
MDB2: Optional feature ibase available (Interbase/Firebird driver for MDB2)
MDB2: Optional feature mysql available (MySQL driver for MDB2)
MDB2: Optional feature mysqli available (MySQLi driver for MDB2)
MDB2: Optional feature mssql available (MS SQL Server driver for MDB2)
MDB2: Optional feature oci8 available (Oracle driver for MDB2)
MDB2: Optional feature pgsql available (PostgreSQL driver for MDB2)
MDB2: Optional feature querysim available (Querysim driver for MDB2)
MDB2: Optional feature sqlite available (SQLite2 driver for MDB2)
MDB2: To install optional features use "pear install pear/MDB2#featurename"
\php5>pear install pear/MDB2#mysql
Skipping package "pear/MDB2", already installed as version 2.4.1
pear/MDB2_Driver_mysql requires PHP extension "mysql" No valid packages found install failed
// hmmm not sure if this is because I'm using Windows?
\php5>pear install channel://pear.php.net/HTTP_Session-0.5.6
Ignoring installed package pear/HTTP_Session Nothing to install
\php5>pear install --alldeps http://internode.dl.sourceforge.net/sourceforge/oai-pear/OAI-0.4.1.tgz
downloading OAI-0.4.1.tgz ...
Starting to download OAI-0.4.1.tgz (20,791 bytes)
........done: 20,791 bytes
downloading HTTP_Header-1.2.0.tgz ...
Starting to download HTTP_Header-1.2.0.tgz (10,440 bytes)
...done: 10,440 bytes
downloading HTML_Template_IT-1.2.1.tgz ...
Starting to download HTML_Template_IT-1.2.1.tgz (21,565 bytes)
...done: 21,565 bytes
downloading HTTP-1.4.1.tgz ...
Starting to download HTTP-1.4.1.tgz (8,635 bytes)
...done: 8,635 bytes
install ok: channel://pear.php.net/HTML_Template_IT-1.2.1
install ok: channel://pear.php.net/HTTP-1.4.1
install ok: channel://pear.php.net/HTTP_Header-1.2.0
install ok: channel://pear.php.net/OAI-0.4.1
\php5>
\php5>pear config-set http_proxy http://proxy.somewhere.net:8081
config-set succeeded
\php5>pear install --ignore-errors channel://pear.php.net/HTTP_Session-0.5.6
WARNING: "pear/HTTP_Session" is deprecated in favor of "pear/HTTP_Session2"
WARNING: "pear/DB" is deprecated in favor of "pear/MDB2"
WARNING: "pear/MDB" is deprecated in favor of "pear/MDB2"
Did not download optional dependencies: pear/DB, pear/MDB, pear/MDB2, use --alldeps to download automatically
pear/HTTP_Session can optionally use package "pear/DB" (version >= 1.7.6)
pear/HTTP_Session can optionally use package "pear/MDB" (version >= 1.1.4)
pear/HTTP_Session can optionally use package "pear/MDB2" (version >= 2.0.1)
downloading HTTP_Session-0.5.6.tgz ...
Starting to download HTTP_Session-0.5.6.tgz (15,343 bytes)
.....done: 15,343 bytes
install ok: channel://pear.php.net/HTTP_Session-0.5.6
\php5>pear install channel://pear.php.net/MDB2
downloading MDB2-2.4.1.tgz ...
Starting to download MDB2-2.4.1.tgz (119,790 bytes)
..........................done: 119,790 bytes
install ok: channel://pear.php.net/MDB2-2.4.1
MDB2: Optional feature fbsql available (Frontbase SQL driver for MDB2)
MDB2: Optional feature ibase available (Interbase/Firebird driver for MDB2)
MDB2: Optional feature mysql available (MySQL driver for MDB2)
MDB2: Optional feature mysqli available (MySQLi driver for MDB2)
MDB2: Optional feature mssql available (MS SQL Server driver for MDB2)
MDB2: Optional feature oci8 available (Oracle driver for MDB2)
MDB2: Optional feature pgsql available (PostgreSQL driver for MDB2)
MDB2: Optional feature querysim available (Querysim driver for MDB2)
MDB2: Optional feature sqlite available (SQLite2 driver for MDB2)
MDB2: To install optional features use "pear install pear/MDB2#featurename"
\php5>pear install pear/MDB2#mysql
Skipping package "pear/MDB2", already installed as version 2.4.1
pear/MDB2_Driver_mysql requires PHP extension "mysql" No valid packages found install failed
// hmmm not sure if this is because I'm using Windows?
\php5>pear install channel://pear.php.net/HTTP_Session-0.5.6
Ignoring installed package pear/HTTP_Session Nothing to install
\php5>pear install --alldeps http://internode.dl.sourceforge.net/sourceforge/oai-pear/OAI-0.4.1.tgz
downloading OAI-0.4.1.tgz ...
Starting to download OAI-0.4.1.tgz (20,791 bytes)
........done: 20,791 bytes
downloading HTTP_Header-1.2.0.tgz ...
Starting to download HTTP_Header-1.2.0.tgz (10,440 bytes)
...done: 10,440 bytes
downloading HTML_Template_IT-1.2.1.tgz ...
Starting to download HTML_Template_IT-1.2.1.tgz (21,565 bytes)
...done: 21,565 bytes
downloading HTTP-1.4.1.tgz ...
Starting to download HTTP-1.4.1.tgz (8,635 bytes)
...done: 8,635 bytes
install ok: channel://pear.php.net/HTML_Template_IT-1.2.1
install ok: channel://pear.php.net/HTTP-1.4.1
install ok: channel://pear.php.net/HTTP_Header-1.2.0
install ok: channel://pear.php.net/OAI-0.4.1
\php5>
NTS:: PEAR installations for PHP on Windows
Most of my blog postings will be in the form of "note(s) to self" (NTS::), and given that I tend to lose bits of paper, at least this way I'll be able to find them again!
NTS:: PEAR installations for PHP on Windows
I've just been reminded by the fact that when I'm trying to install from the PEAR repository or SourceForge, I must go through this hoop-la:
// do the whole proxy thing...
pear config-set http_proxy http://proxy.somewhere.net:8081
// then install packages...
pear install --ignore-errors channel://pear.php.net/HTTP_Session-0.5.6
"force install even if there were errors"
pear install --soft channel://pear.php.net/HTTP_Session2
"soft install, fail silently, or upgrade if already installed"
pear install --alldeps http://internode.dl.sourceforge.net/sourceforge/oai-pear/OAI-0.4.1.tgz
"install all required and optional dependencies"
NTS:: PEAR installations for PHP on Windows
I've just been reminded by the fact that when I'm trying to install from the PEAR repository or SourceForge, I must go through this hoop-la:
// do the whole proxy thing...
pear config-set http_proxy http://proxy.somewhere.net:8081
// then install packages...
pear install --ignore-errors channel://pear.php.net/HTTP_Session-0.5.6
"force install even if there were errors"
pear install --soft channel://pear.php.net/HTTP_Session2
"soft install, fail silently, or upgrade if already installed"
pear install --alldeps http://internode.dl.sourceforge.net/sourceforge/oai-pear/OAI-0.4.1.tgz
"install all required and optional dependencies"
Subscribe to:
Posts (Atom)