GithubHelp home page GithubHelp logo

dwainblazej / search-xml Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 23 KB

Search .xml and .ditamap files for the word <search-text>. During the search, exclude from the results instances where <search-text> is immediately preceded by any <exclusion-text>. Store the search results in a CSV file.

License: GNU General Public License v3.0

Ruby 100.00%

search-xml's Introduction

search-xml

Search .xml and .ditamap files for the word <search-text>. During the search, exclude from the results instances where <search-text> is immediately preceded by any <exclusion-text>. Store the search results in a CSV file.

Usage

ruby search-xml [options] <search-text> <prefix-exclusion-text> [<prefix-exclusion-text>...]

Options:

--column-separator=UNIQUE: Character or string of characters used to separate columns in the output. Default: |
-o, --csv-output=FILE: The file to output results, in CSV format, into. Default: search-xml.csv
-d, --directory=DIRECTORY: The directory to start the search in. Defaults to the directory this command is run in.
--no-show-relative-path: Report the file names using their full path. Defaults to showing paths relative to the current directory.
-p, --progress: Show the name of the file currently being searched.

Common options:

-q, --verbose: Show results as they are found.
--version: Show version message.
-h, --help: Show this message.

Examples:

To report XML elements containing "workbench", except if the word before "workbench" is "translation":
ruby search-xml workbench translation

To report XML elements containing "workbench", except if the word before "workbench" is either "translation" or "wood":
ruby search-xml workbench translation wood

To report XML elements containing "workbench" without restricting what it's preceded by (in a directory that you're pretty sure doesn't contain any occurences of zzzzzzzzzzzzzzzzzzzzzzzzz workbench):
ruby search-xml workbench zzzzzzzzzzzzzzzzzzzzzzzzz

search-xml's People

Contributors

dwainblazej avatar ruthemmanuelle avatar

Watchers

 avatar

Forkers

ruthemmanuelle

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.