PolyPost.Fetcher (poly_post v0.2.0)

Copy Markdown View Source

A module used for fetching content from Markdown files (resources) from a file or git repository.

Summary

Functions

Fetches raw content from git repository or path on disk listed under config.

Fetches raw content from a path on disk listed under config only.

Functions

get(name)

(since 0.2.0)
@spec get(Resource.name()) ::
  {:ok, [PolyPost.Resource.Unit.t()]}
  | {:error, term()}
  | {:error, term(), term()}

Fetches raw content from git repository or path on disk listed under config.

get_from_path(name)

(since 0.2.0)
@spec get_from_path(Resource.name()) ::
  {:ok, [PolyPost.Resource.Unit.t()]}
  | {:error, term()}
  | {:error, term(), term()}

Fetches raw content from a path on disk listed under config only.

Notes

If the resource is configured to originate from a git repository and has already been pulled at some point in the past to the filesystem, it will still attempt to retrieve the raw content for the resource from the path without using git.