Move to-do from source to README
This commit is contained in:
parent
f08d9d8d61
commit
ecaaebc05e
60
README.org
60
README.org
|
@ -90,3 +90,63 @@
|
|||
<contrapunctus> was soll ich darin verbessern?
|
||||
[2016-06-04T23:11:31+0530]
|
||||
<wasamasa> dieses deutsch ist einfach fürchterlich
|
||||
* Todo
|
||||
1. Make it declarative - define options and their effect, and the
|
||||
structure of the command, separately from the code that makes it
|
||||
happen.
|
||||
2. Use regexes to define target names and how the output file
|
||||
name(s) derive from them.
|
||||
3. Also, add support for part-<instrument>.ly ->
|
||||
<project-name>-<instrument>.pdf files.
|
||||
|
||||
Hypothetical config in that style -
|
||||
|
||||
#+BEGIN_SRC scheme
|
||||
(options
|
||||
(pac ("off" "-dno-point-and-click")
|
||||
(_ ""))
|
||||
(size ("a4" "-a4")
|
||||
(_ "")))
|
||||
|
||||
;; TARGETS defines build targets for the project, in the form
|
||||
;; (targets ENTRY*)
|
||||
;; Each ENTRY is in the form -
|
||||
;; (TARGET-NAME INPUT-FILE OUTPUT-FILE)
|
||||
;; TARGET-NAME is the target name, specified by the user at the
|
||||
;; command line while calling the script.
|
||||
;; INPUT-FILE is the stem name of the file to be compiled.
|
||||
;; OUTPUT-FILE is the stem name of the file to be passed as output
|
||||
;; file name to the compiler command
|
||||
|
||||
;; Inside a target entry, the keyword 'target' is automatically bound
|
||||
;; to the target name - here, "main". The first entry given here means
|
||||
;; - "specifying 'main' as target (on the CLI) will compile a file
|
||||
;; called 'main' (the extension is added in the command stage) and
|
||||
;; will have <project-name> as output stem."
|
||||
(targets
|
||||
("main" target project-name)
|
||||
;; and now, "band" (just what was I trying to do here with the "\1"?)
|
||||
("band" target (string-append project-name "\1"))
|
||||
(_ (string-append "part-" target)
|
||||
(string-append project-name "-" target)))
|
||||
|
||||
;; input-file and output-file are taken from the first and second args
|
||||
;; of the target as defined in TARGETS
|
||||
(command "lilypond" pac "-o output/" output-file size " " input-file size ".ly")
|
||||
#+END_SRC
|
||||
|
||||
4. Tab completion
|
||||
5. Recursive operations. Sometimes I have large projects with
|
||||
subprojects (and even sub-subprojects) in them. Usually, I want
|
||||
to compile a particular target in every subproject.
|
||||
6. Create output directory if it doesn't exist!
|
||||
|
||||
It would also be useful to compile the part-<instrument>.ly file
|
||||
if I'm editing an <instrument-class>/<instrument>.ly file -
|
||||
useful when working with orchestral files and wanting to put the
|
||||
generated MIDI in qtractor (importing a single track is easier
|
||||
than importing a multi-track MIDI just because you changed music
|
||||
on one track). That's more of an Emacs-side thing, though.
|
||||
|
||||
...hell, one could define all kinds of rules - "when I'm working
|
||||
with such-and-such files, compile such-and-such targets."
|
||||
|
|
61
build.scm
61
build.scm
|
@ -6,67 +6,6 @@
|
|||
(ice-9 format)
|
||||
(ice-9 regex))
|
||||
|
||||
;; TODO
|
||||
;; 1. Make it declarative - define *options* and their effect, and the
|
||||
;; structure of the command, separately from the code that makes it
|
||||
;; happen.
|
||||
;; 2. Use regexes to define target names and how the output file
|
||||
;; name(s) derive from them.
|
||||
;; 3. Also, add support for part-<instrument>.ly ->
|
||||
;; <project-name>-<instrument>.pdf files.
|
||||
|
||||
;;;; HYPOTHETICAL CONFIG in that style -
|
||||
|
||||
;; (options
|
||||
;; (pac ("off" "-dno-point-and-click")
|
||||
;; (_ ""))
|
||||
;; (size ("a4" "-a4")
|
||||
;; (_ "")))
|
||||
|
||||
;; ;; TARGETS defines build targets for the project, in the form
|
||||
;; ;; (targets ENTRY*)
|
||||
;; ;; Each ENTRY is in the form -
|
||||
;; ;; (TARGET-NAME INPUT-FILE OUTPUT-FILE)
|
||||
;; ;; TARGET-NAME is the target name, specified by the user at the
|
||||
;; ;; command line while calling the script.
|
||||
;; ;; INPUT-FILE is the stem name of the file to be compiled.
|
||||
;; ;; OUTPUT-FILE is the stem name of the file to be passed as output
|
||||
;; ;; file name to the compiler command
|
||||
|
||||
;; (targets
|
||||
;; ;; 'target' is automatically bound to the first arg - here, "main".
|
||||
;; ;; The following form means - "specifying 'main' as target (on the
|
||||
;; ;; CLI) will compile a file called 'main' (the extension is added in
|
||||
;; ;; the command stage) and will have <project-name> as output stem."
|
||||
;; ("main" target project-name)
|
||||
;; ;; and now, "band" (just what was I trying to do here with the "\1"?)
|
||||
;; ("band" target (string-append project-name "\1"))
|
||||
;; (_ (string-append "part-" target)
|
||||
;; (string-append project-name "-" target)))
|
||||
|
||||
;; ;; ifile and ofile are taken from the first and second args of the
|
||||
;; ;; target as defined in TARGETS
|
||||
;; (command "lilypond" pac "-o output/" ofile size " " ifile size ".ly")
|
||||
|
||||
;;;; HYPOTHETICAL CONFIG ENDS
|
||||
|
||||
;; 4. Tab completion
|
||||
;; 5. Recursive operations. Sometimes I have large projects with
|
||||
;; subprojects (and even sub-subprojects) in them. Usually, I want
|
||||
;; to compile a particular target in every subproject.
|
||||
;; 6. create output directory if it doesn't exist!
|
||||
|
||||
;;;; It would also be useful to compile the part-<instrument>.ly file
|
||||
;;;; if I'm editing an <instrument-class>/<instrument>.ly file -
|
||||
;;;; useful when working with orchestral files and wanting to put the
|
||||
;;;; generated MIDI in qtractor (importing a single track is easier
|
||||
;;;; than importing a multi-track MIDI just because you changed music
|
||||
;;;; on one track). That's more of an Emacs-side thing, though.
|
||||
;;;;
|
||||
;;;; ...hell, one could define all kinds of rules - "when I'm working
|
||||
;;;; with such-and-such files, compile such-and-such targets."
|
||||
|
||||
|
||||
;; (format #t "~2%")
|
||||
|
||||
(define *options*
|
||||
|
|
Loading…
Reference in New Issue