Gnudap
 
Home
Documentation
Download
Credits
 

GNUdap User Manual

Gnudap is a shell interface to the "Chic mp10".

Usage

Run the script chic.sh, this will run an ocaml toplevel with gnudap modules already opened. The script uses ledit (provided), if it doesn't work change chic.sh. Before executing the script you need to plug in the chic mp10.

Commands

Currently supported commands:

dir
put
get
delete
format
move
rename
change_title
change_kind
exit_dap


Command Usage Description
dir dir ();; Shows the list of files present on the device. The output is cached. For each file the title, the kind of the file and the dimension are indicated. If the kind is "MP3" the file is playable for the device.
put put [options list] <"file"|"dir">;; Puts file or all files in dir on the device. Before putting a file it checks if there is enough space. Available options are:

"-r": recursive subdirectories
"-l": dereference symbolic links

Options must be enclosed between [ ] (since they form an ocaml list) and separeted by ";" if no option is given use [ ] wich stands for the empty list.

Examples:

put ["-r";"-l"] "/home/";; recursively put all files in /home and in its subdirectories and dereferece symbolic links
 
put [ ] "/home/";; put only the regular files in /home
 
put ["-r";"-l"] "foo.bar";; put the file named foo.bar


The file kind is estabilished by the extension, if the file extension is "mp3" it is put as a playable file else as a data file.
get get <n> <"path">;; Gets the nth file on the device and copies it in path. The number n is the number shown in the "dir ();;" output. If "path" names a directory, the file is copied in it with the title as filename, else the file is named as in path.

Esamples:

get 1 "/home/";; copies the first file on the device to /home
get 1 "/home/foo.bar";; copies the first file on the device to /home naming it foo.bar.

Mind that the put, the delete and the format operations change the number corresponding to a given file, so after these operations you will need to redo "dir ();;" if you want to know the exact number. Example:

if you have on the device

0. foomusic MP3 3 Mb
1. newmusic MP3 2 Mb
2. datatext DAT 1 Mb

and you do

delete 0;;
get 1 "/home/";;

you will copy in /home the file datatext and not newmusic.
delete delete <n> ;; Deletes the nth file on the device. The number n is the number shown in the "dir ();;" output. Example:

delete 2;;

Mind that the put, the delete and the format operations change the number corresponding to a given file, so after these operations you need to redo "dir ();;" if you want to know the exact number. Example:

if you have on the device

0. foomusic MP3 3 Mb
1. newmusic MP3 2 Mb
2. datatext DAT 1 Mb

and you do

delete 0;;
get 1 "/home/";;

you will copy in /home the file datatext and not newmusic.
format format ();; It formats the whole device memory. After this operation all files present on the device are deleted. Mind that the put, the delete and the format operations change the number corresponding to a given file, so after these operations you need to redo "dir ();;" if you want to know the exact number. Example:

if you have on the device

0. foomusic foo MP3 3 Mb
1. newmusic new MP3 2 Mb
2. datatext dt DAT 1 Mb

and you do

delete 0;;
get 1 \"/home/\";;

you will copy in /home the file datatext and not newmusic.
move move <n> <newpos> ;; Changes the position in the filelist of nth file to newpos. Example:

if you have on the device

0. foomusic foo MP3 3 Mb
1. newmusic new MP3 2 Mb
2. datatext dt DAT 1 Mb

and you do

move 2 0;;

you will have on the device

0. datatext dt DAT 1 Mb
1. foomusic foo MP3 3 Mb
2. newmusic new MP3 2 Mb.
rename
change_title
change_kind
rename n newtitle newkind;;
change_title n newtitle;;
change_kind n newkind;;
Change the title to newtitle (change_title) or the kind to newkind (change_kind) or both (rename) of the nth file.
exit_dap exit_dap ();; Closes the device and exits.