Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
panelIconIdatlassian-info
panelIcon:info:
bgColor#E3FCEF

Please read the Terms of Use for Materials on ZennoLab

Table of contents

Expand
titleClick here to expand the table of contents
Table of Contents
exclude^Оглавление$

...

Description

Lists are mainly used to get lines of data from a text document or data records to a file. For example, you have a file with a list of URLs and you need to access them one by one, or you parse some values from the site and need to sort them, delete duplicates and save them to a file (for example, parsed e-mail addresses).

...

Before starting work, you need to create a List .

...

How to add an action to a project?

...

Select part of the lines from the list.

...

  1. We select the list with which we will work.

  2. We indicate the function.

  3. We indicate where the result will be saved.

  4. Sublist filtering method
    a) Range - set the interval of lines to be selected.
    b) Elements without text - will select all lines that do not contain the specified text, you can use variables.
    c) Elements that do not match the regular expression are - search criteria using the regular expression.
    d) Elements containing text - will select values that contain the required text, you can use variables.
    e) Elements matching a regular expression are search criteria using a regular expression.

  5. This field specifies the value corresponding to the item from step 4.

  6. Lines that match the search criteria will be deleted.

  7. If the list is empty, Zennoposter will follow the red line.

Expand
titleExample

We take the first five lines from the list (numbering from zero!) And save them to list 2

List 1

Before processing

After working off

List 2

...

Add data from the list

Adding data from one list to another.

...

  1. Choose a list with which we will work

  2. Installing the function.

  3. We indicate where the lines will be wrapped from.

  4. In which position the result is placed - go back to the start , go to the end , to position.

  5. If you have chosen to position, then indicate the line number or variable.

The lines are copied but not removed from the specified list.

Expand
titleExample

Add lines from list 2 to the end of list 1

List 2

List 1

Before processing

After processing

List 2 items remain in place

...

Adding a line to the list.

...

  1. Choose a list with which we will work

  2. Installing the function.

  3. We introduce a value or a variable.

  4. In which position the result is placed - go back to the start , go to the end , to position.

  5. If you have chosen to position, then indicate the line number or variable.

Expand
titleExample

Put the value at the end of list 1

List 1

Before processing

After processing

...

Add text

Adding text to the list.

...

  1. Choose a list with which we will work

  2. Installing the function.

  3. The text or character set to add to the list, you can specify a variable.

  4. In which position the result is placed - go back to the start , go to the end , to position.

  5. Add blank lines if there is no text.

Expand
titleExample

Add text to list 1

List 1

Before processing

After processing

The text had a newline separator, so it was added to the list line by line

...

Combining list items with a delimiter and the ability to write to a variable.

...

  1. Choose a list with which we will work

  2. Installing the function.

  3. Line separator
    a) New line - each element of the list will be written on a new line.
    b) Custom - specify your text or characters that will be inserted between the lines.
    c) Specified in the list - the separator from the list settings is used.

  4. Variable for writing data after processing.

Expand
titleExample

Combine the elements of list 1 using custom separator “-;“

List content 1

The result of processing the list will be in the stroka variable

...

Arrangement of items in the list in random order.

...

  1. Choose a list with which we will work

  2. Installing the function.

Changing the position does not entail the loss of row values.

Expand
titleExample

Shuffle list items 1

List 1

Before processing

After processing

...

Getting the number of lines in the list.

...

  1. Choose a list with which we will work

  2. Installing the function.

  3. Search criteria (you can specify a variable):
    a) All
    b) Not containing text
    c) Not matching regex
    d) With value
    e) Containing text
    f) Matching regex

  4. Variable for writing data after processing.

The variable will always contain only a digital value

Expand
titleExample

Count the number of lines in the list 1 and put in a variable

List content 1

The result of processing the list will be in the kolichestvo_strok variable

...

Getting a line with the ability to remove it from the list and write it to a variable.

...

  1. Choose a list with which we will work

  2. Installing the function.

  3. Line criteria (you can specify a variable):
    a) Does not contain text
    b) Not matching regex
    c) First
    d) By number
    e) Random
    f) Matching regex

  4. Delete line after taking

  5. Put to variable.

Expand
titleExample

Get random string from list 1 to variable

List content 1

The result of processing the list will be in the stroka variable

...

Linking the list to a file during project execution.

...

  1. Choose a list with which we will work

  2. Installing the function.

  3. Select a file or specify a variable containing the path to the file.

  4. If the file is missing in the specified path, Zennoposter will automatically create it.

Expand
titleExample

Link file to list 1

List 1 will be linked to the corresponding file

...

Sort the list items in descending or ascending order.

...

  1. Choose a list with which we will work

  2. Installing the function.

  3. Use the principle like numbers.

  4. We set the type of sorting in descending or ascending order .

Info

Not always literal and character strings can be ordered

Expand
titleExample

Sort List 1 Values Descending

List 1

Before processing

After processing

...

Save to file

...

  1. Choose a list with which we will work

  2. Installing the function.

  3. Set the separator (you can use variables):
    a) New line
    b) Custom
    c) Specified in the list

  4. Select a file or specify a variable containing the path to the file.

  5. The checkbox allows you to write new data to the file or overwrite it completely.

Expand
titleExample

Save list 1 values to file

List content 1

After execution, all values will be written to the file

...

Removing duplicate lines in the list.

...

  1. Choose a list with which we will work

  2. Installing the function.

It can take time to process a file with many lines.

Expand
titleExample

Remove all takes in list 1

List 1

Before processing

After processing

...

Removing lines from a list with specified criteria

...

  1. Choose a list with which we will work

  2. Installing the function.

  3. Criteria for deleting lines (you can use variables):
    a) All
    b) Not containing text
    c) Not matching regex
    d) First
    e) By numbers ( ranges can be used)
    f) With value
    g) Containing text
    h) Containing only space symbols
    i) Matching regex

Expand
titleExample

Remove from the list 1 lines containing the @ symbol

List 1

Before processing

After processing


...

Let's imagine that you need to go through all the pages from the list, collect their names and put them in another list.

...

  1. Create a List _1 with pages having previously linked it to the file.

  2. We remove duplicates so as not to go to the page twice.

  3. Create and link to the List _2.

  4. Parse the necessary information from the pages to List _2.

  5. Delete duplicates.

Thus, you can generate lists of necessary information for further processing or use.

...

  1. Variable window

  2. Regular Expression Tester

  3. List