instructions for serving databases to iPhone or network

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
Henry
Posts: 13
Joined: Mon Apr 03, 2006 11:47 pm

instructions for serving databases to iPhone or network

Post by Henry »

Instructions for serving a Bookends database to an iPhone (or to any web browser) over a LAN:

These instructions assume that you have your Bookends database on a computer connected to a Local Area Network (LAN) perhaps using a router, and you want to access your database using a web browser from other computers on the LAN (any platform), or iPhones which connect to your LAN with wi-fi.

1. In Bookends preferences, server tab, check "Allow Web access to databases", and "Keep log". Change the "Max connections" value to 2.

2. Close the preferences window. Close Bookends.

3. In the finder, move your Bookends database to ~/Library/Applications Support/Bookends/Server/

4. Move the Attachments folder for your database into ~/Library/Applications Support/Bookends/Server/

5. Download the file "bookends2iphone.zip", here:
bookends2iphone.zip
html files for Bookends server
(7.31 KiB) Downloaded 466 times
Double-click to unzip, if necessary, and move the file BE.html, and the folders "img" and "scr", to ~/Library/Applications Support/Bookends/Server/

6. Change the name of your database to a single word (this may be unnecessary, but it may help prevent problems!)

7. Double-click the database. It should open in Bookends.

8. In Bookends preferences, "General" tab: click the "Choose..." button under the "Attachments" header, and navigate to the Attachments folder that you moved into ~/Library/Applications Support/Bookends/Server/. Select the Attachments folder and click the "Select" button.

9. In Bookends menu "Biblio" choose the menu item "Formats Manager...". Select the "Vancouver" format; click on the "+" in the lower lefthand corner of the dialog box. Type the name "Vancouver/abstract/pdf" in the popup window that appears. Click "OK".

10. Copy the following text:
a. t. j. d;v:p-. ¬$Abstract: $b ¬$<A HREF="Attachments/$h$">download pdf</A>$
into the "Primary Order" textbox.

11. Repeat steps 9 and 10 for another format with the name "Vancouver/links" and using the text:
a. t. j. d;v:p-. ¬`<A HREF="$BEGet?DB=`!`&Format=Vancouver/abstract/pdf&SQLQuery=uniqueID=`@`">abstract</A>` $<A HREF="Attachments/$h$">download pdf</A>$
for the Primary Order textbox.

12. Close your database within Bookends, but keep Bookends running. This is necessary as Bookends cannot serve an open database.

13. Open the file "BE.html" in the folder ~/Library/Applications Support/Bookends/Server/ in a text editor or an html editor. Find and replace "AllPurposeServed" with the name of your database (from step 6 above). Save the file.

14. If you do not know the short name to access your computer over your LAN, open "System Preferences..." under the Apple menu, and click on "Sharing". At the top, your computer name shows up in an editable field, and you will see the text "Computers on your local network can access your computer at: yourComputerName.local". Make note of yourComputerName.

15. In a web browser (on the same computer, or on any other computer on the same LAN), type into the URL field, yourComputerName.local, followed by ":2001/BE.html" (without the quotes). The URL should look have the form yourComputerName.local:2001/BE.html (the 2001 is the port number used by Bookends). Hit "Enter".

16. You should see the BE.html web page on your browser. Save it as a bookmark. Try it out! You can use the same URL on the Safari browser on your iPhone when it is linked by wi-fi to your LAN.

I haven't tried this, but you should be able to extend this to serve your database over the internet, external to your LAN. You will need to have either a static IP, or to use a service such as dyndns.com to create a hostname that points to your dynamic IP. There are also security issues and opening up your firewall(s) to some extent.

Good luck!

Henry
Post Reply