Set up redirects for old urls

This commit is contained in:
Paulus Schoutsen 2015-10-28 23:53:12 -07:00
parent 2b619ad1c4
commit a919a4cf5f
146 changed files with 308 additions and 0 deletions

163
generate-redirect.py Normal file
View File

@ -0,0 +1,163 @@
import os
dirs = ['components', 'getting-started', 'developers']
template = "<script>document.location = '/{}/{}/';</script>"
for check_dir in dirs:
for path in os.listdir(os.path.join('public', check_dir)):
check_path = os.path.join('public', check_dir, path)
if os.path.isdir(check_path):
new_path = os.path.join('source', check_dir, "{}.html".format(path))
# print(template.format(check_dir, path))
# print(new_path)
with open(new_path, 'w') as outp:
outp.write(template.format(check_dir, path))
# Generated
# source/components/alarm_control_panel.html
# source/components/alarm_control_panel.manual.html
# source/components/alarm_control_panel.mqtt.html
# source/components/arduino.html
# source/components/automation.html
# source/components/browser.html
# source/components/camera.foscam.html
# source/components/camera.generic.html
# source/components/configurator.html
# source/components/conversation.html
# source/components/device_sun_light_trigger.html
# source/components/device_tracker.html
# source/components/device_tracker.actiontec.html
# source/components/device_tracker.aruba.html
# source/components/device_tracker.asuswrt.html
# source/components/device_tracker.ddwrt.html
# source/components/device_tracker.geofancy.html
# source/components/device_tracker.luci.html
# source/components/device_tracker.mqtt.html
# source/components/device_tracker.netgear.html
# source/components/device_tracker.nmap_scanner.html
# source/components/device_tracker.owntracks.html
# source/components/device_tracker.snmp.html
# source/components/device_tracker.thomson.html
# source/components/device_tracker.tomato.html
# source/components/device_tracker.tplink.html
# source/components/device_tracker.ubus.html
# source/components/discovery.html
# source/components/downloader.html
# source/components/group.html
# source/components/history.html
# source/components/ifttt.html
# source/components/ifttt.manything.html
# source/components/introduction.html
# source/components/isy994.html
# source/components/keyboard.html
# source/components/light.html
# source/components/light.blinksticklight.html
# source/components/light.hue.html
# source/components/light.hyperion.html
# source/components/light.limitlessled.html
# source/components/light.rfxtrx.html
# source/components/light.tellstick.html
# source/components/light.vera.html
# source/components/light.wink.html
# source/components/logbook.html
# source/components/media_player.html
# source/components/media_player.cast.html
# source/components/media_player.denon.html
# source/components/media_player.firetv.html
# source/components/media_player.itunes.html
# source/components/media_player.kodi.html
# source/components/media_player.mpd.html
# source/components/media_player.plex.html
# source/components/media_player.sonos.html
# source/components/media_player.squeezebox.html
# source/components/modbus.html
# source/components/mqtt.html
# source/components/notify.html
# source/components/notify.file.html
# source/components/notify.instapush.html
# source/components/notify.nma.html
# source/components/notify.pushbullet.html
# source/components/notify.pushover.html
# source/components/notify.slack.html
# source/components/notify.smtp.html
# source/components/notify.syslog.html
# source/components/notify.telegram.html
# source/components/notify.xmpp.html
# source/components/rfxtrx.html
# source/components/scene.html
# source/components/script.html
# source/components/sensor.html
# source/components/sensor.arduino.html
# source/components/sensor.arest.html
# source/components/sensor.bitcoin.html
# source/components/sensor.command_sensor.html
# source/components/sensor.cpuspeed.html
# source/components/sensor.dht.html
# source/components/sensor.efergy.html
# source/components/sensor.forecast.html
# source/components/sensor.glances.html
# source/components/sensor.modbus.html
# source/components/sensor.mqtt.html
# source/components/sensor.mysensors.html
# source/components/sensor.openweathermap.html
# source/components/sensor.rest.html
# source/components/sensor.rfxtrx.html
# source/components/sensor.rpi_gpio.html
# source/components/sensor.sabnzbd.html
# source/components/sensor.swiss_public_transport.html
# source/components/sensor.systemmonitor.html
# source/components/sensor.tellstick.html
# source/components/sensor.temper.html
# source/components/sensor.time_date.html
# source/components/sensor.transmission.html
# source/components/sensor.vera.html
# source/components/sensor.wink.html
# source/components/sensor.worldclock.html
# source/components/shell_command.html
# source/components/simple_alarm.html
# source/components/sun.html
# source/components/switch.html
# source/components/switch.arduino.html
# source/components/switch.arest.html
# source/components/switch.command_switch.html
# source/components/switch.edimax.html
# source/components/switch.hikvision.html
# source/components/switch.modbus.html
# source/components/switch.mqtt.html
# source/components/switch.rest.html
# source/components/switch.rfxtrx.html
# source/components/switch.rpi_gpio.html
# source/components/switch.tellstick.html
# source/components/switch.transmission.html
# source/components/switch.vera.html
# source/components/switch.wemo.html
# source/components/switch.wink.html
# source/components/tellstick.html
# source/components/thermostat.html
# source/components/thermostat.heat_control.html
# source/components/thermostat.nest.html
# source/components/thermostat.radiotherm.html
# source/components/vera.html
# source/components/verisure.html
# source/components/wink.html
# source/components/zone.html
# source/components/zwave.html
# source/getting-started/android.html
# source/getting-started/automation.html
# source/getting-started/autostart.html
# source/getting-started/configuration.html
# source/getting-started/devices.html
# source/getting-started/presence-detection.html
# source/getting-started/troubleshooting.html
# source/getting-started/troubleshooting-configuration.html
# source/developers/add_new_platform.html
# source/developers/api.html
# source/developers/architecture.html
# source/developers/creating_components.html
# source/developers/credits.html
# source/developers/frontend.html
# source/developers/python_api.html
# source/developers/rest_api.html
# source/developers/website.html

View File

@ -0,0 +1 @@
<script>document.location = '/components/alarm_control_panel/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/alarm_control_panel.manual/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/alarm_control_panel.mqtt/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/arduino/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/automation/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/browser/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/camera.foscam/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/camera.generic/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/configurator/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/conversation/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/device_sun_light_trigger/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/device_tracker.actiontec/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/device_tracker.aruba/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/device_tracker.asuswrt/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/device_tracker.ddwrt/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/device_tracker.geofancy/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/device_tracker/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/device_tracker.luci/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/device_tracker.mqtt/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/device_tracker.netgear/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/device_tracker.nmap_scanner/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/device_tracker.owntracks/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/device_tracker.snmp/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/device_tracker.thomson/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/device_tracker.tomato/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/device_tracker.tplink/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/device_tracker.ubus/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/discovery/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/downloader/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/group/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/history/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/ifttt/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/ifttt.manything/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/introduction/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/isy994/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/keyboard/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/light.blinksticklight/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/light/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/light.hue/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/light.hyperion/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/light.limitlessled/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/light.rfxtrx/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/light.tellstick/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/light.vera/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/light.wink/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/logbook/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/media_player.cast/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/media_player.denon/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/media_player.firetv/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/media_player/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/media_player.itunes/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/media_player.kodi/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/media_player.mpd/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/media_player.plex/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/media_player.sonos/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/media_player.squeezebox/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/modbus/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/mqtt/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/notify.file/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/notify/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/notify.instapush/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/notify.nma/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/notify.pushbullet/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/notify.pushover/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/notify.slack/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/notify.smtp/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/notify.syslog/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/notify.telegram/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/notify.xmpp/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/rfxtrx/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/scene/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/script/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.arduino/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.arest/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.bitcoin/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.command_sensor/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.cpuspeed/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.dht/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.efergy/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.forecast/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.glances/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.modbus/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.mqtt/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.mysensors/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.openweathermap/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.rest/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.rfxtrx/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.rpi_gpio/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.sabnzbd/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.swiss_public_transport/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.systemmonitor/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.tellstick/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.temper/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.time_date/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.transmission/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.vera/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.wink/';</script>

View File

@ -0,0 +1 @@
<script>document.location = '/components/sensor.worldclock/';</script>

Some files were not shown because too many files have changed in this diff Show More