A tool for scan and replace file content. Instead of global search and replace, it can specify replace scope

Overview

ScanReplace.kt

A tool for scan and replace file content

Instead of global search and replace, it can specify replace scope

Usage

java -jar ScanReplace-<version>.jar <filePathToKeyFilePath> <keyValueFilePath> [outputFolderPath]

Example:

java -jar ScanReplace-1.1.0.jar filePathToKey.txt keyValue.txt

Get Started

Download latest version on Release

Create filePathToKey.txt

test.txt = key1, key2

Create keyValue.txt

key1 = [it is key 1]
key2 = [key2 here]

Create test.txt

key1
meow 42
key2

Run script

java -jar ScanReplace-<version>.jar filePathToKey.txt keyValue.txt

Content of test.txt will change to be

[it is key 1]
meow 42
[key2 here]

Note

Format of filePathToKey.txt is

<path> = <key1>, <key2>, ...
<path> = <key1>, <key2>, ...
...

Format of keyValue.txt is

<key> = <value>
<key> = <value>
...

White space in left and right will be trim


<path> can refer under directory

e.g. dir1/test.txt


Only the key declare in filePathToKey.txt to corresponding file will be scan and replace

For example

// filePathToKey.txt
test.txt = key1

// keyValue.txt
key1 = [it is key1]
key2 = [it is key2]

// test.txt
key1
key2

key2 in test.txt will not be replace, because key2 not declare in filePathToKey.txt to corresponding file

You can check out a example in example/key2-not-replace/


Option [outputFolderPath] set output folder

All output file with [outputFolderPath] as parent directory

For example:

java -jar ScanReplace-<version>.jar <filePathToKeyFilePath> <keyValueFilePath> output

Leave it blank will replace file in-place


You might also like...
A program to calculate the distance traveled during the run the calories burned and the average speed Display data in more than one way using a graph
A program to calculate the distance traveled during the run the calories burned and the average speed Display data in more than one way using a graph

Running App Features: A program to calculate the distance traveled during the run the calories burned and the average speed Display data in more than

A JUnit5 Platform TestEngine integrated with the official FHIR Validator to run profile and Questionnaire validation as tests.
A JUnit5 Platform TestEngine integrated with the official FHIR Validator to run profile and Questionnaire validation as tests.

🔥 FHIR Validator JUnit Engine A JUnit5 TestEngine to integrate the FHIR Validator into the JUnit5 ecosystem. Supports writing expected validation out

Espresso - Use Espresso to write concise, beautiful, and reliable Android UI tests
Espresso - Use Espresso to write concise, beautiful, and reliable Android UI tests

Espresso Use Espresso to write concise, beautiful, and reliable Android UI tests

A set of TestRules and ActivityScenarios to facilitate UI Testing under given configurations: FontSizes, Locales

AndroidUiTestingUtils A set of TestRules, ActivityScenarios and utils to facilit

Setup CheckStyle, FindBugs, PMD and Lint for your Android project easily

android-quality-starter setup CheckStyle, FindBugs, PMD and Lint for your Android project easily This project adds gradle setup for quality tools ment

ArchGuard Scanner for scan Git change history, scan source code by Chapi for Java, TypeScript, Kotlin, Go..、Java bytecode use for JVM languages, scan Jacoco test coverage.

Arch Scanner Requirements: JDK 12 Scanner: scan_git - Git commit history scan scan_jacoco - Jacoco scan scan_bytecode - for JVM languages known issues

Android port of Simon Tatham's Puzzles. *git replace in use* - you might want to {{ git fetch origin 'refs/replace/*:refs/replace/*' }}

This is the README accompanying the source code to Simon Tatham's puzzle collection. The collection's web site is at https://www.chiark.greenend.org.

This application uses Google Play Services Vision library to scan barcodes. It uses Google's on device ML kit to scan for barcodes.
This application uses Google Play Services Vision library to scan barcodes. It uses Google's on device ML kit to scan for barcodes.

Barcode-Scanner This application showcases use of Google Play Services Vision library It uses Google's on device machine learning kit to scan for barc

An easy-to-use Android library that will help you to take screenshots of specif views of your app and save them to external storage (Including API 29 Q+ with Scope Storage)

🇺🇸 English | 🇧🇷 Português (pt-br) 🇺🇸 English: An easy to use Library that will help you to take screenshots 📸 of the views in your app Step 1.

A scope tree based Dependency Injection (DI) library for Java / Kotlin / Android.
A scope tree based Dependency Injection (DI) library for Java / Kotlin / Android.

Toothpick (a.k.a T.P. like a teepee) Visit TP wiki ! What is Toothpick ? Toothpick is a scope tree based Dependency Injection (DI) library for Java. I

BlackDex is an Android unpack tool, it supports Android 5.0~12 and need not rely to any environment. BlackDex can run on any Android mobile phones or emulators, you can unpack APK File in several seconds.
BlackDex is an Android unpack tool, it supports Android 5.0~12 and need not rely to any environment. BlackDex can run on any Android mobile phones or emulators, you can unpack APK File in several seconds.

BlackDex is an Android unpack tool, it supports Android 5.0~12 and need not rely to any environment. BlackDex can run on any Android mobile phones or emulators, you can unpack APK File in several seconds.

This is an android studio plugin that allows you to creates new color in hex format based on a percentage (0-100) and a base color you specify.

alpha-color Description This is an android studio plugin that allows you to creates new color in hex format based on a percentage (0-100) and a base c

An application to create custom QR codes to specify waste types and waste disposal procedures for products.

wasteqr An application to create custom QR codes to specify waste types and waste disposal procedures for products. What is WasteQR? WasteQR is an app

Alternative to DreamStorageService, but instead of storing files on a database, it is stored on the file system itself.

EtherealGambi Alternative to DreamStorageService, but instead of storing files on a database, it is stored on the file system itself. I made this beca

A tool translate a apk file to stantard android project include so hook api and il2cpp c++ scaffolding when apk is a unity il2cpp game. Write code on a apk file elegantly.

FakerAndroid (FakerAndroid.jar or FakerAndroid-AS) A tool translate a apk file to stantard android project include so hook api and il2cpp c++ scaffold

EduApp is a mini e-learning platform based on udemy's public api. It has 4 main navigation destinations (Home, Search, Wishlist, Cart). Users can search courses from different categories and get real-time results from the api using Chips for a smooth filtering experience. It has different theme for dark mode.
Gradle Replace In Place (GRIP): a gradle plugin to update your documentation or any file with a simple gradle task

GRIP (Gradle Replace In-Place) A gradle tool to update some values in your (documentation) files by running a task. (inspired by Knit) Directives Inse

ActionsContentView is an standalone library implements actions/content swiping view (AKA Side Navigation UI Pattern, AKA Facebook side menu).  The library doesn't use any specific code introduced in new Android SDK versions. This allows develop an application with an action/content swiping view for every version of Android from 2.2 and up.
Owner
CWKSC
(,,・ω・,,)
CWKSC
Kotlin wrapper for React Test Renderer, which can be used to unit test React components in a Kotlin/JS project.

Kotlin API for React Test Renderer Kotlin wrapper for React Test Renderer, which can be used to unit test React components in a Kotlin/JS project. How

Xavier Cho 7 Jun 8, 2022
Selenium WebDriver and Appium based Web, Mobile (Android, iOS) and Windows desktop Automation Framework with BDD & Non-BDD implementation support

Selenium WebDriver and Appium based Web, Mobile (Android, iOS) and Windows desktop Automation Framework with BDD & Non-BDD implementation support

null 10 Dec 5, 2022
Powerful, elegant and flexible test framework for Kotlin with additional assertions, property testing and data driven testing

Kotest is a flexible and comprehensive testing tool for Kotlin with multiplatform support. To learn more about Kotest, visit kotest.io or see our quic

Kotest 3.8k Jan 3, 2023
A collection of tests and easy to reuse pieces of code for bdk-jvm and bdk-android

Readme This repo is a collection of tests and easy to reuse pieces of code for bdk-jvm and bdk-android. Note that they don't aim to provide a full cov

thunderbiscuit 1 Jun 28, 2022
Library to simplify and speed up the creation and work with adapters with payload.

Novalles Library to simplify and speed up the creation and work with adapters with payload. How to use Annotate your UI model with UIModel Annotation.

Бырна Алексей 3 Oct 11, 2022
Control and manage Android devices from your browser.

Warning This project along with other ones in OpenSTF organisation is provided as is for community, without active development. You can check any othe

STF 12.7k Jan 6, 2023
null 866 Dec 27, 2022
TestObserver to easily test LiveData and make assertions on them.

JCenter Update LiveData Testing is currently published on JCenter - it will serve packages until February 1st, 2022. LiveData Testing packages will be

Josef Raska 395 Dec 8, 2022
An ActivityScenario extension and a Junit4 TestRule to simulate changing the font size on a device/emulator, as it would be done by going to Settings > display > Font size

FontSizeActivityScenario and FontSizeTestRule An ActivityScenario and a Junit4 TestRule to be used together with its org.junit.runners.Parameterized.

Sergio Sastre Flórez 19 Jan 6, 2022
Barista makes developing UI test faster, easier and more predictable. Built on top of Espresso

Barista makes developing UI test faster, easier and more predictable. Built on top of Espresso, it provides a simple and discoverable API, removing most of the boilerplate and verbosity of common Espresso tasks. You and your Android team will write tests with no effort.

Adevinta Spain 1.6k Jan 5, 2023