Permalink
Browse files

Changes to an inclusive terminology when getting pages, underscoring …

…that all files may be transcribed, not just image files.
  • Loading branch information...
1 parent 1763297 commit 1ba62e1b5adb48468e07878825dd211136655e77 Jim Safley committed Jun 6, 2011
Showing with 25 additions and 25 deletions.
  1. +1 −1 README.markdown
  2. +15 −15 lib/Scripto/Adapter/Example.php
  3. +4 −4 lib/Scripto/Adapter/Interface.php
  4. +5 −5 lib/Scripto/Document.php
View
@@ -6,7 +6,7 @@ License: [GNU GPL v3](http://www.gnu.org/licenses/gpl-3.0.txt)
Scripto is an open source documentary transcription tool written in PHP. It
features a lightweight library that interfaces MediaWiki and potentially any
-content management system that serves document images. MediaWiki is a good
+content management system that serves document files. MediaWiki is a good
choice for the transcription database for several reasons:
* It is the most popular wiki application and has a sizable and active developer
@@ -27,7 +27,7 @@ class Scripto_Adapter_Example implements Scripto_Adapter_Interface
* 'document_pages' => array(
* {pageId} => array(
* 'page_name' => {pageName},
- * 'page_image_url' => {pageImageUrl}
+ * 'page_file_url' => {pageFileUrl}
* )
* )
* )
@@ -53,56 +53,56 @@ class Scripto_Adapter_Example implements Scripto_Adapter_Interface
'document_pages' => array(
67799 => array(
'page_name' => 'Letter Outside',
- 'page_image_url' => 'http://wardepartmentpapers.org/images/medium/zto/ZTO07001.jpg'
+ 'page_file_url' => 'http://wardepartmentpapers.org/images/medium/zto/ZTO07001.jpg'
),
67800 => array(
'page_name' => 'Letter Body',
- 'page_image_url' => 'http://wardepartmentpapers.org/images/medium/zto/ZTO07002.jpg'
+ 'page_file_url' => 'http://wardepartmentpapers.org/images/medium/zto/ZTO07002.jpg'
),
67801 => array(
'page_name' => 'Worksheet 1, Outside',
- 'page_image_url' => 'http://wardepartmentpapers.org/images/medium/zto/ZTO07003.jpg'
+ 'page_file_url' => 'http://wardepartmentpapers.org/images/medium/zto/ZTO07003.jpg'
),
67802 => array(
'page_name' => 'Worksheet 1, Page 1',
- 'page_image_url' => 'http://wardepartmentpapers.org/images/medium/zto/ZTO07004.jpg'
+ 'page_file_url' => 'http://wardepartmentpapers.org/images/medium/zto/ZTO07004.jpg'
),
67803 => array(
'page_name' => 'Worksheet 1, Page 2',
- 'page_image_url' => 'http://wardepartmentpapers.org/images/medium/zto/ZTO07005.jpg'
+ 'page_file_url' => 'http://wardepartmentpapers.org/images/medium/zto/ZTO07005.jpg'
),
67804 => array(
'page_name' => 'Worksheet 2, Outside',
- 'page_image_url' => 'http://wardepartmentpapers.org/images/medium/zto/ZTO07006.jpg'
+ 'page_file_url' => 'http://wardepartmentpapers.org/images/medium/zto/ZTO07006.jpg'
),
67805 => array(
'page_name' => 'Worksheet 2, Page 1',
- 'page_image_url' => 'http://wardepartmentpapers.org/images/medium/zto/ZTO07007.jpg'
+ 'page_file_url' => 'http://wardepartmentpapers.org/images/medium/zto/ZTO07007.jpg'
)
)
),
// An alternate way to set the document using a document title as the
- // document ID and the image file path as the page ID. See: http://books.google.com/books?id=eAuOQMmGEYIC&lpg=PA515&ots=PtWRBKDZbf&pg=PA515
+ // document ID and the file path as the page ID. See: http://books.google.com/books?id=eAuOQMmGEYIC&lpg=PA515&ots=PtWRBKDZbf&pg=PA515
// %5BFacsimile%20of%5D%20letter%20to%20Messrs.%20O.%20P.%20Hall%20et%20al%20from%20Lincoln.
'[Facsimile of] letter to Messrs. O. P. Hall et al from Lincoln.' => array(
'document_title' => '[Facsimile of] letter to Messrs. O. P. Hall et al from Lincoln.',
'document_pages' => array(
// rbc%2Flprbscsm%2Fscsm0455%2F001r.jpg
'rbc/lprbscsm/scsm0455/001r.jpg' => array(
'page_name' => '001r',
- 'page_image_url' => 'http://memory.loc.gov/service/rbc/lprbscsm/scsm0455/001r.jpg'
+ 'page_file_url' => 'http://memory.loc.gov/service/rbc/lprbscsm/scsm0455/001r.jpg'
),
'rbc/lprbscsm/scsm0455/002r.jpg' => array(
'page_name' => '002r',
- 'page_image_url' => 'http://memory.loc.gov/service/rbc/lprbscsm/scsm0455/002r.jpg'
+ 'page_file_url' => 'http://memory.loc.gov/service/rbc/lprbscsm/scsm0455/002r.jpg'
),
'rbc/lprbscsm/scsm0455/003r.jpg' => array(
'page_name' => '003r',
- 'page_image_url' => 'http://memory.loc.gov/service/rbc/lprbscsm/scsm0455/003r.jpg'
+ 'page_file_url' => 'http://memory.loc.gov/service/rbc/lprbscsm/scsm0455/003r.jpg'
),
'rbc/lprbscsm/scsm0455/004r.jpg' => array(
'page_name' => '004r',
- 'page_image_url' => 'http://memory.loc.gov/service/rbc/lprbscsm/scsm0455/004r.jpg'
+ 'page_file_url' => 'http://memory.loc.gov/service/rbc/lprbscsm/scsm0455/004r.jpg'
)
)
)
@@ -127,9 +127,9 @@ public function getDocumentPages($documentId)
return $pages;
}
- public function getDocumentPageImageUrl($documentId, $pageId)
+ public function getDocumentPageFileUrl($documentId, $pageId)
{
- return $this->_documents[$documentId]['document_pages'][$pageId]['page_image_url'];
+ return $this->_documents[$documentId]['document_pages'][$pageId]['page_file_url'];
}
public function getDocumentFirstPageId($documentId)
@@ -47,7 +47,7 @@ public function documentPageExists($documentId, $pageId);
*
* For the page IDs we highly recommend using unique keys from the external
* database whenever possible (e.g. the file ID). This page ID will be used
- * to query the adapter for page image URLs, so they must be no ambiguity.
+ * to query the adapter for page file URLs, so they must be no ambiguity.
*
* The return value must follow this format:
* array([pageId] => [pageName], [...])
@@ -68,13 +68,13 @@ public function documentPageExists($documentId, $pageId);
public function getDocumentPages($documentId);
/**
- * Get the URL of the specified document page image.
+ * Get the URL of the specified document page file.
*
* @param int|string $documentId The unique document ID
* @param int|string $pageId The unique page ID
- * @return string The page image URL
+ * @return string The page file URL
*/
- public function getDocumentPageImageUrl($documentId, $pageId);
+ public function getDocumentPageFileUrl($documentId, $pageId);
/**
* Get the first page of the document.
View
@@ -235,17 +235,17 @@ public function getFirstPageId()
}
/**
- * Get this document's current page image URL from the adapter.
+ * Get this document's current page file URL from the adapter.
*
- * @uses Scripto_Adapter_Interface::getDocumentPageImageUrl()
+ * @uses Scripto_Adapter_Interface::getDocumentPageFileUrl()
* @return string
*/
- public function getPageImageUrl()
+ public function getPageFileUrl()
{
if (is_null($this->_pageId)) {
- throw new Scripto_Exception('The document page must be set before getting the page image URL.');
+ throw new Scripto_Exception('The document page must be set before getting the page file URL.');
}
- return $this->_adapter->getDocumentPageImageUrl($this->_id, $this->_pageId);
+ return $this->_adapter->getDocumentPageFileUrl($this->_id, $this->_pageId);
}
/**

0 comments on commit 1ba62e1

Please sign in to comment.