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

Add ignorePatterns property to the config option #113

Open
ttsukagoshi opened this issue Oct 1, 2023 · 1 comment
Open

Add ignorePatterns property to the config option #113

ttsukagoshi opened this issue Oct 1, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@ttsukagoshi
Copy link
Owner

Add the ignorePatterns option to c2g.config.json:

{
  // ...
  sourceDir: 'path/to/csv/files'
  ignorePatterns: [
    'file-name-to-ignore.csv', // specify a file by its file name
    '^pattern-to-ignore_\\d{8}.csv$' // or exclude files based on regular expression
  ]
}

Settings this option will exclude matching CSV files in sourceDir from the csv2gsheets process.

The pattern could be a specific file name or a JavaScript regular expression to denote a set of files.
In the above example, note that the backslash in \d is escaped, i.e., \\d. Regular expressions should be written as if one is using it for the RegExp() constructor.

@ttsukagoshi ttsukagoshi added the enhancement New feature or request label Oct 1, 2023
@ttsukagoshi ttsukagoshi self-assigned this Oct 1, 2023
@ttsukagoshi
Copy link
Owner Author

Using the .gitignore-syntax would be a simplified and user-friendly approach to specify CSV files that csv2gsheets should ignore.

See

@ttsukagoshi ttsukagoshi added this to the v2 milestone Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant