{"action":"created","issue":{"url":"https://api.github.com/repos/scriptotek/lokar/issues/2","repository_url":"https://api.github.com/repos/scriptotek/lokar","labels_url":"https://api.github.com/repos/scriptotek/lokar/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/scriptotek/lokar/issues/2/comments","events_url":"https://api.github.com/repos/scriptotek/lokar/issues/2/events","html_url":"https://github.com/scriptotek/lokar/issues/2","id":153446431,"number":2,"title":"Testing","user":{"login":"danmichaelo","id":434495,"avatar_url":"https://avatars.githubusercontent.com/u/434495?v=3","gravatar_id":"","url":"https://api.github.com/users/danmichaelo","html_url":"https://github.com/danmichaelo","followers_url":"https://api.github.com/users/danmichaelo/followers","following_url":"https://api.github.com/users/danmichaelo/following{/other_user}","gists_url":"https://api.github.com/users/danmichaelo/gists{/gist_id}","starred_url":"https://api.github.com/users/danmichaelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danmichaelo/subscriptions","organizations_url":"https://api.github.com/users/danmichaelo/orgs","repos_url":"https://api.github.com/users/danmichaelo/repos","events_url":"https://api.github.com/users/danmichaelo/events{/privacy}","received_events_url":"https://api.github.com/users/danmichaelo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-06T13:04:28Z","updated_at":"2016-05-06T15:34:59Z","closed_at":null,"body":"## ✓ Test 1: Enkel test\r\n\r\nEks.: \"Algeoppblomstring\" → \"Algeoppblomstringer\"\r\n\r\n```\r\n$ python lokar.py \"Algeoppblomstring\" \"Algeoppblomstringer\"\r\n\r\n[2016-05-06 15:03:40 INFO] ============================ Starter jobb ============================\r\n[2016-05-06 15:03:40 INFO] [ Miljø: nz_sandbox ] [ Vokabular: noubomn ] [ Bruker: meg] [ Tørrkjøring? NEI ]\r\n[2016-05-06 15:03:40 INFO] Termen \"Algeoppblomstring\" ble autorisert med ID 012754\r\n[2016-05-06 15:03:40 INFO] Erstatter \"Algeoppblomstring\" med \"Algeoppblomstringer\" i $a og $x i 650-felt som har $2 noubomn\r\n[2016-05-06 15:03:44 INFO] [  1/ 23] 999823606304702201\r\n[2016-05-06 15:03:46 INFO] [  2/ 23] 999011849184702201\r\n[2016-05-06 15:03:48 INFO] [  3/ 23] 990416769984702201\r\n[2016-05-06 15:03:51 INFO] [  4/ 23] 998030224684702201\r\n[2016-05-06 15:03:53 INFO] [  5/ 23] 999101333524702201\r\n[2016-05-06 15:03:55 INFO] [  6/ 23] 999523421624702201\r\n[2016-05-06 15:03:58 INFO] [  7/ 23] 990408050694702201\r\n[2016-05-06 15:03:00 INFO] [  8/ 23] 990318751144702201\r\n[2016-05-06 15:03:02 INFO] [  9/ 23] 990122947644702201\r\n[2016-05-06 15:03:05 INFO] [ 10/ 23] 999203769164702201\r\n[2016-05-06 15:03:07 INFO] [ 11/ 23] 998411258724702201\r\n[2016-05-06 15:03:10 INFO] [ 12/ 23] 991501360304702201\r\n[2016-05-06 15:03:12 INFO] [ 13/ 23] 999002459724702201\r\n[2016-05-06 15:03:14 INFO] [ 14/ 23] 999008014764702201\r\n[2016-05-06 15:03:17 INFO] [ 15/ 23] 999201587904702201\r\n[2016-05-06 15:03:19 INFO] [ 16/ 23] 990200201714702201\r\n[2016-05-06 15:03:21 INFO] [ 17/ 23] 997540281274702201\r\n[2016-05-06 15:03:23 INFO] [ 18/ 23] 999411853624702201\r\n[2016-05-06 15:03:25 INFO] [ 19/ 23] 998901137184702201\r\n[2016-05-06 15:03:27 INFO] [ 20/ 23] 998030845954702201\r\n[2016-05-06 15:03:29 INFO] [ 21/ 23] 999515142704702201\r\n[2016-05-06 15:03:31 INFO] [ 22/ 23] 999004375454702201\r\n[2016-05-06 15:03:33 INFO] [ 23/ 23] 999222161344702201\r\n[2016-05-06 15:03:35 INFO] ============================ Jobb ferdig =============================\r\n```\r\n\r\n```bash\r\nfor f in $(ls | cut -d'.' -f1 | uniq); do\r\n  echo \"$f:\"\r\n  echo '```diff'\r\n  diff \"$f.before.xml\" \"$f.after.xml\" | tail -n +19;\r\n  echo '```'\r\ndone\r\n```\r\n\r\n990122947644702201:\r\n```diff\r\n161c161\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n990200201714702201:\r\n```diff\r\n85c85\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n990318751144702201:\r\n```diff\r\n96c96\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n990408050694702201:\r\n```diff\r\n91c91\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n990416769984702201:\r\n```diff\r\n86c86\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n991501360304702201:\r\n```diff\r\n87c87\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n997540281274702201:\r\n```diff\r\n56c56\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n998030224684702201:\r\n```diff\r\n82c82\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n998030845954702201:\r\n```diff\r\n97c97\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n998411258724702201:\r\n```diff\r\n87c87\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n998901137184702201:\r\n```diff\r\n91c91\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n999002459724702201:\r\n```diff\r\n114c114\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n999004375454702201:\r\n```diff\r\n117c117\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n999008014764702201:\r\n```diff\r\n107c107\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n999011849184702201:\r\n```diff\r\n80c80\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n999101333524702201:\r\n```diff\r\n86c86\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n999201587904702201:\r\n```diff\r\n136c136\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n999203769164702201:\r\n```diff\r\n110c110\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n999222161344702201:\r\n```diff\r\n102c102\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n999411853624702201:\r\n```diff\r\n103c103\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n999515142704702201:\r\n```diff\r\n118c118\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n999523421624702201:\r\n```diff\r\n122c122\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```\r\n999823606304702201:\r\n```diff\r\n97c97\r\n<       <subfield code=\"a\">Algeoppblomstring</subfield>\r\n---\r\n>       <subfield code=\"a\">Algeoppblomstringer</subfield>\r\n```"},"comment":{"url":"https://api.github.com/repos/scriptotek/lokar/issues/comments/217476570","html_url":"https://github.com/scriptotek/lokar/issues/2#issuecomment-217476570","issue_url":"https://api.github.com/repos/scriptotek/lokar/issues/2","id":217476570,"user":{"login":"danmichaelo","id":434495,"avatar_url":"https://avatars.githubusercontent.com/u/434495?v=3","gravatar_id":"","url":"https://api.github.com/users/danmichaelo","html_url":"https://github.com/danmichaelo","followers_url":"https://api.github.com/users/danmichaelo/followers","following_url":"https://api.github.com/users/danmichaelo/following{/other_user}","gists_url":"https://api.github.com/users/danmichaelo/gists{/gist_id}","starred_url":"https://api.github.com/users/danmichaelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danmichaelo/subscriptions","organizations_url":"https://api.github.com/users/danmichaelo/orgs","repos_url":"https://api.github.com/users/danmichaelo/repos","events_url":"https://api.github.com/users/danmichaelo/events{/privacy}","received_events_url":"https://api.github.com/users/danmichaelo/received_events","type":"User","site_admin":false},"created_at":"2016-05-06T15:34:59Z","updated_at":"2016-05-06T15:34:59Z","body":"## Test5: Den nye termen finnes allerede på poster\r\n\r\n❌  Feilet å luke ut duplikater for 991003081634702201\r\n\r\n```\r\n$ python lokar.py forskningsinstitutter forskningsinstitusjoner\r\n[2016-05-06 17:05:54 INFO] ============================ Starter jobb ============================\r\n[2016-05-06 17:05:54 INFO] [ Miljø: nz_sandbox ] [ Vokabular: noubomn ] [ Bruker: meg] [ Tørrkjøring? NEI ]\r\n[2016-05-06 17:05:55 INFO] Termen \"Forskningsinstitutter\" ble autorisert med ID 003428\r\n[2016-05-06 17:05:55 INFO] Termen \"Forskningsinstitusjoner\" ble autorisert med ID 010115\r\n[2016-05-06 17:05:55 INFO] Erstatter \"Forskningsinstitutter\" med \"Forskningsinstitusjoner\" i $a og $x i 650-felt som har $2 noubomn\r\n[2016-05-06 17:05:57 INFO] [  1/ 12] 998222224934702201\r\n[2016-05-06 17:05:59 INFO] [  2/ 12] 990018989224702201\r\n[2016-05-06 17:05:02 INFO] [  3/ 12] 990207326864702201\r\n[2016-05-06 17:05:04 INFO] [  4/ 12] 999805592194702201\r\n[2016-05-06 17:05:05 INFO] [  5/ 12] 991142386264702201\r\n[2016-05-06 17:05:08 INFO] [  6/ 12] 999103317234702201\r\n[2016-05-06 17:05:09 INFO] [  7/ 12] 999609442814702201\r\n[2016-05-06 17:05:12 INFO] [  8/ 12] 999912435874702201\r\n[2016-05-06 17:05:12 INFO] Fjerner duplikat emnefelt: \"650 : Forskningsinstitusjoner\" \r\n[2016-05-06 17:05:14 INFO] [  9/ 12] 998121357414702201\r\n[2016-05-06 17:05:16 INFO] [ 10/ 12] 999912195544702201\r\n[2016-05-06 17:05:18 INFO] [ 11/ 12] 991003081634702201\r\n[2016-05-06 17:05:20 INFO] [ 12/ 12] 999423548694702201\r\n[2016-05-06 17:05:20 INFO] Fjerner duplikat emnefelt: \"650 : Forskningsinstitusjoner\" \r\n[2016-05-06 17:05:22 INFO] ============================ Jobb ferdig =============================\r\n```\r\n\r\n990018989224702201:\r\n```diff\r\n136c136\r\n<       <subfield code=\"a\">Forskningsinstitutter</subfield>\r\n---\r\n>       <subfield code=\"a\">Forskningsinstitusjoner</subfield>\r\n```\r\n990207326864702201:\r\n```diff\r\n68c68\r\n<       <subfield code=\"a\">Forskningsinstitutter</subfield>\r\n---\r\n>       <subfield code=\"a\">Forskningsinstitusjoner</subfield>\r\n```\r\n991003081634702201:\r\n```diff\r\n82c82\r\n<       <subfield code=\"a\">Forskningsinstitutter</subfield>\r\n---\r\n>       <subfield code=\"a\">Forskningsinstitusjoner</subfield>\r\n87c87\r\n<       <subfield code=\"a\">Forskningsinstitutter</subfield>\r\n---\r\n>       <subfield code=\"a\">Forskningsinstitusjoner</subfield>\r\n```\r\n991142386264702201:\r\n```diff\r\n142c142\r\n<       <subfield code=\"a\">Forskningsinstitutter</subfield>\r\n---\r\n>       <subfield code=\"a\">Forskningsinstitusjoner</subfield>\r\n```\r\n998121357414702201:\r\n```diff\r\n165c165\r\n<       <subfield code=\"a\">Forskningsinstitutter</subfield>\r\n---\r\n>       <subfield code=\"a\">Forskningsinstitusjoner</subfield>\r\n```\r\n998222224934702201:\r\n```diff\r\n67c67\r\n<       <subfield code=\"a\">Forskningsinstitutter</subfield>\r\n---\r\n>       <subfield code=\"a\">Forskningsinstitusjoner</subfield>\r\n```\r\n999103317234702201:\r\n```diff\r\n89c90\r\n<       <subfield code=\"a\">Forskningsinstitutter</subfield>\r\n---\r\n>       <subfield code=\"a\">Forskningsinstitusjoner</subfield>\r\n```\r\n999423548694702201:\r\n```diff\r\n172,175d172\r\n<     <datafield ind1=\" \" ind2=\"7\" tag=\"650\">\r\n<       <subfield code=\"a\">Forskningsinstitutter</subfield>\r\n<       <subfield code=\"2\">noubomn</subfield>\r\n<     </datafield>\r\n```\r\n999609442814702201:\r\n```diff\r\n152c152\r\n<       <subfield code=\"a\">Forskningsinstitutter</subfield>\r\n---\r\n>       <subfield code=\"a\">Forskningsinstitusjoner</subfield>\r\n```\r\n999805592194702201:\r\n```diff\r\n76c76\r\n<       <subfield code=\"a\">Forskningsinstitutter</subfield>\r\n---\r\n>       <subfield code=\"a\">Forskningsinstitusjoner</subfield>\r\n```\r\n999912195544702201:\r\n```diff\r\n102c102\r\n<       <subfield code=\"a\">Forskningsinstitutter</subfield>\r\n---\r\n>       <subfield code=\"a\">Forskningsinstitusjoner</subfield>\r\n```\r\n999912435874702201:\r\n```diff\r\n150,153d149\r\n<     <datafield ind1=\" \" ind2=\"7\" tag=\"650\">\r\n<       <subfield code=\"a\">Forskningsinstitutter</subfield>\r\n<       <subfield code=\"2\">noubomn</subfield>\r\n<     </datafield>\r\n```\r\n"}}