It's mandatory you have read EditingHowTo first, and have all the tools installed.

Retrieve the files from the spool and propagate them to the site

Check if ~/theanarchistlibraryrc is correctly set up. It's just a line with the remote spool directory and the local git directory. Fix it accordly.

http://theanarchistlibrary.org/spool /home/user/tal/alibrary

Let's go. In this case we have 4 editings.

user@machine:/tmp$ spoolretriever.sh 
I found the following files in the spool
Emma_Goldman__The_Failure_of_Christianity-11-09-14-16-06-22
Raoul_Vaneigem__The_Resistance_to_Christianity._The_Heresies_at_the_Origins_of_the_18th_Century-11-09-14-16-11-43
Anonymous__The_Malleus_Maleficarum___The_Hammer_of_Witches__A_Review-11-09-14-16-14-48
Charles_Malato__Religions-11-09-14-16-29-41
Does this look good to you?(Y/N)  y

It looks very good, so say "y". This will output the differences (with colors, green for additions and red for deletions), and ask

(Scroll up if you can't see it all). Commit it? (y/n) >>

If it looks good, say "y", if not "n"

If you answer "n", the process will stop, because your local git will have altered files.

Unstaged changes after reset:
M       Emma_Goldman__The_Failure_of_Christianity.xml
resetting
it looks like you have local modifications to your git
it strongly raccomended to have a clean "git status"
before proceeding. I'm stopping now and I'm waiting for you
to check if everything is fine and hit enter
I.e., open another shell and check /home/user/tal/alibrary

cd ~/tal/alibrary
git status
git reset --hard

The hard reset will restore the git to the previous commit. Go back to the other terminal and continue the process.

At the end a message will appear:

I've added these files (with the suffix stripped out)
Check "git log" to see the details
Emma_Goldman__The_Failure_of_Christianity-11-09-14-16-06-22
Raoul_Vaneigem__The_Resistance_to_Christianity._The_Heresies_at_the_Origins_of_the_18th_Century-11-09-14-16-11-43
Anonymous__The_Malleus_Maleficarum___The_Hammer_of_Witches__A_Review-11-09-14-16-14-48
Charles_Malato__Religions-11-09-14-16-29-41

Back on the other terminal in the library git, you'll see the following status:

# On branch master
# Your branch is ahead of 'origin/master' by 4 commits.
#
nothing to commit (working directory clean)

git log -p will show you what has been done.

Then test the files

testalentry.sh Charles_Malato__Religions.xml

Look at the PDFs and see if they looks fine. Then push to the server.

git push

The things will be published soon (when the cronjob will kick in).

Finally, clean the remote spool:

http://theanarchistlibrary.org/cgi-bin/spool.pl

Mark the files you checked in as "done" and the rejected as "trash".

End.

Direct file uploading

If you have git access, you can bypass the webform, checking in directly the files in the git.

Create a temporary directory, download, edit (It's mandatory to fill the AUTHOR and TITLE fields of the header) and fix the text:

mkdir -p /tmp/pipe
cd /tmp/pipe
talimporter.pl http://url.org/file.html > myfile.xml
emacs myfile.xml # edit it
properly-rename-file.pl myfile.xml

Now you have Author__Title.xml. Move it in the library git.

mv Author__Title.xml ~/tal/alibrary
cd ~/tal/alibrary
testalentry.sh Author__Title.xml # be sure the text is fine
git status # this will show the new text as uncommitted
git add Author__Title.xml
git commit # this will open an editor. Write a note about what's going on
git push

Whatever is present as .xml in the master branch, will be published.

Suggested reading for mastering the git machinery:

http://www-cs-students.stanford.edu/~blynn/gitmagic/

It's a pleasant reading. It will take you an hour or two and you'll have a powerful tool at your disposal (not only for the library)

GitMaintainerRoutine (last edited 2011-09-15 10:23:32 by melmoth)