Post to Pivot from a Desktop App
Select messages from
# through # FAQ
[/[Print]\]
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next  :| |:
Pivot Support -> Extension Discussion & Development

#61: metaweblog.php Author: useeliger PostPosted: Wed Jul 12, 2006 9:14 am
    —
Where can I get metaweblog.php? The mentioned URL is no longer valid.

#62: Re: Post to Pivot from a Desktop App Author: useeliger PostPosted: Wed Jul 12, 2006 9:47 am
    —
I have found it - sorry

#63: cannot post with metaweblog Author: b83s PostPosted: Thu Jul 27, 2006 4:37 am
    —
Hello,

I am trying to use the metaweblog functionality but it is not working for me. I did see somebody got it working with the performancing (i am using that).

I can add the weblog and select the default weblog but i can't post. The posts are not even showing in the entrie overview.

i downloaded pivot 3 day ago, so its version 1.30.

Does somebody has an idea?

Thanks

#64: Re: Post to Pivot from a Desktop App Author: hansfnLocation: Molde, Norway PostPosted: Fri Jul 28, 2006 2:16 am
    —
What is the error message? Have you read http://pivotlog.net/docs/doku.php?id=metaweblog_functionality In particular:
Quote:
If your client asks for a “Blog ID” (or “Site ID”), enter a case-sensitive category name.

#65: Ecto problems Author: Mickey98Location: NL PostPosted: Tue Aug 15, 2006 1:08 pm
    —
I can setup Ecto according to the posts, the console even retreives the categories but when I try to refresh these categories the following error-message:



Could it be a problem related to this post:
http://forum.pivotlog.net/viewtopic.php?t=10352&highlight=

#66: Re: Post to Pivot from a Desktop App Author: hansfnLocation: Molde, Norway PostPosted: Tue Aug 15, 2006 1:47 pm
    —
Mickey, the reference now is the docs - http://pivotlog.net/docs/doku.php?id=metaweblog_functionality - not the posts in this thread. Anyway, that will probably not change anything for you. And, no, this problem is not related to the RSS problem you reported.

Just to get it straight:
1) You can post from Ecto, right?
2) It's only the refreshing of categories that fails?

#67: Re: Post to Pivot from a Desktop App Author: hansfnLocation: Molde, Norway PostPosted: Fri Aug 18, 2006 7:58 pm
    —
Unrelated to Mickey's problems above, I have created a new much, much improved version of metaweblog.php - get it from http://home.himolde.no/~nordhaug/development/pivot/metaweblog-19082006.zip

Highlights:
  1. Reported categories in your blog app is correct - you can now post to multiple categories.
  2. Reported weblogs in your blog app is correct - no longer misusing it for categories.
  3. If your blog app doesn't send category info, the first allowed category (if any) in the weblog will be used.
  4. Dates are correct (for example in the list of recent posts if your blog app supports that)
  5. Username/password check is now always correct.
  6. Proper documented source code (but normal users don't care much about this).
I have fixed most of the Notes/Known Issues on http://pivotlog.net/docs/doku.php?id=metaweblog_functionality When you have tested the new version and we have fixed any issues, I'll fix
Quote:
Administrative “superusers” can only edit their own posts.

and support for image upload (!) through the newMediaObject function in the MetaWeblog API.

I have tested some myself:
1) Ecto - everything works.
2) Performancing - everything works
3) Windows Live Writer - everything works, except get ting the categories. (There are many error messages, but things seems to work.)

NB! To use the new metaweblog.php, you must add
Code:
/**
 * Finds which cats are published by a certain blog.
 *
 * @param string $weblog
 * @return array
 */
function find_cats_in_weblog($weblog) {
       global $Weblogs;
       $cats = array();
       foreach ($Weblogs[$weblog]['sub_weblog'] as $subweblog) {
               foreach ($subweblog['categories'] as $subweblogcat) {
                       if (in_array($subweblogcat,$cats)) continue;
                       $cats[] = $subweblogcat;
               }
       }
       return $cats;
}

in pvlib.php for example right after the find_weblogs_with_cat function.

Please test so I can commit the work - to be included in Pivot 1.31

#68: Re: Post to Pivot from a Desktop App Author: JohnLocation: Scotland PostPosted: Sun Aug 20, 2006 1:28 pm
    —
Quote:
Please test so I can commit the work - to be included in Pivot 1.31

Thanks, I can now use flock, I could not with the previous version.
I don't see errors with Performancing either (I did before).

I can't use textMate http://macromates.com blogging bundle but I do not know enough to figure out what is going on.
[/quote]

#69: Re: Post to Pivot from a Desktop App Author: hansfnLocation: Molde, Norway PostPosted: Mon Aug 21, 2006 8:27 am
    —
I'm glad it worked better for you, John.

I'm happy to announce that Pivot's metaweblog API now supports image upload - I have implemented metaWeblog.newMediaObject. Get the new version from http://home.himolde.no/~nordhaug/development/pivot/metaweblog-21082006.zip

In addition to the additions to pvlib.php I mentioned above, you must do two one-line changes:
Code:
-function write_file($filename, $output) {
+function write_file($filename, $output, $mode='w') {

-       if ($fh = @fopen( $filename, 'w' )) {
+       if ($fh = @fopen( $filename, $mode)) {

in the function write_file - read the code above as: Replace line "-" with line "+". Easy?

I have tested with Ecto and Windows Live Writer and image upload/inserting in posts works flawlessly. Please test with any other blog clients that might support newMediaObject.

#70: Re: Post to Pivot from a Desktop App Author: neezeeLocation: Marcipan-City (Lübeck), Germany PostPosted: Mon Aug 21, 2006 2:12 pm
    —
very very VERY cool.

Pivots lack of being able to be used by these tools really drove me nuts for a long time and now even being able to possible load up images with it - wonderful.

Thanks you very much for this. I really did not want to go away from Pivot but this had become an issue for me while at the same time I do lack the knowledge of making it work myself. Sad

Going updating the software now Wink)))

#71: Re: Post to Pivot from a Desktop App Author: JohnLocation: Scotland PostPosted: Mon Aug 21, 2006 6:20 pm
    —
hansfn wrote:
Please test with any other blog clients that might support newMediaObject.

Ecto for mac works fine:
http://www.sandaigprimary.co.uk/pivot/pivot/entry.php?id=844&w=john_johnston

I've been messing around with appleScript too, posting and retrieving work fine, but I've a problem uploading.
The image gets uploaded but it doesn't display properly eg:
http://www.sandaigprimary.co.uk/pivot/images/testimage.jpeg

I am encoding with this appleScript:
Code:
on encodeAsBase64(theFilePath)
   set thePath to quoted form of POSIX path of (theFilePath)
   set theScript to "openssl  base64  <  " & thePath
        return do shell script theScript as data
end encodeAsBase64

Which I borrowed from:
http://www.theotherblog.com/Articles/2006/04/26/applescript-base64-and-xmlrpc-newmediaobject/#comments

but the rest of my appleScript might be way off base.

I can upload an image with the TextMate blogging bundle, but cant post an entry. I get an error:
user Admin does not have any access to any category in blog 0
or something like that.

Anyway many thanks for the improvements.

#72: Re: Post to Pivot from a Desktop App Author: hansfnLocation: Molde, Norway PostPosted: Mon Aug 21, 2006 7:10 pm
    —
So you are creating your own blog "app" written in appleScript? Nice. However, I don't know appleScript - never had a Mac - so i can't help. It for sure looks as you are sending the filename instead of the contents of the file named filename...

As you understand, I haven't been able to test TextMate because it's a Mac app. What data is stored in TextMate's blog accounts (or whatever they call it) - I'm thinking about blog ID in particular. Did TextMate use this data - http://www.sandaigprimary.co.uk/pivot/rsd-johnjohnston.xml? The interesting part is why TextMate reports blog "0" - when the correct blog id is "john_johnston" ...

#73: Re: Post to Pivot from a Desktop App Author: JohnLocation: Scotland PostPosted: Tue Aug 22, 2006 1:41 am
    —
Hi hansfn,
Thanks for the ideas, I'll dig around and try to work it out.
long term I am thinking of automating various posts with appleScript, just playing at the moment. I'll post some basic scripts for others to use sometime.
textMate does not seem to send a blog id. I can't see where to enter it.
FWIW the blogging bundle is the creation of Brad Choate and at the moment does not handle blog id
I guess the TextMate blog is the place to ask questions.
Thanks again

#74: Re: Post to Pivot from a Desktop App Author: hansfnLocation: Molde, Norway PostPosted: Tue Aug 22, 2006 3:03 am
    —
John wrote:
textMate does not seem to send a blog id.

If so, that explains things. textMate should send a blog id - ref http://www.sixapart.com/developers/xmlrpc/metaweblog_api/metaweblognewpost.html I don't feel like working around such a basic bug, but it sounds like you'll contact the textMate folks - great.

#75: Re: Post to Pivot from a Desktop App Author: JohnLocation: Scotland PostPosted: Tue Aug 22, 2006 6:09 pm
    —
Hi hansfn,
I've commented on the TextMate blog, hopefully I get some info.

The images I am uploading with appleScript now seem to stay encoded.
If I download them and decode them I get the image.

EG downloading this in the terminal with curl:
http://www.sandaigprimary.co.uk/pivot/images/testimage.jpeg
and then:
openssl base64 -d -in testimage.jpg > decode.jpg
I get my image.
Is there some sorts of encoded files that php doesn't encode, or is there a version of php that doesn't decode? Or does anyone know of a better waty to encode than:
openssl base64 -in pathoffile
On a mac.
(I am kind of way over my head now) Wink



Pivot Support -> Extension Discussion & Development


output generated using printer-friendly topic mod. All times are GMT - 4 Hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next  :| |:
Page 5 of 7

Powered by phpBB © 2001, 2005 phpBB Group