Skip to content

caltechlibrary/flatlakeTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flatlakeTools

This is an experimental proof of concept set of tools for working with the FlatLake API generated by CloudCannon's Flat. The goal is to easily generate RSS 2.0 feeds from the JSON API as well as generated index blog page(s).

The primary tool is called flt. It is a command line tool supporting a YAML configuration file and actions for processing the JSON API provided by FlatLake application. The configuration is combined with an action and data source path to produce the desired content via standard out.

Here's the basic form of the command.

flt blogit COMMONMARK_FILE
flt rss CHANNEL_NAME JSON_API_FILE
flt markdown CHANNEL_NAME JSON_API_FILE

Here's an example of rendering a RSS 2.0 rss.xml for the "posts" channel.

flt rss posts api/all/page-1.json >rss.xml

Here's an example of rendering a CommonMark index.md file suitable for a blog index using the "posts" channel.

flt markdown posts api/all/page-1.json >index.md

The flt.yaml file might look something like this.

channels:
  - name: posts
    title: "Tech Insights Blog"
    description: "The latest insights and news from the world of technology."
    link: "https://example.com/tech-insights"
    language: "en-us"
    copyright: "Copyright 2023 Tech Insights Blog. All rights reserved."
    managingEditor: "[email protected]"
    webMaster: "[email protected]"

Release Notes

  • version: 0.0.2
  • status: concept

This is a proof of concept

Authors

  • Doiel, R. S. Doiel

Software Requirements

  • Deno >= 2.4.3
  • CMTools >= 0.0.37

Software Suggestions

  • Pandoc >= 3.5
  • GNU Make >= 3
  • FlatLake >= 0.4.3
  • PageFind >= 1.3.0

Runtime platform

Deno

Related resources

About

flatlakeTools is a prototype for making use of the content generate by CloudCannon's FlatLake

Resources

License

Stars

Watchers

Forks

Packages

No packages published