Script Library: 1247 scripts
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Archive version of: indexer.r ... version: 2 ... crazyaxe 24-Aug-2009

Amendment note: now you can use for Rebsite index.r || Publicly available? Yes

REBOL [ 
 Title: "Indexer"
 Author: "Massimiliano Vessi"
 Email: maxint@tiscali.it
 Date: 24-Aug-2009
 version: 2.0.1
 file: %indexer.r
 Purpose: {"Add to index.r all the files and directory of the current directory"}
   
 ;following data are for www.rebol.org library
 ;you can find a lot of rebol script there
 library: [ 
           level: 'beginner 
           platform: 'all 
           type: [tutorial tool] 
           domain: [ file-handling files parse sdk text-processing user-interface ui visualization ] 
           tested-under: [windows linux] 
           support: none 
           license: [gpl] 
           see-also: none 
          ] 
]

;edit varl with your data

var1: {REBOL [Title: ^"Local Index^" 
Type: 'index 
Author: "Massimiliano Vessi"
Email: maxint@tiscali.it
Version: 1.0.0
Date: }

append var1 to-string now

append var1 {]

title: ^"Local Files^" 
file ^"Contact^" maxint@tiscali.it

}




foreach file read %. [
    info: info? file
    if dir? file [ append var1 "folder "
    				append var1 "^""
    				trim/all  file ;remove all spaces frome file name, it's a problem with view
    				append var1 file
    				append var1 "^" %"
    				
    				append var1 file
    				append var1 "^/ ^/"
				]
     if not (dir? file) [ append var1 "file "
    				append var1 "^""
    				append var1 file
    				append var1 "^" %"
    				trim/all  file ;remove all spaces frome file name, it's a problem with view
    				append var1 file
    				append var1 "^/ ^/"
				]    				
]

write %index.r   var1