EDI - README.TXT 'Emacs your camera!' Documentation for version 2.7 based on documentation for 2.6. 0. ABOUT This is readme for EDI - Text editor written in Lua for CHDK. It's designed to give your camera possibility to edit text files (especially scripts) directly on camera. **** ATTENTION! **** Since version 2.6 EDI uses textbox() function which is currently aviable in experimental branch. Because of that 'new file' and 'Save as...' options can not be used in other branches (stable 1.0 and reyalp-flt as well). If 'new file' or 'Save as...' option is used in these branches an error occurs! While none of above functions is used, EDI 2.7 should work (althought it was not tested). WARNING! I've tested this script only on SX130IS with no problems. A few users were able to use it on other CHDK-supported cameras. Nevertheless THERE IS NO VARRANTY FOR THIS SOFTWARE, IT'S FREE AND MIGHT BE BUGGY. It's rather not likely, but still possible that it could damage file you are editing or even filesystem on SD card. This never happened, but who knows. USE THIS SCRIPT ON YOUR OWN RISK. SOME PARTS OF THIS DOCUMENTATION MIGHT BE OUTDATED OR CONTAIN BUGS. 1. INSTALLATION Just paste the file EDI.LUA on your SD card. EDI is instaled and ready to use! 2. USAGE 2.1 Run To use EDI you have to run script EDI. Read more about runing scripts on CHDK wikia or forum. 2.2 Select a file - filebrowser Once you run the script you'll see a file browser. You have to chose a file you want to edit. Just navigate using UP/DOWN and SET buttons as in normal CHDK filebrowser. If you selected a directory pressing SET will take you inside it. Special directory ".." moves you into the parent directory. If you press SET button with file selected this file will be opened. 2.3 EDI When you have selected the file and pressed SET this file is opened. You can see a screen like this: ---------- EDI | FILENAME [S] ---------- newline< ( ) [ ] { } < > , ' : ; _ + - / \ = @ ! ? # " . ~ & * | ^ ` ASCII code --------- SELECT-[1,1] ---------- You can select the character you need by pressing LEFT/UP/RIGHT/DOWN buttons. When you press SET you'll return to the editor and selected character will appear in cursor place. You can select: - newline - breaks line in cursor place (just like ENTER on PC keyboard) - ( [ @ $... etc. - insert selected character - ASCII code - you can load a character by it's ASCII code. If this option is active you'll be taken to the ASCII selection menu. You can also press DISP key again and go to the INSERT FUNCTION MENU, which is described below. If you want to leave INSERT MENU just press DISP (INSERT FUNCTION MENU will be opened) and DISP once again. 2.3.3 INSERT FUNCTION MENU If you are in INSERT menu you can press DISP again and go to the INSERT FUNCTION MENU as described above. In this menu you'll see a screen like this: -------- Insert function -------- >print < shoot is_key if then end sleep wait_click function @title @param @default --------- SELECT-[1,1] ---------- You can select a word that will be inserted in cursor place just like character. It's usefull especially for scripts, so the most common functions are present here. Probably the list will be greater in future. Remember - this only inserts a selected word, there is no checking if this make any sens. If you like to leave INSERT FUNCTION MENU without inserting anything just press DISP. 2.3.4 FILE MENU This menu is aviable everytime in all modes by pressing MENU key. In this file you can select items: - Save - saves changes to file. Previous saved version is copied to backup file which has the same name but with .BAK extension. Note: if you save file two times the backup will contain previous saved version, NOT oryginal file! - Save and exit - just save as above and exit the editor - Exit (no save!) - exit without any saves! This can be also achieved by SHOOT_FULL - Clear whole file - removes whole content of file however, it will be done only on editor, not physical file untill you save changes. You can leave FILE MENU by pressing DISP or MENU key. 3. PARAMETERS You can set various parameters like in other scripts for CHDK. Read more how to set parameters for scripts on CHDK wikia or forum. Parameters that can be set for EDI: - Newline (1=Windows 2=Unix) - set which style of newline coding should be used. Usually Unix uses one character (\n; "newline") to describe newline and Windows uses two characters (\r\n; "cariage return" and "newline"). If you set 1 EDI will paste both characters while "newline" is inserted. If you set 2 it will use only "newline" character. Note: this doesn't change existing newline characters! - Editor height -. |- as named. - Editor width -' 4. AUTHOR, LICENSE Author: Pawel Tokarz aka Outslider License: GPL v3+ as well as LGPL v3+ Contact: write all you want to write on CHDK forum. http://chdk.setepontos.com/index.php?topic=6465.0 NO WARANTY! THIS SCRIPT CAN DO ANYTHING WITH YOUR CAMERA, MIGHT DELETE A FILE, MIGHT DAMAGE SD CARD AND MIGHT CAUSE YOUR CAMERA FLY AWAY AND EXPLODE AS WELL. This was never observed and it's unlikely, but still possible... USE ON YOUR OWN RISK!