aboutsummaryrefslogtreecommitdiffstats
path: root/skate
diff options
context:
space:
mode:
Diffstat (limited to 'skate')
-rw-r--r--skate/reduce.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/skate/reduce.go b/skate/reduce.go
index 9babbae..5a2594d 100644
--- a/skate/reduce.go
+++ b/skate/reduce.go
@@ -18,6 +18,7 @@
package skate
import (
+ "encoding/base64"
"fmt"
"io"
"log"
@@ -161,7 +162,12 @@ func ZippyExactWiki(releases, wiki io.Reader, mr MatchResult, w io.Writer) error
return err
}
var bref BiblioRef
- bref.Key = fmt.Sprintf("%s_%s", slugifyString(wiki.PageTitle), target.Ident) // XXX: what should we use?
+ // We use base64 w/o padding of the original PageTitle as
+ // component for the id. XXX: ok for now?
+ key := fmt.Sprintf("%s_%s",
+ base64.RawURLEncoding.EncodeToString([]byte(wiki.PageTitle)),
+ target.Ident)
+ bref.Key = key
bref.SourceWikipediaArticle = wiki.PageTitle
bref.TargetReleaseIdent = target.Ident
bref.TargetWorkIdent = target.WorkID