All Projects → citycide → glob

citycide / glob

Licence: MIT license
Pure Nim library for matching file paths against Unix style glob patterns.

Programming Languages

nim
578 projects
HTML
75241 projects

Projects that are alternatives of or similar to glob

matched
Glob matching with support for multiple patterns and negation. Use `~` in cwd to find files in user home, or `@` for global npm modules.
Stars: ✭ 25 (-56.9%)
Mutual labels:  pattern, glob, glob-matching
bash-glob
Bash-powered globbing for node.js. Alternative to node-glob. Does not work on Windows 9 and lower.
Stars: ✭ 13 (-77.59%)
Mutual labels:  pattern, match, glob
Globbing
Introduction to "globbing" or glob matching, a programming concept that allows "filepath expansion" and matching using wildcards.
Stars: ✭ 86 (+48.28%)
Mutual labels:  pattern, glob
replace-in-files
Replace text in one or more files or globs.
Stars: ✭ 21 (-63.79%)
Mutual labels:  filesystem, glob
Fast Glob
🚀 It's a very fast and efficient glob library for Node.js
Stars: ✭ 1,150 (+1882.76%)
Mutual labels:  filesystem, glob
extglob
Extended globs. Add (almost) the expressive power of regular expressions to glob patterns.
Stars: ✭ 25 (-56.9%)
Mutual labels:  pattern, glob
Glob
Go glob
Stars: ✭ 670 (+1055.17%)
Mutual labels:  pattern, glob
Fdir
⚡ The fastest directory crawler & globbing library for NodeJS. Crawls 1m files in < 1s
Stars: ✭ 777 (+1239.66%)
Mutual labels:  filesystem, glob
to-absolute-glob
Make a glob pattern absolute, ensuring that negative globs and patterns with trailing slashes are correctly handled.
Stars: ✭ 16 (-72.41%)
Mutual labels:  pattern, glob
Draxt
draxt.js – NodeList/jQuery-like package for File System (node.js)
Stars: ✭ 192 (+231.03%)
Mutual labels:  filesystem, glob
Xcv
✂️ Cut, Copy and Paste files with Bash
Stars: ✭ 144 (+148.28%)
Mutual labels:  filesystem, glob
Copy Webpack Plugin
Copy files and directories with webpack
Stars: ✭ 2,679 (+4518.97%)
Mutual labels:  filesystem, glob
dir-glob
Convert directories to glob compatible strings
Stars: ✭ 41 (-29.31%)
Mutual labels:  pattern, glob
Nanomatch
Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but without support for extended globs (extglobs), posix brackets or braces, and with complete Bash 4.3 wildcard support: ("*", "**", and "?").
Stars: ✭ 79 (+36.21%)
Mutual labels:  pattern, glob
globrex
Glob to regular expression with support for extended globs.
Stars: ✭ 52 (-10.34%)
Mutual labels:  pattern, glob
Tiny Glob
Super tiny and ~350% faster alternative to node-glob
Stars: ✭ 710 (+1124.14%)
Mutual labels:  filesystem, glob
glob-fs
file globbing for node.js. speedy and powerful alternative to node-glob. This library is experimental and does not work on windows!
Stars: ✭ 54 (-6.9%)
Mutual labels:  match, glob
html-comment-regex
Regular expression for matching HTML comments
Stars: ✭ 15 (-74.14%)
Mutual labels:  pattern, match
Glob
Glob for C++17
Stars: ✭ 74 (+27.59%)
Mutual labels:  filesystem, glob
route pattern generator
A Dart static code generator that produces matchers and builders from route uri patterns.
Stars: ✭ 31 (-46.55%)
Mutual labels:  pattern, match

glob · nimble license GitHub Actions

Match file paths against Unix style patterns called globs.

glob is a cross-platform, pure Nim implementation of globs that supports creating patterns, testing file paths, and walking through directories to find matching files or directories.

If you're unfamiliar with globs, they essentially let you use a simple language to describe what filenames you're looking for with wildcards, placeholders, and other pretty intuitive features.

You can find the full documentation here.

features

  • full glob support across platforms
  • all glob syntax: * and ? wildcards plus ranges, groups, & pattern matching
  • efficient file system walking without unnecessary traversals
  • configurable iteration behavior with sane defaults
  • user defined filters for matching and directory traversal

installation & usage

Install using Nimble:

nimble install glob

Then import and use:

import glob

const pattern = glob("src/**/*.nim")
assert "src/foo.nim".matches(pattern)
assert "src/lib.rs".matches(pattern).not

# directories are expanded by default
# so `src` and `src/**` are equivalent
for path in walkGlob("src"):
  # every file in `src` or its subdirectories, lazily
  echo path

# need the list now (eagerly)?
from sequtils import toSeq
echo toSeq(walkGlob("src/*.nim"))

development

To build glob from source you'll need to install Nim and its package manager Nimble.

  1. Clone the repo: git clone https://github.com/haltcase/glob.git
  2. Move into the newly cloned directory: cd glob
  3. Make your changes: src, tests.nim
  4. Run tests: nimble test

Commits should follow the Conventional Commits standard, which allows for automated changelog generation.

Releases are deployed automatically when new tags are created. For collaborators on this project, please follow this process for releasing a new version:

  1. Ensure tests are passing, as usual.
  2. Update the version in glob.nimble per semver.
  3. Run nimble prep_release, which will update changelog.md, commit changes to glob.nimble & changelog.md, and create a new tag.
  4. Run git push --follow-tags to ensure the tag is pushed along with the commit.
  5. GitHub Actions will take it from there: the new tag will trigger the release workflow to deploy a new version of the docs and create a release on GitHub.

contributing

This project is open to contributions of all kinds! Please check and search the issues if you encounter a problem before opening a new one. Pull requests for improvements are also welcome — see the steps above for development.

license

MIT © Bo Lingen

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].