sorting this into a database

Jan Schenkel janschenkel at yahoo.com
Thu Nov 27 06:42:42 EST 2003


--- "Dr. Bob Hartley" <bob at armbase.com> wrote:
> Hi All.
> 
> I'm new here and to programming and about to buy
> runtime revolution.
> 
> I wish to create a bibliography database that can
> have input from files 
> like this...... Where %a = author field etc etc see
> below.
> 
> Also the input would be from different apps and
> therefore there would have 
> to be a choice of input script.
> 
> Can runrev do this??
> 
> Cheers
> Bob
> 
> 
> example fields
> 
> %0 Journal Article
> %A Abbi, S.
> %A Ueda, H.
> %A Christopher, R.
> %A Guan, J. L.
> %D 2000
> %T Inhibition of cell cycle progression, cell
> spreading and migration by 
> FIP200, a protein inhibitor for FAK
> %J Mol. Biol. Cell
> %V 11
> %P 2067
> %! Inhibition of cell cycle progression, cell
> spreading and migration by 
> FIP200, a protein inhibitor for FAK
> %Z Molecular Biology of the Cell
> %L Isi:000165525902071
> %U file://localhost/Oslin/Thesis master/pdf's/
> 
> 
> %0 Journal Article
> %A Abercrombie, M
> %A Heaysman, JEM
> %A Karthauser, HM
> %D 1957
> %T Social behaviour of Cells in Tissue Culture
> %J Exprimental Cell Redserch
> %V 13
> %P 276-291
> %! Social behaviour of Cells in Tissue Culture
> %U file://localhost/Oslin/Thesis master/pdf's/
> 
> 

Hi Bob,

Of course Rev can do that, and quite easily too :)
The following script should get you started

answer file "Import which filme?"
if it is not empty then
  put url ("file:" & it) into tData
  repeat for each line tLine in tData
    switch char 1 to 2 of tLine
    case "%A"
      put char 4 to -1 of tLine & return \
          after tAuthors
      put "tAuthors" into tLastVar
      break
    case "%D"
      put char 4 to -1 of tLine into tYear
      break
    case "%P"
      put char 4 to -1 of tLine into tPages
      break
    -- ...
    -- for each %-code, react appropriately
    -- ...
    default
      -- it didn't start with a %-code
      -- so append the data to the variable
      -- of the previous line
      do ("put return & tLine after" && tLastVar)
      break
    end switch
  end repeat
end if
--

I'm guessing that %0 signals a new publication, so you
would probably save all the collected data from the
variables into a back-end database, empty the
variables, and proceed as planned.

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree


More information about the Use-livecode mailing list