Addresses #31 for images only #32
You should probably be using p.output.log instead of print.
Also, will that regex give the URL to the created note or the image itself?
Testing shows for images it does. I didn't test with a note since I don't have a server that allows notes.
The regex gives the scheme plus the host name - http://example.com/ - to which I add the PyPump url which seems to be the location of the new item. I've tested with mediagoblin.
Shall I do a new pull request with s/print/p.output.log/ ?
You can either amend the current commit or push a second commit to your "31" branch. Either way, it'll all end up here.
Once you've made that change and I (or someone else) has tested it with a normal Pump server, I think this will be ready for merging.
done. neat, didn't know, I thought I'd need to close this pull request and open a new one.
(p)[moggers@orpheus p]$ p post image --title "doge test" --to public doge.jpg
https://microca.st/ttps://microca.st/moggers87/image/6lVmJXdsSni2eJ6PKZo2Yg
@xray7224 I think I'm going to pass this over to you :)
updated - although this is just covering the error, which is that image.url is not always a url, but is sometimes a path. Actually I should have noted that to begin with. What is the target you were sending to?
The AS 1.0 docs do say that the "url" attribute should contain an IRI to the HTML representation, the URL/IRI should always be a full qualified URL and not a partial path. This looks like it is a issue with MediaGoblin giving partial paths in the API when it should be fully qualified. This needs issuing upstream (to my work on GMG), it's an easy fix.
The latest mediagoblin master has the URL/IRI issue fixed. The MediaGoblin specific code can now be removed.
Future note: if MediaGoblin is different from pump.io that should raise alarm bells as they're suppose to be completely compatible so double check before writing specific mediagoblin code.
I've only tested with mediagoblin, my bad. What is a good reference?
pump.io is the reference to use, it's what PyPump, p and MediaGoblin are writing to. You can get an account to test mediagoblin by going to http://pump.io/tryit.html
Closing as p post note and p post image now have a --return option for this.
Pull request closed
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?