Skip to content

Instantly share code, notes, and snippets.

@damp11113
Last active June 11, 2024 15:53
Show Gist options
  • Save damp11113/abbc0f60bc0a9346a5ed5676174044aa to your computer and use it in GitHub Desktop.
Save damp11113/abbc0f60bc0a9346a5ed5676174044aa to your computer and use it in GitHub Desktop.

RCF (Really Comprehensive Feed)

Introduction

RCF (Really Comprehensive Feed) is a JSON-based feed format designed to provide comprehensive information about various content items, such as articles, blog posts, news updates, and more. RCF aims to offer extensive metadata and customization options to suit diverse content publishing needs.

Version

RCF is currently in version 1.

Format Overview

RCF consists of two main components:

  1. Feed Metadata: Contains information about the feed itself, including its title, description, authors, generator, update frequency, and more.
  2. Content Items: Individual content entries with detailed metadata such as title, publication date, authors, tags, insights, attachments, and custom fields.

Structure

Feed Metadata

The feed metadata includes:

  • Title: The title of the feed.
  • Description: Short and long descriptions of the feed.
  • Authors: Information about the authors contributing to the feed.
  • Generator: Details about the software or tool used to generate the feed.
  • Copyright: Information about the copyright license and organization.
  • Subscribe: Options for subscribing to the feed.
  • Language: The language(s) supported by the feed.
  • Categories: Categories or topics covered by the feed.
  • Custom Data: Additional custom data.
  • Custom HTML: Custom HTML content for the feed.
  • Update Frequency: Frequency of feed updates.
  • Expired: Indicates if the feed has expired.
  • Versioning: Information about the versioning of the feed.
  • Default Units: Default units for measurements used in the feed.

Content Items

Each content item includes:

  • ID: Unique identifier for the content item.
  • Title: Title of the content.
  • Page URL: URL of the content page.
  • Publication Date: Timestamp indicating when the content was published.
  • Modification Date: Timestamp indicating when the content was last modified.
  • Tags: Tags associated with the content.
  • Description: Short description of the content.
  • Summary: Summary of the content.
  • Image: URLs for banner and footer images related to the content.
  • Authors: Information about the authors of the content.
  • Units: Custom units for measurements used in the content.
  • Insights: Insights such as score, reactions, engagement, and comments.
  • Custom Fields: Additional custom fields.
  • References: Related articles or resources.
  • Languages: Languages supported by the content.
  • Custom HTML: Custom HTML content for the content item.
  • Explicit: Indicates if the content is explicit.
  • Attachments: Attached files or media.
  • Status: Status of the content (e.g., published, draft).
  • Rating: Rating of the content.
  • Reading Length: Estimated reading length of the content.

Usage

RCF can be used for various purposes such as creating RSS feeds, Atom feeds, or custom JSON feeds for websites, blogs, news aggregators, and content management systems.

Example

{
  "version": 1,
  "url": { /* URL information */ },
  "image": { /* Image URLs */ },
  "alternate_feed": { /* Alternate feed URLs */ },
  "info": { /* Feed metadata */ },
  "feeds": [ /* Content items */ ]
}

Conclusion

RCF offers a comprehensive and flexible format for publishing and consuming content feeds, providing rich metadata and customization options to meet diverse needs in content distribution and consumption.

# feed infomation like json feed but more infomation
# define name of this format
# RSJF (Really Simple Json Feed)
# Really Comprehensive Json Feed (RCJF)
# Json Feed Plus (JF+)
# and Yes this is RCF (Really Comprehensive Feed) for final name
# define structure
RCFcontent = {
"id": "content-1",
"title": "hello content",
"page_url": "https://example.org/hello-content",
"public_date": 0, # timestamp
"modify_date": 0, # timestamp
"tags": ["technology", "news"],
"description": "This is short description", # not required if you use custom html
"summary": {
"format": "text", # it can use html or markdown (if reader support)
"content": ""
},
"image": { # not required
"banner": "https://example.org/hello-content/banner.png",
"footer": "https://example.org/hello-content/footer.png"
},
"authors": [
{
"name": "damp11113",
"url": "https://damp11113.xyz",
"avatar": "https://damp11113.xyz/authors/avatar.png",
"contact": {
"email": "contact@damp11113.xyz",
"phone": "+1234567890"
# you can add more
},
"social_media": {
"x": "https://x.com/example",
"facebook": "https://facebook.com/example"
# you can add more
}
}
# you can add more
],
"units": { # if dont want default units
"temperature": "Fahrenheit",
"distance": "Mile",
# Add more units as needed
},
"insights": {
"score": 99, # varied for your algorithm
"reactions": {
"likes": 100,
"dislikes": 5,
"favorites": 20
# can add more if you have more insights information
},
"engagement": {
"views": 1000,
"shares": 50,
"comments": 10
# can add more if you have more insights information
},
"comments": {
"count": 10,
"url": "https://example.org/hello-content/comments"
}
},
"custom": {
"custom_field1": "value1",
"custom_field2": "value2"
},
"reference": [
{
"title": "Related Article 1",
"date": 0, # timestamp (not required)
"url": "https://example.org/related-article1"
},
# you can add more reference
],
"language": [
"en_us"
# you can add more language
],
"copyright": { # not required
"license": "CC0",
"date": "2024",
"organ_name": "DPSoftware Foundation",
},
"attachments": [
{
"id": "content-1-file-1", # this parse can replace attachments id in summary by use <file:id> like <file:content-1-file-1>
"title": "audio 1",
"url": "https://example.org/hello-content/attachments/audio.opus",
"mime_type": "audio/opus",
"size": 1024 # varied unit in default units
}
# you can add more
],
"explicit": False,
"status": "published", # or "draft", "archived", etc.
"rating": None, # or any other rating system. use null for disable this
"reading_length": "medium", # or "short", "long", etc. and you can use number by define time unit in unit
}
RCF = {
"version": 1,
"url": {
"home_page_url": "https://example.org",
"feed_url": "https://example.org/feed.json",
"next_feed_url": "https://example.org/newfeed.json",
"old_feed_url": "https://example.org/oldfeed.json"
},
"image": {
"icon": "https://example.org/feed/icon1.png",
"favicon": "https://example.org/favicon.ico",
"banner": "https://example.org/feed/banner.png",
"footer": "https://example.org/feed/footer.png"
},
"alternate_feed": {
"rss": "https://example.org/feed.rss",
"atom": "https://example.org/feed.atom"
},
"info": {
"title": "Hello RCF!",
"description": {
"short": "This is short description",
"long": {
"format": "text", # it can use html or markdown (if reader support)
"content": ""
}
},
"authors": [
{
"name": "damp11113",
"url": "https://damp11113.xyz",
"avatar": "https://damp11113.xyz/authors/avatar.png",
"contact": {
"email": "contact@damp11113.xyz",
"phone": "+1234567890"
# you can add more
},
"social_media": {
"x": "https://x.com/example",
"facebook": "https://facebook.com/example"
# you can add more
}
}
# you can add more
],
"generator": {
"name": "PyRCF",
"url": "https://rcf.damp11113.xyz",
"last_build": 0 # timestamp
},
"copyright": {
"license": "MIT",
"date": "2022-2024",
"organ_name": "DPSoftware Foundation",
},
"subscribe": {
"type": "email", # can be "email" or "url" or "notify"
"url": "https://example.org/subscribe"
},
"language": [
"en_us",
"th_th"
# you can add more language
],
"categories": [
"Technology",
"News"
# you can add more categories
],
"custom": {
"custom_data1": "hi this is custom data!"
},
"custom_html": "<p>This is some custom HTML content that can be included in the feed.</p>",
"update_frequency": "Daily",
"expired": False,
"temp": False,
"versioning": { # this is not format version but it content version
"current_version": 1,
"previous_versions": [
{
"version": 0.5,
"release_date": "2024-10-10",
"url": "" # not need if no previous feed backup
}
]
},
"units": { # default units
"temperature": "Celsius",
"distance": "Kilometers",
"weight": "Kilograms"
# Add more units as needed
},
},
"feeds": [
RCFcontent
# you can add more feed
]
}
# generator
# writing code in progress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment