{"action":"opened","issue":{"url":"https://api.github.com/repos/noskcid/external-jeb/issues/3","labels_url":"https://api.github.com/repos/noskcid/external-jeb/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/noskcid/external-jeb/issues/3/comments","events_url":"https://api.github.com/repos/noskcid/external-jeb/issues/3/events","html_url":"https://github.com/noskcid/external-jeb/issues/3","id":122381651,"number":3,"title":"Distinguish internal from external links.","user":{"login":"noskcid","id":2372874,"avatar_url":"https://avatars.githubusercontent.com/u/2372874?v=3","gravatar_id":"","url":"https://api.github.com/users/noskcid","html_url":"https://github.com/noskcid","followers_url":"https://api.github.com/users/noskcid/followers","following_url":"https://api.github.com/users/noskcid/following{/other_user}","gists_url":"https://api.github.com/users/noskcid/gists{/gist_id}","starred_url":"https://api.github.com/users/noskcid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noskcid/subscriptions","organizations_url":"https://api.github.com/users/noskcid/orgs","repos_url":"https://api.github.com/users/noskcid/repos","events_url":"https://api.github.com/users/noskcid/events{/privacy}","received_events_url":"https://api.github.com/users/noskcid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-15T22:27:46Z","updated_at":"2015-12-15T22:27:46Z","closed_at":null,"body":"The script currently relies heavily on relative links being used i.e. 'links/file_a.pdf' rather than 'https://elec.york.../links/file_a.pdf'. This seems to be the convention right now, and may even be by design (will need to think about this more). Anyway, some module pages link to external files on other websites - not sure whether we really want to download these (I'm currently thinking yes - I mean I can imagine it being annoying those links breaking and the lecturer not noticing) - however in the current script they don't work because it assumes ALL links are relative and tries to simply append them to the root url. \r\n\r\nTo fix this we need to determine whether a link is not relative, and if not relative don't append to the root url and instead assume the link is the full url and just use that. \r\n\r\nThis could be as easy as using a regex to check for https* at the beginning of the url. May also be worth then checking whether the full url is that of the internal web, so we can set an option to not download any external links. "}}