ABOUT REBOL/VIEW INDEX FILES ---------------------------- Date: 30-Aug-2000 1. What are Index files? Index files are directories. They are used to publish your REBOL test files to other people on the net. Index files contain the names of scripts, html pages, text files, images, and links to other directories that you want to publish. Index files will be cached locally on your system. This allows you to continue to use files that you ran before, even when you are not on-line. For example, click on the REBoDEX icon, then go off-line and try again. After a brief check for the network, the REBoDEX will run. 2. How do I create an Index? You can create an index file with any text editor then upload it to any web site. Index files can also be created with a REBOL script. 3. What is the format of the file? Index files use standard REBOL format. Here is an example: REBOL [Title: "Test Site"] icon "Big Test" %bigtest.r This will publish the icon "Big Test" to the net. When someone clicks on it, your bigtest.r file will be downloaded and run. Don't make the icon name too long or it will wrap. If you want to provide a custom graphic for the icon, you can write: icon "Big Test" %bigtest.r image %big.jpg To publish web pages, images, or text: icon "Docs" %docs.html icon "Image" %photo.jpg icon "Readme" %readme.txt Clicking on "Docs" will launch the web browser. The photo and the text will be displayed directly in REBOL View. You can also use URLs instead of files: icon "Script" http://www.example.com/script.r icon "Docs" http://www.example.com/docs.html Don't put a % in front of URLs. 4. Can I publish a link to another index or site? Yes. Just provide the word DIR along with the name of the index file. For example: icon "Games" dir %games.r This file can be in the same directory as index.r (allowing you to have multiple published indices from a single physical directory) or it can be in some other directory. To link to another site: icon "Tests" dir http://www.example.com/tests.r 5. How can I test the index before publishing it? Upload the file to your site then run REBOL/View and type the URL for the index.r file into the field at the top of the panel. Your icons should appear if you created the file correctly. 6. How do I add the index to the main REBOL list? In REBOL/View, click on the "Add a Site" icon. It is found in the REB/Sites directory. Fill in the fields. The script will verify that it can fetch your index file. It will then submit the script to be posted. It should be available in just seconds. 7. Can I add my own custom backdrop behind my icons? Yes. That will be available. In the index file, you would provide the name of the backdrop image: backdrop %drop.jpg 8. What is the Icon info text used for? It will be shown at the bottom of the screen when your mouse moves over an Icon. This can be used to give users a better idea for what the icon does when clicked. (Not yet available.) icon %"Big Test" %bigtest.r info "Runs the entire test suite." 9. How can I publish all my files? You can write a REBOL script (such as the one below) to create your index file: REBOL [] out: copy [REBOL []] foreach file load %./ [repend out ['icon file]] save %index.r out You can upload it with FTP to your website by adding the line: save ftp://user:pass@example.com/index.r out 10. Can I supply index files local to my system? Yes. The Local icon at the top level of REBOL/View does that. To determine where your index.r file should be located, click on the Local icon. At the bottom of the screen, you will see an error message telling you where REBOL looked for the file. Copy your index file to that location.