title: How to batch rename Tumblr tags?
body: <p>I have tagged over 700 blog posts with tags containing hyphens, and these tags suddenly stopped working in 2011, because Tumblr decided (without any notice) to forbid hyphens in tags (I guess hyphens are blocked now, because spaces in tags (which are allowed) get changed to hyphens.). Unfortunately, Tumblr is not willing to globally rename all tags containg hyphens (although these tags are of <em>no</em> use anymore → 404).</p>
  
  <p>Now I want to rename my tags myself.</p>
  
  <p>I tried to do it with the "Mass Post Editor" (<code>tumblr.com/mega-editor</code>), but it's not possible to select posts by tag. I'd have to manually select post after post and look if a certain tag was used, and if so, delete it and add a new one instead. This would be a huge job (700 tagged posts, but more than 1000 in total).</p>
  
  <p>So I thought that the <a href="http://www.tumblr.com/api" rel="nofollow">Tumblr API</a> might help me. I'm no programmer, but I'd be willing to dig into it, if I could get some help here as a starting point.</p>
  
  <p>I think I need the following process:</p>
  
  <ol>
  <li>select all posts that are tagged with <code>x</code> (= a tag containing hyphens)</li>
  <li>tag all these posts with <code>y</code> (= a tag without hyphens)</li>
  <li>delete the tag <code>x</code> on all these posts</li>
  </ol>
  
  <p>I'd start this process for every affected tag manually.</p>
  
  <hr>
  
  <p>I see that the method (or whatever you call it) <a href="http://www.tumblr.com/docs/en/api/v2#posts" rel="nofollow"><code>/post</code></a> knows the request parameter <code>tag</code>:</p>
  
  <blockquote>
    <p>Limits the response to posts with the specified tag</p>
  </blockquote>
  
  <p>(I guess I can only hope that this works for tags containing hyphens, too.)</p>
  
  <p>After that I'd need a way to add and remove tags from that result set. <a href="http://www.tumblr.com/docs/en/api/v2#editing" rel="nofollow"><code>/post/edit</code></a> doesn't say anything about tags. Did I miss something? Isn't it possible to add/remove tags with the API?</p>
  
  <hr>
  
  <p>Have you an idea how I could "easily" rename my tags?</p>
  
  <p>Is it possible with the API? Could you give me a starting point, tip etc. how I could manage to do it?</p>
  
  <hr>
  
  <p>I don't know if this might be helpful, but I noticed that the search function is still able to find posts "tagged" with tags that contain hyphens. </p>
  
  <p>Example: let's say I have the tag <code>foo-bar</code>. It is linked with <code>/tagged/foo-bar</code> (→ 404). I can find the posts with <code>/search/foo-bar</code> (but this is of course not ideal because it might also find posts that contain (in the body text) words similar/equal to the tag name).</p>
  
  <p>I tried to encode the hyphen (<code>/tagged/foo%2Dbar</code>), but no luck. </p>