INTERNET DRAFT Jason Robinson Title: draft-kitcad2-kp2-file-2004.txt Kitchen Pages, computer software. Expires: December 2004 October 2004 KP2 File= conversions or end use applications Status of this Draft Document This document may not be modified, and derivative works of it may *not* be created. This document may only be posted in an Internet-Draft for information uses. * denotes that the word of 'not' in the statement, above; and these two lines are to be removed on final publication. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. The text found in this document when completed will be translated into a web HTML format for web browser viewing - draft is in text. Abstract The "KitCAD" software package is designed to be many parts acting together or seperatly as one larger package to process large amounts of data in real time environments, or as seperate packages to suit a users data output requirements. This document defines the base framework of KitCAD on a single use basis and multiple use basis. Subsequent and previous documents leverage this base framework to extend the environments encounted and managed. The ultimate goal of this framework is to reuse entered information while retaining the function of such entered information. While this document presents technical details, it is not yet intended as a definitive or final specification, rather, the intent is to define a framework and sufficient technical detail to promote experimental deployment with a view to evolving into a comprehensive directive standard for KitCAD +v2 compliant softwares. Table of Contents 1. References 1.1 Windows References. 1.2 Linux and other path References. 1.3 Apple References, file type conversion table 1.4 Extra Notes 2. Acknowledgments Appendix A - Author's Address 1. References In the Uniform Resource Identifier (URI) definition [URI] there is a field, called "scheme", to identify the type of resource and access method. Scheme Name Description Reference ----------- ----------------------------------------- --------- ftp File Transfer Protocol [URI] http Hypertext Transfer Protocol [URI] gopher The Gopher Protocol [URI] mailto Electronic mail address [MAILTO] news USENET news [URI] nntp USENET news using NNTP access [URI] telnet Reference to interactive sessions [URI] wais Wide Area Information Servers [URI] file Host-specific file names [URI] prospero Prospero Directory Service [URI] KitCAD2 KP2 INI File command uses a primitave form of these standards within consideration. Some conversions may be possible in translating this information in a raw format to URI formats. This section is extra information in relation to these conversions and is not intended as a guide to other protocols - but more over the use of the File= line found in KP2 file formats. KitCAD2 uses a local version of file, therefor it should be constructed using the file-URI method with care taken for file URI users. These considerations are listed in the following sub sections of: 1.1 Windows References. 1.2 Linux and other path References. 1.3 Apple References, file type conversion table 1.1 Windows References. KP2 files use the [winINI] file format which is capable of reading [uft] formated files. Other formats depend on Windows native [NetBios] [URI] [FILE] formats. example: 'c:\Program Files\file.txt' shown as 'File=c:\Program Files\file.txt' expanded to: 'File=c:\Program Files\file.txt' The URI upon conversion is converted using a lecimal method of phrase, so the result 'fragement' if used in web enabled applications must take note of these conversions, as noted below in other systems. Comment lines can be used with ';' symbols by default [winINI] standards. While not in wide use notice should be taken to include [NetBios] paths where possible to aviod confusion when implementating software. example: 'C:\Program Files\file.txt' should be: '\\HOME\C:\Program Files\file.txt' And aviod: '.\file.txt' (use of relative path) The above format is better for networked [WINDOWS] computers because of the following protocol structure and lecimial processing of appending a '\' symbol to the begining of paths syntax, with default of '\' for paths syntax terminators: tcp/ip |netbios | netbeiu | localhost | | drive/share | | | path | | | | file.txt | | | | | file:/ / / / /file.txt file://example.com/share/path/file.txt file:///drive/path/file.txt The URI above may be processed by browsers and other lecimial processors. KP2 files are processed to include a relative path at KitCAD2 runtime if one should be omitted. KPD files are an exception to this with AddOns= being processed that include a relative path name in KitCAD1 runtime. 1.2 Linux and other path References. To support native [NetBios] [URI] [FILE] formats on [LINUX] it is advised that [SAMBA] be enabled. Mapping a [WIN] Windows PC to a Linux [LINUX] can be used if needed to transport files from [FAT] [NTFS] onto [LINUX] [SAMBA] drive mounts. The CREATE-DIRECTORY and HOME-DIRECTORY commands take a directory as an argument. In NFILE commands, a directory is represented by a string that names the directory. In most cases this string is in the syntax native to the server host. However in some cases the native format is modified somewhat to clarify that the string names a directory, and not a file. For example, a directory on UNIX is represented by "/usr/", not "/usr". The above format is better for networked [LINUX] computers because of the following protocol structure and lecimial processing of appending '/' symbols to directory paths: tcp/ip |netbios |drive/share | path | | file.txt | | | file:/ / /file.txt file:/drive/path/file.txt The URI above may be processed by browsers and other lecimial processors. Here are some examples of directory pathnames for different server hosts: Server Host Example of Directory Pathname ------------------------------------------------------------ MSDos c:\Program Files\file.txt MSDos5+ \c\Program Files\file.txt WIN \c\Program Files\file.txt WIN 32 \\c:\Program Files\file.txt WIN SHARE \\\c\Program Files\file.txt LINUX c/Program Files/file.txt UNIX c/Program Files/file.txt TOPS-20 c:file.txt VMS c:[Program Files]file.txt Symbolics LMFS c>Program Files>file.txt Linux and Unix users should note that the inital version of the kernal does not support networked use by default so a path of the following is a standard implementation that is supported by this document. FILE:/ c:/Program Files/file.txt FILE:// c:/Program Files/file.txt The above, Should be equal to (remove white spaces) the following path on a win32 local system FILE:// /c:/Program Files/file.txt FILE:\\ \c:\Program Files\file.txt Alternate strings to the URI above are FILE:\\ \c:\Progra~1\file.txt FILE:\\ \c:\Program%20Files\file.txt FILE:\\ c:\Progra~1\file.txt FILE:\\ c:\Program%20Files\file.txt FILE:\\ c\Progra~1\file.txt FILE:\\ c\Program%20Files\file.txt FILE:\\ \Progra~1\file.txt FILE:\\ \Program%20Files\file.txt Special note to the '~'|' '|':'|'|'|'\' symbols as an Unsafe characters; with SPACE ' ' being the only escaped character. Do not escape code '~' or ':' symbols; but omit if needed. The extra '\' appended to the begining of each path resolves [WINDOWS] file systems to the root path. As '\c\' is equal to 'c:\' The reason for the declared un-safe characters relates to incorrect path errors, security issues, and browser implementations. Many IExplorer browser address bars do not encode some un-safe characters when matched to a file system. Mozilla and Geko browsers sometimes do encode browser address bars as URI formatted strings. While it should be noted here that use of un-safe characters may allow the processing of the 'relative' path to that can be broken or incorrect. The same precautions should be noted for '.'|'..' path statements because the target file could break links. These too should be omitted when needed. The use of such path indicates a 'common' location of the inital KP2 file. An example would be saving a file at 'c:\windows\desktop\text.kp2' with file paths of '..\..\' would convert the path value to 'c:\' A second example of '.' resolves to the current path file at 'c:\windows\desktop\text.kp2' with file paths of '.\' would convert the path value to 'c:\windows\desktop\' Use escape codes to make conversions as performed for whitespaces and any un-safe pathnames to [UFT-8] character set. Escaped path names, the '%' symbol, and the scheme authority components of the URI are not supported by KitCAD2 file paths. Care should be taken into consideration for %5C use for '\' symbols. By default KitCAD2 supports [winINI] Windows Ini file formats, which includes the file or memory access methods native to inifiles.hpp or other internal processes. File Path should conform to [UNC] UNC 8.3 [WIN] win32 [FAT] long file names. ------------------------------------------------------------ 1.3 Apple References, file type conversion table The Uniform Resource Identifier (URI) definition [URI] for apple commputers may be phrased differently to others. For an example '#' or ':' symbols may have alternate use on apple browsers. Special note should be taken when using file path names that may not support native [NetBios] [URI] [FILE] formats. Mapping table for MacBinary and file name extension conversion Format/s: The special code **** indicates a wild card for creator or type. <4 char Mac creator> <4 char Mac type> <1-4 letter DOS extension> ------------------------------------------------------------ **** pZIP zip **** ZIVU zip SIT! BINA zip pZIP pZIP zip mdos BINA exe CWIE TEXT h CWIE TEXT cpp ttxt TEXT txt MOSS TEXT htm MOSS TEXT html **** TEXT txt MSWD TEXT txt pgpM TEXT asc pgpK TEXT asc DAD2 drw2 cvs MSWD RTF rtf GKON ICO ico **** GIFf gif JVWR GIFf gif 8BIM GIFf gif **** JPEG jpg JVWR JPEG jpg 8BIM JPEG jpg JVWR JPEG jpg GKON WMF wmf CARO PDF pdf ------------------------------------------------------------ Mapping table for MacBinary and file name extension conversion which are not pre-defined that are converted as Format/s: The special code **** indicates a wild card for creator or type. <4 char Mac creator> <4 char Mac type> <1-4 letter DOS extension> ------------------------------------------------------------ **** **** cab **** **** bmp **** TEXT * ttxt TEXT kp3 ttxt TEXT kp2 ttxt TEXT kpd ttxt TEXT dat ttxt TEXT 3d ttxt TEXT kpr ttxt TEXT kpi ttxt TEXT kps ttxt TEXT kpm ttxt TEXT kpt ttxt TEXT kptg ttxt TEXT kpti ttxt TEXT vol **** TEXT txt ttxt TEXT txt ttxt CARD csv ttxt CARD vcf **** TEXT cvs **** TEXT inf **** TEXT ini **** TEXT iso **** TEXT glu **** TEXT iof **** DXF dxf **** TEXT dfm **** TEXT asc **** TEXT casc **** TEXT qlt **** TEXT pts **** TEXT lst GKON WMF emf MSWD RTF rtf MS** BINA hlp ttxt TEXT pdf CARO PDF pdf **** RPT rpt **** BDE cfg MS** ODBC dns MS** ODBC dbf MS** SQL dgy MS** SQL qrt MS** SQL qry mdos TEXT reg mdos TEXT bat mdos BINA bpl mdos BINA dll mdos BINA ocx mdos BINA tbl mdos BINA lib mdos BINA drv ------------------------------------------------------------ To Be Completed.. 1.4 Extra Notes To Be Completed.. ------------------------------------------------------------ ------------------------------------------------------------ 2. Acknowledgments The author wishes to thank everybody who contributes for their valuable suggestions and constructive criticism. Author's Address Jason Robinson http://www.kitchenpages.com/feedback.html Please send comments to the author at the above address. This Referance, if any; will be: kitcad2-kp2-file-2004.txt Next Referance, if any; will be: draft-kitcad3-2004.txt Support other Referance, if any: draft-kitcad2-2004.txt Previous Referance, if any; was: draft-kitcad1-2004.txt RCS: $Id: draft-kitcad-2004.txt,v 1.0 2004/10/15 00:00:01 markd Exp $