-
Notifications
You must be signed in to change notification settings - Fork 0
formula spec #7
Description
Current YAML example
Formula
title: debug.py - inspect Pandoc's JSON output
author: Sergio Correia
homepage: https://github.com/sergiocorreia/panflute-filters
url: https://raw.githubusercontent.com/sergiocorreia/panflute-filters/master/filters/debug.yaml
version: 1.0.0
categories: [dev, inspect]
description: |
This filter pretty prints the input it receives.
This is useful when debugging panflute filters, or the package itself.
# install: <custom install commands besides simple & pip>
# uninstall: <nothing here>
Index
# Simple structure:
# - name: FILTER_NAME
# url: FILTER_URL (optional if url-type is pip)
# url-type: simple|pip (default is simple)
# Complex structure:
# - name: FILTER_NAME
# branches:
# branch1:
# url: BRANCH_URL
# url-type: simple|pip
# url: FILTER_URL (optional if url-type is pip)
# url-type: simple|pip (default is simple)
# Note: Branch 'default' will be run if no branch specified
- name: caps
url: https://raw.githubusercontent.com/sergiocorreia/panflute/master/examples/panflute/caps.py
- name: debug
url: https://raw.githubusercontent.com/sergiocorreia/panflute-filters/master/filters/debug.yaml
- name: tabulate-elements
url: https://raw.githubusercontent.com/sergiocorreia/panflute-filters/master/filters/tabulate-elements.yaml
- name: pandoc-eqnos
branches:
- branch: default
url-type: pip
- branch: dev
url: git://github.com/tomduck/pandoc-eqnos.git
url-type: simple
# EOF
Proposed spec
From #2 (comment):
version: 1.0.0
license: MIT
summary: 'Some filter"
description: 'long description goes here'
author = xyz # or authors as a list
files: [xyz.py, abc.py] # This would just copy the files to the $datadir/filters folder
url: the url were the files are located
installer: pep # or cabal, etc. , this would run "pep install xyz" instead of copying files
homepage: 'https://github/someone/somerepo'
Get rid of index?
Should we get rid of index, or build index automatically from individual formula? Excerpt from #2 (comment):
concerning the index:
Currently in the index, the non-simple kind has a complex structure (because if the package is non-simple, there's no obvious place to put a formula in the non-centralized formula "paradigm"). I think the complex structure should move to an individual formula now as the formulae are centralized.
it means the
url-type
would be moved to individual formula as well, possibly renamed to/add atype
to denote if it is a simple package (standalone, single file) or requires other package management (e.g. pip)since the formulae are centralized, url is not needed in the index.
After all these, it means the index is just a list of the names of packages. i.e. we might as well get rid of the index, or the index can be auto-generated, and then the index can simply be a plain text list of names, rather than in yaml.
concerning the individual formula, in addition to the existing
the complex structure from the index
url-type
and/ortype
as said abovemore description on the non-simple filter. Currently, the only non-simple one is
pip
. It will be a problem for Unix users since the OSes ship with Python2 as the default, and it is considered a bad practice to override the default python version. Hence usingpip
alone means it will usepip2
for them. So an info on the python version of the package is needed: python2, python3, or univeral, corresponds to pip2, pip3, and pip.
- This can be acheived by having a separate key to indicate the python version, or simply having the types as
simple|pip|pip2|pip3
.