Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrewpetrochenkov/mkcache
make cache file. inspired by 'mktemp'
https://github.com/andrewpetrochenkov/mkcache
cli
Last synced: about 2 months ago
JSON representation
make cache file. inspired by 'mktemp'
- Host: GitHub
- URL: https://github.com/andrewpetrochenkov/mkcache
- Owner: andrewpetrochenkov
- License: unlicense
- Created: 2019-06-03T19:06:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-03T21:10:29.000Z (almost 4 years ago)
- Last Synced: 2024-06-14T10:08:52.647Z (3 months ago)
- Topics: cli
- Language: Shell
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![](https://img.shields.io/badge/OS-Unix-blue.svg?longCache=True)]()
[![](https://img.shields.io/pypi/v/mkcache.svg?maxAge=3600)](https://pypi.org/project/mkcache/)
[![](https://img.shields.io/npm/v/mkcache.svg?maxAge=3600)](https://www.npmjs.com/package/mkcache)[![](https://img.shields.io/badge/License-Unlicense-blue.svg?longCache=True)](https://unlicense.org/)
[![](https://github.com/andrewp-as-is/mkcache/workflows/tests42/badge.svg)](https://github.com/andrewp-as-is/mkcache/actions)### Installation
```bash
$ [sudo] pip install mkcache
``````bash
$ [sudo] npm i -g mkcache
```#### How it works
```
$XDG_CACHE_HOME/mkcache/
```#### Config
```bash
export MKCACHE=path/to/cache # ~/.cache/mkcache by default
```#### Examples
example 1. run script only once:
```bash
path="$(mkcache script "$@")"
! [ -e "$path" ] && { script "$@" || exit; touch "$path"; }
```example 2. speed up macOS tts with mkcache:
```bash
path="$(mkcache "$@")"
! [ -e "$path" ] && /usr/bin/say "$@" -o "$path"
afplay "$path"
```