NimbleText – Data processing tool to manipulate text that conform to a specific structure
Sometimes when you need to import data, you may receive an email list. This email list needs to be imported into the DB. If the imported SQL syntax is generated, what should you do?
If there are only 10 emails in this email list, the hand-carved sql grammar problem is not too big, but what if there are 1000 emails?
In another situation that is more related to program development, suppose SA opens a list to tell you what properties this class needs. How to quickly generate this property?
In this article, I will introduce how to use NimbleText as a tool to quickly meet the requirements of the above two scenarios.
Introduction to NimbleText
NimbleText Small File
- Official website : http://nimbletext.com/
- Live (online version) : http://nimbletext.com/Live
- Desktop : Direct download
- Version differences : http://nimbletext.com/Home/Professional
The description given to him by the author of the NimbleText tool is: Manipulate text and data with light-weight patterns .

To put it simply, it is to generate content according to the template defined by the list data.
It still sounds a bit abstract, but it will be clearer when there are examples.
version difference
NimbleText is available in 3 versions:
- Live – online version
- Desktop – Application Edition
- Desktop + License – App version plus purchase license
This tool is very Buddhist. Basically, both Live and Desktop are free, and a license is only required for advanced functions. In my current use, Live is actually quite enough.

Introduction
The Live version will be introduced here .
The whole picture has 3 parts:
- For each row in the list : each data to be processed
- Substitute using this pattern : the content of the template
- Result : the last generated result

In the right part of “Result”, you can set each data:
- column separator : cutting words
- row separtor : line break
- insert : pre-existing template
The easiest way to use it is:
- Throw the data to be processed into
For each row in the list
- A template for
Subsitute using this pattern
adjusting results. You can use$0
to represent the first cut column, and so on - copying
Result
the final result
Use scenario 1 – generate insert sql syntax according to the list
This scenario is that there is a list that is part of the value of insert, for example, an insert sql syntax should be generated for each email.
Suppose, the obtained list is as follows:
[email protected]
[email protected]
[email protected]
None
The last sql syntax to be imported is to go to the fields EpaperSubscribe
in the table :email
INSERT INTO EpaperSubscribe (email)
VALUES ('$0');
None
Finally, you can Result
copy it out and execute it in SSMS.
Use scenario 2 – Generate a class property
Assuming that SA has opened all the property names and forms in the class, how to quickly generate these properties?
Assume that the list of property types and names obtained is as follows:
int Id
string Name
DateTime CREATEDATE
None
The property to be generated is a public version including get and set, and the template will be:
public $0 <% $1.toPascalCase() %> { get; set;}
NoneNotice here that the name of the last field is
all uppercase , but the property name that conforms to the C# naming rules can be created through the function of NimbleText.If you want to create a property including private variable, you can choose it from the template as a reference.For the example above to be successful, remember to change
the column separator
to blank .
The final result is directly pasted into the C# class.
End Notes
If there is no NimbleText to achieve the above functions, it is generally generated using a combination similar to RegEx, but it is actually not easy to write.
By using NimbleText, the whole operation becomes very simple, and by recording these patterns, the same data structure can produce the required results at any time.
If you have better tools and practices, please leave a message to me.