5.14. File Names

5.14. File Names

The names of files used in interscript documents should be relative pathnames obeying the Unix convention, even on other platforms such as NT or the Mac: separate components with a / character. Don't use silly characters such as : in components names.

I plan to upgrade the file naming convention to use URLs with 'interscript' addressing scheme, in which the 'network' component is treated as a logical location identifier; the client will map these locations to physical ones.

The current version of interscript does not provide this mechanism yet. Instead, there are four command line options:

  --weaver-prefix=nativepath
  --tangler-prefix=nativebspath
  --weaver-directory=relpath
  --tangler-directory=relpath
where the nativepath is a prefix in native operating system format, and the relpath is a prefix in Unix format. For an interscript file given as 'basename', the resulting actual filename is:
  abspath+ (string.join(string.split(relpath+basename,'/').os.sep)
Note that if you use 'a' and 'b' as the prefix and directory a filename base will be called 'abbase': no separators are put between the prefix, directory and base. Here's an example for Windows:
  python iscr.py                        \
    --tangler-prefix=c:\mydevelopment\  \
    --tangler-directory=code/           \
    example.pak

Note that interscript creates directories automatically for the 'Unix' part of the filename, but _not_ the native prefix. Thus in the example 'c:\mydevelopment' must exist, whereas 'code'is created within it automatically. If example.pak tangles a file 'package/module.py', then 'package' is also created automatically.