-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move code pointers from SF to github.com
Update documentation and tooling to reference github.com instead of sourceforge.net.
- Loading branch information
Showing
8 changed files
with
192 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,48 @@ | ||
# Distributed Proofreaders | ||
|
||
Preserving history, one page at a time. | ||
_Preserving history, one page at a time._ | ||
|
||
This repository contains the code that powers http://www.pgdp.net and other | ||
sister DP sites world-wide. | ||
|
||
The master repository is hosted on SourceForge at: | ||
https://sourceforge.net/p/dproofreaders/git/ | ||
## About | ||
|
||
Distributed Proofreaders is a web application (written in PHP and backed by a | ||
MySQL database) that is intended to ease the process of converting public | ||
domain books and other printed materials into e-texts. | ||
The main site is at http://www.pgdp.net | ||
|
||
By breaking the work into individual pages, many proofreaders can be working | ||
on the same book at the same time. This significantly speeds up the | ||
proofreading/E-Text creation process. | ||
|
||
When a proofer elects to proofread a page for a particular project, the text | ||
and image file are displayed on a single webpage. This allows the text file | ||
to be easily reviewed and compared to the image file, thus assisting the | ||
proofreading of the text file. The edited text is then submitted back to the | ||
site via the same webpage that it was edited on. | ||
|
||
Once all pages for a particular book have been processed, a concatenated text | ||
file is made available for final clean-up and submitted to a | ||
[Project Gutenberg](https://en.wikipedia.org/wiki/Project_Gutenberg#Affiliated_projects) | ||
site. | ||
|
||
## Installation | ||
|
||
See `SETUP/installation.txt` for information on system pre-requisites and | ||
installation instructions. This file also has information on upgrading from | ||
an earlier release of the code. | ||
See the [installation guide](SETUP/installation.txt) for information on system | ||
pre-requisites and installation instructions. This file also has information on | ||
upgrading from an earlier release of the code. | ||
|
||
If you need assistance with the code, inquire within the | ||
[DP Site Code](http://www.pgdp.net/phpBB3/viewforum.php?f=32) forum at pgdp.net. | ||
[DP Site Code](https://www.pgdp.net/phpBB3/viewforum.php?f=32) forum at pgdp.net. | ||
|
||
## Code development | ||
|
||
To get involved with development on this code base, see | ||
[DP Code Development](http://www.pgdp.net/wiki/DP_Code_Development) in the | ||
[DP Code Development](https://www.pgdp.net/wiki/DP_Code_Development) in the | ||
pgdp.net wiki. | ||
|
||
## License | ||
|
||
All source code published here is available under the terms of the GNU General | ||
Public License, version 2. See `license.txt` for more information. | ||
All source code published here is available under the terms of the | ||
[GNU General Public License, version 2](license.txt). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
#!/bin/sh | ||
|
||
if [ $# != 1 ]; then | ||
echo 'usage: update_from_github <path-to-site-config-file>' | ||
exit 1 | ||
fi | ||
|
||
this_script_file=$0 | ||
site_config_file=$1 | ||
|
||
script_dir=`dirname $this_script_file` | ||
|
||
# ------------------------------------------------------------------------------ | ||
|
||
# Overview of this script: | ||
# ------------------------ | ||
# | ||
# The code snapshot will be installed at | ||
# $_CODE_DIR.new | ||
# (i.e., that directory will contain pinc, tools, etc.) | ||
# | ||
# If $SHIFT_TO_LIVE (defined in the config file) is 'yes', | ||
# or it's 'prompt' and the user answers 'y', | ||
# then $_CODE_DIR.new will be moved to $_CODE_DIR. | ||
# If that directory already exists, it will first be renamed as | ||
# $_CODE_DIR.bak | ||
# and if *that* directory already exists, it will be REMOVED. | ||
# | ||
# So if this script is being invoked periodically, any "manual" | ||
# changes you make within the snapshot hierarchy will soon disappear. | ||
# Basically, you should treat it as read-only (although I've | ||
# occasionally made quick changes to test some code that I'm | ||
# working on at home). | ||
# | ||
# In order to make the resulting site functional, this script | ||
# makes a few tweaks to the snapshot, replacing certain | ||
# patterns in certain files with site-specific strings. | ||
|
||
# ------------------------------------------------------------------------------ | ||
|
||
check() | ||
{ | ||
status=$? | ||
blurb=$1 | ||
if [ $status != 0 ]; then | ||
echo "'$blurb' returned status $status, so exiting" | ||
exit 1 | ||
fi | ||
} | ||
|
||
# ------------------------------------------------------------------------------ | ||
|
||
# Set _CODE_DIR | ||
. $site_config_file | ||
|
||
abort=/bin/false | ||
if [ "$TAG" = "" ]; then | ||
echo "Error: config file did not define TAG." | ||
abort=/bin/true | ||
fi | ||
if [ "$_CODE_DIR" = "" ]; then | ||
echo "Error: config file did not define _CODE_DIR." | ||
abort=/bin/true | ||
fi | ||
if [ "$GROUP" = "" ]; then | ||
echo "Error: config file did not define GROUP." | ||
abort=/bin/true | ||
fi | ||
if [ "$SHIFT_TO_LIVE" = "" ]; then | ||
echo "Error: config file did not define SHIFT_TO_LIVE." | ||
abort=/bin/true | ||
fi | ||
|
||
if $abort; then | ||
echo "Aborting due to config errors." | ||
exit 1 | ||
fi | ||
|
||
# just as an early warning/reassurance... | ||
echo "Note: SHIFT_TO_LIVE = $SHIFT_TO_LIVE" | ||
echo | ||
|
||
|
||
# ------------------------------------------------------------------------------ | ||
# Get snapshot of code from github.com | ||
|
||
$script_dir/get_git_clone $TAG $GROUP $_CODE_DIR.new | ||
check "get_git_clone" | ||
|
||
# ------------------------------------------------------------------------------ | ||
# Install site-specific info. | ||
|
||
configure_script_file=$script_dir/configure | ||
$configure_script_file $site_config_file $_CODE_DIR.new | ||
|
||
# ------------------------------------------------------------------------------ | ||
|
||
echo "" | ||
$script_dir/diff_rq $_CODE_DIR $_CODE_DIR.new | ||
echo "" | ||
|
||
echo "NOTE: using TAG = $TAG" | ||
echo "" | ||
|
||
if [ $SHIFT_TO_LIVE = yes ]; then | ||
# fine | ||
: | ||
|
||
elif [ $SHIFT_TO_LIVE = no ]; then | ||
echo "SHIFT_TO_LIVE is 'no', so exiting without an install" | ||
exit 1 | ||
|
||
elif [ $SHIFT_TO_LIVE = prompt ]; then | ||
echo -n "Install $_CODE_DIR.new? [yn] " | ||
read response | ||
echo -n "Your response was '$response', so " | ||
if [ "$response" != y ]; then | ||
echo "exiting." | ||
exit 1 | ||
fi | ||
echo "continuing..." | ||
|
||
else | ||
echo "Error: unexpected value for SHIFT_TO_LIVE: '$SHIFT_TO_LIVE'." | ||
echo "Assuming SHIFT_TO_LIVE='no', so exiting without an install." | ||
exit 1 | ||
fi | ||
|
||
# ------------------------------------------------------------------------------ | ||
|
||
# "Install" the new hierarchy. | ||
echo "installing the new hierarchy..." | ||
|
||
if [ -d $_CODE_DIR.bak ]; then | ||
rm -rf $_CODE_DIR.bak | ||
check "rm $_CODE_DIR.bak" | ||
fi | ||
|
||
if [ -d $_CODE_DIR ]; then | ||
mv $_CODE_DIR $_CODE_DIR.bak | ||
check "mv $_CODE_DIR $_CODE_DIR.bak" | ||
fi | ||
|
||
mv $_CODE_DIR.new $_CODE_DIR | ||
check "mv $_CODE_DIR.new $_CODE_DIR" | ||
|
||
# ------------------------------------------------------------------------------ | ||
# vim: ai sw=4 ts=100 |
Oops, something went wrong.