How to designate Article Directory when publishing to Apple News using Terminal?

90 views Asked by At

I have an article.json file (named as such) below that I want to connect to Apple News and test:

{
"version": "1.4",
"identifier": "TestArticle",
"title": "My First Article",
"language": "en",
"layout": { "columns": 1},
"components": [
    {
        "role": "title",
        "text": "My First Article"
    },
    {
        "role": "body",
        "text": "This is just over the minimum amount of JSON required to create a valid article in Apple News Format. If you were to delete the dictionary enclosing this text, you'd be there."
    }
],
"componentTextStyles": {
  "fontName": "Lato",
  "textColor": "#000",
  "linkStyle": {
    "highlight": {
      "color": "#358fd4"
    }
  }
}

I downloaded XCode and the necessary Ruby gems, to enter relevant command lines. As specified in the documentation, my .papi file is formatted correctly as it fetched my channel information successfully. According to Apple's ReadMe, this is the command I have to enter to publish an article:

papi-client article publish <Article Directory>

The problem is, I'm not sure exactly what this article directory is, or how to locate it. As far as I knew, I would create something like the above "article.json" file and potentially use that as the directory. I've even tried using the file path for said file, with no success. What could be my next steps to get this off the ground?

1

There are 1 answers

0
sketchyTech On

Place the article along with any locally linked, i.e. bundle://, content in a folder then use this folder as the article directory.