-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maketile v2 #99
Comments
14 tasks
edemaine
added a commit
that referenced
this issue
Oct 14, 2022
* `filename.args` adds arguments to command line, parsed like a shell * `Maketile.args` loaded automatically if no other files * Rudamentary `Maketile.coffee` and `Maketile.js` autoloading (but no API support yet)
edemaine
added a commit
that referenced
this issue
Oct 14, 2022
edemaine
added a commit
that referenced
this issue
Oct 15, 2022
Existing files or matching globs still take priority over rules, to avoid loading Maketile when possible.
edemaine
added a commit
that referenced
this issue
Oct 15, 2022
Existing files or matching globs still take priority over rules, to avoid loading Maketile when possible.
edemaine
added a commit
that referenced
this issue
Oct 15, 2022
* `main` and `run` (which is the main `svgtiler` function) now run within a `Driver` class that keeps track of that driver's settings. * `getDriver` and `runWithDriver` keep track of currently running Driver, and enable new Driver to inherit settings from parent. * Array of `formats` pushed into settings for proper inheritance. * `getSettings` now returns `defaultSettings` instead of `null`.
edemaine
added a commit
that referenced
this issue
Oct 15, 2022
* Specifying a directory on the command line recurses into that directory. * All example Makefiles now replaced by Maketiles
edemaine
added a commit
that referenced
this issue
Oct 16, 2022
Also fix glob spec to match first Maketile, not last
edemaine
added a commit
that referenced
this issue
Oct 16, 2022
Also fix glob spec to match first Maketile, not last
edemaine
added a commit
that referenced
this issue
Oct 18, 2022
edemaine
added a commit
that referenced
this issue
Oct 18, 2022
edemaine
added a commit
that referenced
this issue
Oct 29, 2022
This is basically done; remaining ideas are speculative, or left to #74. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instead of inventing a language as in #84, let's use JavaScript/CoffeeScript! This let us use
for
loops and compilatedswitch
/if
...else if
...else
logic. For example (based on #96):Maketile.js
/Maketile.coffee
run automatically bysvgtiler
without filename on command linesvgtiler directory-name
does the same fordirectory-name/Maketile.*
Maketile
. This allows tweaking the options via e.g.svgtiler -f
orsvgtiler -w
. PerhapsMaketile
executed if no filenames on command like (but note that some options that look like filenames might be rule names, and should be interpreted as such instead).svgtiler(['map1.js', 'drawing.asc'])
— array arguments treated as already parsed (nice for arbitrary filenames)svgtiler.main
(perhaps better namedsvgtiler.run
)Mapping
orDrawing
directly (viasvgtiler.require
, for example).for
loops, or else use...
svgtiler.group(...)
for parenthesis-like behavior.svgtiler('map1.js drawing.asc')
— string argument(s) parsed like shell (nice for more like Makefile usage)Maybe also explicit calls likeString vs. array argument seems like a better distinguisher.svgtiler.shell(...)
vssvgtiler.run(...)
for when e.g. you want to call on one directory name. Or maybe just use template literal idea below.#
and multiple lines*
).Mapping
objects or arrays, to mix with previous type.svgtiler`map1.js ${new Mapping(...)}`
in JS orsvgtiler"map1.js #{new Mapping(...)}"
in CS (template literal) is a possibility if we want a hybrid between the two. We can detect this via theraw
field in the first argument.Maketile.args
could still be the simpler command-line arguments only (essentially wrapped byMaketile
without extensionsvgtiler '''...'''
in CoffeeScript), as in Maketiles: Config files like Makefiles #84 (but without rules)*.{asc,xls*}
and check which type of processing you want to do.svgtiler.glob(pattern)
to find all files matching given pattern (synchronously, ideally)svgtiler.match(filename, pattern)
to test whether a file matches a given pattern.svgtiler.filter(svgtiler.glob('*.asc'), '!simple_*')
to implement set operations as in Filename patterns #96. (Sadly JavaScriptSet
s don't have union/intersection...)svgtiler
. Else need...glob
, which is maybe hard to do in template literal.svgtiler.glob
andsvgtiler
svgtiler
and don't reinitialize in this case.onInit
gets called every time the mapping file is listed on the command line. So maybe not a good optimization.svgtiler
multiple times. Typically we imagine clustering among drawings in terms of how to process them.Cakefile
'stask
function)export default
for main task, also so can call it from another (parent) MaketileMapping
, maybe a shared parent: Want JS/CS/JSX/require
parsing similarly, but don't wantonInit
/preprocess
/postprocess
.--maketile alternative-maketile.coffee
, in particular to enable running rules from another Maketilesvgtiler('dirName')
or viarequire('dirName/Maketile.js')()
.-m
is taken by--margin
-w
(Watch mode #74), withsvgtiler(...)
accumulating jobs into a list. Perhaps use ofsvgtiler.glob('*.asc')
also causes rerun when new.asc
file created.svgtiler --clean
by changing effect ofsvgtiler
function to delete files that would be generated. (Maketiles: Config files like Makefiles #84)svgtiler.needVersion('^3.1.0')
could allow specifying what version of SVG Tiler this is designed for (also in mapping files). (Maketiles: Config files like Makefiles #84)new InlineMapping -> ...
to simulate the code of a mapping file without a separate file?...
could schedule callbacks viasvgtiler.preprocess
etc.Mappings specified by classes or objects #95Export redesign #100 provides an alternative for inline mappings without separate files.The text was updated successfully, but these errors were encountered: