diff --git a/README.md b/README.md index 36c6b98..e3718f7 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,6 @@ All encoding is done with UTF-8. If an item cannot be parsed or the exit code of An item has the following top-level fields: * `id`: **Required**. A unique identifier within the scope of the feed source. -* `source`: **Automatic**. The source that generated the item. This attribute is automatically populated. * `created`: **Automatic**. The Unix timestamp at which the item was generated. This attribute is automatically populated. * `active`: **Automatic**. Whether the item is active. Inactive items are not displayed in channels. * `title`: The title of the item. If an item has no title, `is` is used as a fallback title. diff --git a/intake/app.py b/intake/app.py index bee5688..60cca9a 100644 --- a/intake/app.py +++ b/intake/app.py @@ -124,7 +124,7 @@ def _sources_feed(name: str, sources: List[LocalSource], show_hidden: bool): items=paged_items, now=int(time.time()), mdeac=[ - {"source": item["source"], "itemid": item["id"]} + {"source": item.source.source_name, "itemid": item["id"]} for item in paged_items if "id" in item ], diff --git a/intake/cli.py b/intake/cli.py index e5cf258..ff55b6f 100644 --- a/intake/cli.py +++ b/intake/cli.py @@ -256,7 +256,7 @@ def cmd_feed(cmd_args): created_dt = datetime.fromtimestamp(item["created"]) created = created_dt.strftime("%Y-%m-%d %H:%M:%S") info2 = "{0} {1} {2}".format( - item.get("source", ""), item.get("id", ""), created + item.source.source_name, item.get("id", ""), created ) print("| {0:<{1}} |".format(info2, width - 4)) print("+" + (width - 2) * "-" + "+") diff --git a/intake/source.py b/intake/source.py index 8341622..7fa5153 100755 --- a/intake/source.py +++ b/intake/source.py @@ -42,7 +42,6 @@ class Item: raise KeyError("id") item = { "id": fields["id"], - "source": source.source_name, "created": int(current_time()), "active": True, }