You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The key to make html_of_wiki a decent and usable tool is to polish its user interface. Currently users have to deal with shell scipts (poorly tested and documented, with too little error management 👎) such as dop and quickdop. They were meant to make html_of_wiki quickly usable of Ocsigen but not for other end users.
Thus, implement an OCaml 🐫 program, how, which re-implements all the features of both dop and quickdop and get rid of these crappy scripts (:+1:). A modern and popular command line interface is the sub-command system that git uses. Here is a list of the features how has to implement (in combination with #106, this is an extract of a draft design file---please pay no attention to the format):
- ~how~ :: alias pour ~how help~
- ~how help~ :: affiche la liste des commandes de premier niveau
- ~how help CMD~ :: affiche l'aide de la ~CMD~ donnée
- ~how init~ :: crée dans le dossier courant un fichier ~how.yml~ contenant une configuration par défaut
- ~how init infer~ :: la configuration est déduite à partir de l'examen du dossier
- ~how init default~ :: comme ~how init~
- ~how config~ :: == ~how config help~
- ~how config help~ :: affiche l'aide de chaque option de configuration
- ~how config check~ :: vérifie la validité de la configuration (pas de dossier n'existant pas)
- ~how config infer~ :: affiche une configuration minimale déduite
- ~how build [-d DIR] [VERSIONS...]~ :: compile les versions données (ou toutes si aucune n'est donnée) dans ~DIR |? _build~- ~how deploy [-d DIR] [-m MSG] [-r REPO]~ :: déploie le site sur GHPages (override l'option ~deploy~) et commit avec le ~MSG~ donné dans le ~REPO~ donné (~upstream~ par défaut). Échoue si le cwd n'est pas un dépôt git.- ~how check~ :: fais tous les checks - ~how check links [-d DIR] [-r|--raw] [-s|--silent]~ :: vérifie les liens morts du ~DIR~ et sort sur stderr le json. Si ~raw~ est donné sort directement l'output de linkchecker.
- ~how check config~ :: == ~how config check~
To implement all that complex argv parsing, the module Glcmd (Git-Like CoMmanDs) has been designed (see #88). It helps to express declaratively what options each sub-command takes and does the parsing all by itself. Here is what has already been implemented:
I didn't know about Core.Command. This PR is an experiment to give how the same command line interface as Git, with verbs and parameters. Glcmd (the library ohow uses) doesn't support such verbs.
This issue isn't really important unless html_of_wiki is to be used by many unexperienced people, which isn't currently the case.
The key to make html_of_wiki a decent and usable tool is to polish its user interface. Currently users have to deal with shell scipts (poorly tested and documented, with too little error management 👎) such as
dop
andquickdop
. They were meant to make html_of_wiki quickly usable of Ocsigen but not for other end users.Thus, implement an OCaml 🐫 program,
how
, which re-implements all the features of bothdop
andquickdop
and get rid of these crappy scripts (:+1:). A modern and popular command line interface is the sub-command system thatgit
uses. Here is a list of the featureshow
has to implement (in combination with #106, this is an extract of a draft design file---please pay no attention to the format):To implement all that complex
argv
parsing, the moduleGlcmd
(Git-Like CoMmanDs) has been designed (see #88). It helps to express declaratively what options each sub-command takes and does the parsing all by itself. Here is what has already been implemented:html_of_wiki/src/how.ml
Lines 119 to 155 in e4314fd
The text was updated successfully, but these errors were encountered: