omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Add post to Ghost blog

    Editorial
    5
    14
    12970
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • alijnclarke
      alijnclarke last edited by

      So I'm hoping I can use Editorial to create and then upload a post directly to the Ghost blogging platform.

      Is this something that can be done with Editorial - I haven't yet purchased so sorry if i've got the wrong idea of what it can do!

      (if a script has already been made that can do this then even better!)

      1 Reply Last reply Reply Quote 0
      • Webmaster4o
        Webmaster4o last edited by

        Yeah. With Editorial's Python scripting support, it should be easy, especially if Ghost has an API.

        1 Reply Last reply Reply Quote 0
        • shaun-h
          shaun-h last edited by

          I use this workflow but as it says, updates don't work properly due to tags not coming back from the api and I'm running the latest version of ghost cms and authentication has changed slightly so you will need update it a bit but I do post to ghost on my own server with it.

          Adana 1 Reply Last reply Reply Quote 2
          • alijnclarke
            alijnclarke last edited by

            Awesome, thanks for that!

            1 Reply Last reply Reply Quote 0
            • Adana
              Adana @shaun-h last edited by

              @shaun-h Hi, I'm running Ghost 0.7.8 (on https) but I can't get it working with this workflow. Could you please give me (us) some information about the changes that you have made ? Thanks

              1 Reply Last reply Reply Quote 0
              • shaun-h
                shaun-h last edited by shaun-h

                @adana, I will have to take a look later for you to tell you want changes I made, it wasn't just a simple change from memory but I will let you know. I have updated mine to 0.7.9 and have got tags coming back from the API again not sure if this works in 0.7.8 though. I will test and document later for you but are you able to send me the error you are getting though? One thing to note is the guys writing Ghost have said the API is being heavily worked on at the moment so it might break again in a future update of Ghost.

                Adana 1 Reply Last reply Reply Quote 0
                • Adana
                  Adana @shaun-h last edited by

                  @shaun-h Thanks for your reply ! I will update it tonight to 0.7.9 to match your version. I think it's an authentication issue. I tried without ssl but I have the same error : "Could not login to 'https://xxxxxxx.xxx/ghost/" Check Blog URL, Username, and password!" The token can't be recovered and the workflow ends. The API is active on ghost and I can get the token easily with developper tools in my browser. If you have a valid workflow, I'll have, at least, a working one for sure and I can move forward. I don't know if there is a way to see some logs (?). Thanks.

                  1 Reply Last reply Reply Quote 0
                  • shaun-h
                    shaun-h last edited by ccc

                    Here is a start, they added a client_secret token to auth so I defined a client_secret variable and change some code in get oauth token to include that in the post data

                    postdata = {'grant_type': 'password',
                                 'username': workflow.get_variable('username'),
                                 'password' : workflow.get_variable('password'),
                                 'client_id' : 'ghost-admin',
                                 'client_secret' : workflow.get_variable('client_secret')}
                    

                    I think I used chrome developer tools to see the client secret when I logged in on a web browser and then set the variable with that. I don't have a computer handy to check for you.

                    I can't remember if that is all I did so let me know if that doesn't work. If that does I'll find the code I changed to get tags coming back as well.

                    Adana 1 Reply Last reply Reply Quote 0
                    • Adana
                      Adana @shaun-h last edited by

                      @shaun-h It works, even on 0.7.8 ! Thank you very much ! I'm going to upgrade to 0.7.9 right now to be able, with your help, to get tags.

                      1 Reply Last reply Reply Quote 0
                      • shaun-h
                        shaun-h last edited by shaun-h

                        Ok so I changed in the update posts block, there is a script to get posts, I changed the response = requests.get line to be

                        response = requests.get(workflow.get_variable('url') + 'api/v0.1/posts?limit=40&status=all&staticPages=all&include=tags', headers=headers)
                        

                        The API now has and include parameter for posts, for tags and author.

                        1 Reply Last reply Reply Quote 0
                        • Adana
                          Adana last edited by

                          Thanks ! I have adapted the workflow and tested some update and everything seems to be fine.. with text only. If I try to update or upload a new post with some content like image link (generated with the workflow), or location data (generated from pythonista) in form of a map, I get a "Run Python Script": Line 40: ValueError: No JSON object could be decoded".

                          Doesn't work for now :

                          • Upload a new post with other content
                          • Update post with other content

                          Everything else is ok.

                          Any idea about where I should check ?

                          1 Reply Last reply Reply Quote 0
                          • shaun-h
                            shaun-h last edited by

                            so I have another issue I forgot to mention, I downloaded the workflow again and made my changes I had to make a change to the prepare script I was getting and error about something not being hash able I changed

                            for tagid in taglist:
                            

                            to

                            for tagidd in taglist:
                                tagid = tagidd['id']
                            

                            It got rid of the error not sure it has worked properly though, so I will debug tonight.
                            The error you are getting doesn't sound related, I tried with image data generated by the workflow and it worked.
                            Do you have an example of the location data for me to try?

                            Adana 1 Reply Last reply Reply Quote 0
                            • Adana
                              Adana @shaun-h last edited by

                              @shaun-h I have done my multiple tests with the same empty page since the beginning. But, just to be sure, i've opened a new one.. No json error anymore.. I don't know why.. Maybe something hidden somewhere.. Your
                              modification for the tagid has solved the update process. Everything is ok now ! A big thank you for your help !

                              Did you try to contact the author of the original workflow ? Maybe you can upload your "revision". This will probably help other people even if there is modifications in the near future on the "Ghost" side.

                              Now, I'm just waiting for the next update of Editorial who, I hope, solved the issue with the location on iOS 9. (That's why I use pythonista to get the location information).

                              Thanks !

                              1 Reply Last reply Reply Quote 0
                              • kedgemor
                                kedgemor last edited by

                                Perfect way to avoid spammer attacks on your Instagram account is to get an app https://spamguardapp.com/. It'll delete all the unwanted followers from your account.

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post
                                Powered by NodeBB Forums | Contributors