Skip to content
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

bulk formating #11

Open
missinglink opened this issue Aug 30, 2021 · 2 comments
Open

bulk formating #11

missinglink opened this issue Aug 30, 2021 · 2 comments

Comments

@missinglink
Copy link
Contributor

I was looking for a method of running this code against an entire directory today (recursively).

What I came up with was this:

find /data -type f -name '*.geojson' -exec bash -c './bin/wof-format $0 > $0.tmp; mv $0.tmp $0' {} \;

It's not super elegant, but works, should we add this to the README or would you prefer to add support for passing directories as $1 such as there is for exportify?

@missinglink
Copy link
Contributor Author

[edit] maybe an -i (in place) flag like from sed would be nicer?

@thisisaaronland
Copy link
Member

A tool built on top of

Would accomplish this and be agnostic about the source (and destination) of the WOF records. Essentially a tool to iterate over a source:

And rather than counting things invoke the code here (where "here" means []byte rather than an io.ReadSeeker but the gist is the same:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants