Created
February 15, 2010 17:05
-
-
Save cbeer/304792 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteMap pairtree-map prg:/opt/local/apache2/map.pairtree.py | |
RewriteLock /opt/local/apache2/map.pairtree.py.lock | |
RewriteRule ^/pt/(.+?)/(.*)$ /pairtree/${pairtree-map:$1}/$2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# uses the python pairtree library from github.com/edsu/pairtree/tree/master/pairtree/ | |
import sys | |
import pairtree | |
while sys.stdin: | |
print pairtree.id2path(sys.stdin.readline().rstrip()) | |
sys.stdout.flush() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment