[Refdb-users] Curious refdbc -C "getref ..." behaviour
Status: Beta
                
                Brought to you by:
                
                    mhoenicka
                    
                
            | 
      
      
      From: David N. <dav...@bi...> - 2004-03-28 10:37:22
      
     | 
| I have observed some curious behaviour regarding getref when used with refdbc's batch mode. In summary: - Using getref to output to file in refdbc interactive mode: works for all tried formats (scrn, ris, risx, html, xhtml). - Using getref to output to file in refdbc batch mode: works only for ris format, fails with scrn, risx, html, xhtml. --------------------------------------------------------------------------------------------- Demonstrating the problem: Let's output a reference to screen: These all work: refdbc -C "getref -t scrn :ID:=7" refdbc -C "getref -t risx :ID:=7" refdbc -C "getref -t ris :ID:=7" refdbc -C "getref -t html :ID:=7" refdbc -C "getref -t xhtml :ID:=7" Now, let's output to file: This works: refdbc -C "getref -o foo.ris -t ris :ID:=7" These do not work: refdbc -C "getref -o foo.txt -t scrn :ID:=7" refdbc -C "getref -o foo.xml -t risx :ID:=7" refdbc -C "getref -o foo.html -t html :ID:=7" refdbc -C "getref -o foo.xhtml -t xhtml :ID:=7" What is written to the file in each failed case is the following text: ........................ select failed ........................ Let's use refdbc's interactive mode to make sure it's a problem with the batch mode: These all work: refdbc: getref -o foo.txt -t scrn ":ID:=7" refdbc: getref -o foo.xml -t risx ":ID:=7" refdbc: getref -o foo.ris -t ris ":ID:=7" refdbc: getref -o foo.html -t html ":ID:=7" refdbc: getref -o foo.xhtml -t xhtml ":ID:=7" --------------------------------------------------------------------------------------------- Workaround: The workaround is obvious: use ris format when scripting, work in interactive mode if using other formats. This, however, limits the use of refdbc in scripting -- one of the stated design goals of refdb. |