Overview# This is a memo from trying out “py-resourcesync,” a Python library for ResourceSync.
https://github.com/resourcesync/py-resourcesync
Setup# g c p i d y t t p h c y o l - n o r n e s e s e o t h u u t r p t c p e i s s n : y s / n t / c a g l i l t h u b . c o m / r e s o u r c e s y n c / p y - r e s o u r c e s y n c
Execution# resourcelist# First, create the output resource_dir directory. An ex_resource_dir folder will be created in the current directory.
r ! e m s k o d u i r r c e - _ p d i $ r r e = s o " u e r x c _ e r _ e d s i o r u r c e _ d i r "
Next, execute the following. You would modify the generator as needed, but here the sample EgGenerator is used.
f # f m m r r r r r y e s s s o f o _ t . . m r m g a = g e o e d e x r m r n a R n e e e e t e e c s m s r a s r u o y o a _ o a t u _ u t d u t e r g r o i r o ( c e c r r c r ) e n e e s e s = = S = y r y y n a n E " n m c t c g e c y . o . G x ( _ r r g e _ s g e e n m t e s i n e e r n o m e r t a e u p r a a t r m r r o a t d e e e a c r t o a g s t t e t o r t y o a o s r ( a = u d r y M s ) _ 0 r a n y . d , c t c G e i e a e g r _ _ i n _ " d d m e g i i p r e # r r o a n = = r t e C r m t o r h e e r a a s t R t n o a e o g u d s r e r a o c t u i a e a r m s _ _ c p d d e o a i i S r p r r y t p , ) n r c E o g p G r e i n a e t r e a . t o r
As a result, .well_known, capabilitylist.xml, and resourcelist_0000.xml are created in ex_resource_dir/ex_metadata_dir.
< < ? u / x r u m l r l s x < < < l e m r r u / s v t l s s r u e e n : : l r t r x s l m > < < l > s m : n d l r > i l r o s o n s h c c : n s = r a > m = = " e p h d ' " h f a t 1 h t = b t c . t t " i p a 0 t p h l : p ' p : t i / a : t t / b e p y w i n w : = w l c w w / " w i o w w c . t d w . w a e y i . o w p x = n s p w a a " g i e . b m r = t n e i p e ' e a x l l s U m r a i e o T a c m t . u F p h p y c r - s i l l o c 8 . v e i m e ' o e . s / l ? r s c t m i > g . o " e s o m t t s r / a " c g . d h w a e r e t m s l a a / l _ s t - d / e k i s r n r i m o / t s w r e / n e m " / s a > r o p e u / s r 0 o c . u e 9 r l " c i e s s t y _ n 0 c 0 " 0 0 r . e x l m = l " < u / p l " o c > < < ? u / x r u m l r l s x < < < l e m r r u / s v t l s s r u e e n : : l r t r x s l m > < < < l > s m : n d l l r > i l r o a s o n s h a c s : n s = r t > t m = = " e = h m d ' " h f " t o 1 h t = 2 t d h . t t " 0 p > a 0 t p h 2 : 2 s ' p : t 2 / 0 h : t - / 1 = e p 1 w 6 " n w : 1 w - m c w w / - w 1 d o w w 2 . 0 5 d w . w 1 r - : i . o w T e 0 c n s p w 0 s 1 c g i e . 0 o T 9 = t n e : u 0 8 ' e a x 1 r 0 9 U m r a 3 c : 5 T a c m : e 0 a F p h p 4 s 0 2 - s i l 6 y : 1 8 . v e Z n 0 e ' o e . " c 0 3 ? r s c . Z 3 > g . o c o < 5 o m a r / b s r / p g l b c g m a < a e h / e b / s 6 e r t i l t 6 m s a l o m d a / d i c o 6 s t a t > d 1 / e t y > f s r a = 2 i m _ " b t s d r 6 e / i e 2 m " r s c a > / o e p c u 3 / a r a 0 p c 8 . a e e 9 b l " " i i l s l i t e t " n y g l c t i o h s m = t p " . l 2 x e 0 m t " l e " d t = y r " p e 2 e l 0 = = 2 " " 2 a u - p p 1 p " 1 l - i 2 c 1 a T t 0 i 0 o : n 1 / 3 x : m 4 l 6 " Z " changelist# By changing strategy to 1, new_changelist can be created, and by changing it to 2, inc_changelist can be created.
Resourcedump and Changedump# It appears that resourcedump can be created by changing strategy to 3, and changedump by changing it to 4, but I was unable to fully understand the configuration methods for these and they remain unverified.
Summary# This was helpful in investigating implementation methods for ResourceSync.
We hope this serves as a useful reference for others as well.