Re: [greenstone-users] Tool for editing METADATA.XML

From Gavin Spomer
DateMon, 22 Oct 2007 08:03:56 -0700
Subject Re: [greenstone-users] Tool for editing METADATA.XML
Hi Tomas,

Sorry, I took a few days off. Getting stressed out.

Here is a simple find and replace example. You need to type this when
you are NOT in insert mode. This will replace ALL occurrences of the
text "apples" with the text "oranges" for the entire file:

:%s/apples/oranges/g

Hit enter (return) after that. Explanation: The colon (:) means you a=
re
starting a command. The percent (%) means the following command will =
be
applied to all lines in the file. The "s" means you want to do a
substitution which is vi's "find and replace". Then you have the text
you want to replace between /'s and then the text you wish to replace=
it
with followed by another /. The g means replace ALL occurrences on ea=
ch
line.

Let me know if this doesn't make sense. I'll be happy to give you som=
e
more examples.

- Gavin

>>> Tom=C3=A1=C5=A1 Fiala <tomas.fiala@ulib.sk> 10/19/07 12:00 AM >>>
Hi Gavin,

my workstation at work is windows, but our servers are linux so I can=
=20
try to make the replacement there. It would be really nice if you cou=
ld=20
instruct me how to find and replace in vi (i know only basics as :q! =
; u

; o ; :x). I tried it my self but i ware not able to copy the text fr=
om=20
the source.txt file (where i have the data i want to add to=20
metadata.xml) and paste it in metadata.xml search & replace function =
(i=20
don=CC=81t want to rewrite it, because it is too long).=20

Many thanks for your help.

Sincerely,

Tomas

Gavin Spomer wrote / nap=C3=ADsal(a):
> Ah, I was under the impression your Greenstone Client and Server we=
re
> both on Windows. If you have access to a Linux machine of some sort
you
> can use the vi editor. I can instruct you how to do "find and repla=
ce"
> with vi.
>
> Again, any typo, no matter how small, might make Greenstone choke.
>
> - Gavin
>
> =20
>>>> <tomas.fiala@ulib.sk> 10/18/07 11:08 AM >>>
>>>> =20
>
> Maybe it would be better doing it with some commands under LINUX.
>
> Sincerely,
>
> Tomas
>
>
>
> On =C5=A0tv, Okt=C3=B3ber 18, 2007 3:04 pm, Arthur R. Belanger wrot=
e:
> =20
>> Sometimes wordpad works better. I have not tried it as I don't ru=
n
>> =20
> gsdl
> =20
>> on a pc.
>>
>> Tom=C3=A1=C5=A1 Fiala wrote:
>> =20
>>> Hello all,
>>>
>>> does anyone know a software which can edit metadata.xml ? I tried=
to
>>> edit it in notepad, but after it greenstone writes "could not par=
se
>>> metadata.xml."
>>>
>>> Thanks for any suggestions !
>>>
>>> Sincerely,
>>>
>>> Tomas Fiala
>>>
>>>
>>>
>>> =20
>
---------------------------------------------------------------------=
---
> =20
>>> _______________________________________________
>>> greenstone-users mailing list
>>> greenstone-users@list.scms.waikato.ac.nz
>>> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>>> =20
>> --
>> Arthur Belanger
>> Medical Library System Manager
>> ITS Academic Media & Technology
>> Yale University
>> PO Box 208065
>> New Haven, CT 06520-8065
>>
>> (203) 785-6928
>> (203) 737-2859, fax
>>
>> mailto:Arthur.Belanger@Yale.Edu
>> http://www.yale.edu/its/about/amt
>> http://info.med.yale.edu/library
>>
>>
>> =20
>
>
>
>
> =20
>
---------------------------------------------------------------------=
---
>
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
> =20