| <?php | |
| /******************************************************************************* | |
| * Copyright (c) 2014 Eclipse Foundation and others. | |
| * All rights reserved. This program and the accompanying materials | |
| * are made available under the terms of the Eclipse Public License v1.0 | |
| * which accompanies this distribution, and is available at | |
| * http://www.eclipse.org/legal/epl-v10.html | |
| * | |
| * Contributors: | |
| * Wayne Beaton (Eclipse Foundation)- initial API and implementation | |
| *******************************************************************************/ | |
| function getRepositories($url, $base) { | |
| $projects = json_decode(file_get_contents($url), true); | |
| $repositories = array(); | |
| foreach($projects as $project => $paths) { | |
| foreach($paths as $path) { | |
| $repositories[$project][] = "$base$path"; | |
| } | |
| } | |
| return $repositories; | |
| } | |
| $json = array(); | |
| $json['eclipse'] = getRepositories('http://projects.eclipse.org/json/repos/git', 'git://git.eclipse.org'); | |
| $json['locationtech'] = getRepositories('https://locationtech.org/json/repos/git', 'git://locationtech.org'); | |
| $json['polarsys'] = getRepositories('https://polarsys.org/json/repos/git', 'git://polarsys.org'); | |
| echo json_encode($json); | |
| ?> |