Skip to content

Commit 3130a67

Browse files
authored
[FolderWatcher] Formatting and write out of abbreviations in Docs (openhab#14793)
* Formatting and write out of abbreviations of time - `s` --> `in seconds` - `h` --> `in hours` - formatting of tables, things and rules - Unifiy usage of `'` and `"` * Formatting and rephrasing * Unify the order of localfolder, ftpfolder and s3bucket Signed-off-by: Felix Schneider <[email protected]>
1 parent f607dde commit 3130a67

File tree

1 file changed

+36
-42
lines changed
  • bundles/org.openhab.binding.folderwatcher

1 file changed

+36
-42
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
# FolderWatcher Binding
22

3-
This binding is intended to monitor FTP, local folder and S3 bucket and its subfolders and notify of new files
3+
This binding is intended to monitor a local folder, FTP and S3 bucket and their subfolders and notify of new files.
44

55
## Supported Things
66

7-
Currently the binding support three types of things: `ftpfolder`, `localfolder` and `s3bucket`.
7+
The binding support three types of things: `localfolder`, `ftpfolder` and `s3bucket`.
88

99
## Thing Configuration
1010

11-
The `ftpfolder` thing has the following configuration options:
11+
The `localfolder` thing has the following configuration options:
1212

13-
| Parameter | Name | Description | Required | Default value |
14-
|-------------------|--------------------------|-------------------------------------|----------|---------------|
15-
| ftpAddress | FTP server | IP address of FTP server | yes | n/a |
16-
| ftpPort | FTP port | Port of FTP server | yes | 21 |
17-
| secureMode | FTP Security | FTP Security | yes | None |
18-
| ftpUsername | Username | FTP user name | yes | n/a |
19-
| ftpPassword | Password | FTP password | yes | n/a |
20-
| ftpDir | RootDir | Root directory to be watched | yes | n/a |
21-
| listRecursiveFtp | List Sub Folders | Allow listing of sub folders | yes | No |
22-
| listHidden | List Hidden | Allow listing of hidden files | yes | false |
23-
| connectionTimeout | Connection timeout, s | Connection timeout for FTP request | yes | 30 |
24-
| pollInterval | Polling interval, s | Interval for polling folder changes | yes | 60 |
25-
| diffHours | Time stamp difference, h | How many hours back to analyze | yes | 24 |
13+
| Parameter | Name | Description | Required | Default value |
14+
| ------------------ | --------------------------- | ----------------------------------- | -------- | ------------- |
15+
| localDir | Local Directory | Local directory to be watched | yes | n/a |
16+
| listHiddenLocal | List Hidden | Allow listing of hidden files | yes | No |
17+
| pollIntervalLocal | Polling interval in seconds | Interval for polling folder changes | yes | 60 |
18+
| listRecursiveLocal | List Sub Folders | Allow listing of sub folders | yes | No |
2619

27-
The `localfolder` thing has the following configuration options:
20+
The `ftpfolder` thing has the following configuration options:
2821

29-
| Parameter | Name | Description | Required | Default value |
30-
|--------------------|---------------------|-------------------------------------|----------|---------------|
31-
| localDir | Local Directory | Local directory to be watched | yes | n/a |
32-
| listHiddenLocal | List Hidden | Allow listing of hidden files | yes | No |
33-
| pollIntervalLocal | Polling interval, s | Interval for polling folder changes | yes | 60 |
34-
| listRecursiveLocal | List Sub Folders | Allow listing of sub folders | yes | No |
22+
| Parameter | Name | Description | Required | Default value |
23+
| ----------------- | ------------------------------ | ----------------------------------- | -------- | ------------- |
24+
| ftpAddress | FTP server | IP address of FTP server | yes | n/a |
25+
| ftpPort | FTP port | Port of FTP server | yes | 21 |
26+
| secureMode | FTP Security | FTP Security | yes | None |
27+
| ftpUsername | Username | FTP user name | yes | n/a |
28+
| ftpPassword | Password | FTP password | yes | n/a |
29+
| ftpDir | RootDir | Root directory to be watched | yes | n/a |
30+
| listRecursiveFtp | List Sub Folders | Allow listing of sub folders | yes | No |
31+
| listHidden | List Hidden | Allow listing of hidden files | yes | false |
32+
| connectionTimeout | Connection timeout in seconds | Connection timeout for FTP request | yes | 30 |
33+
| pollInterval | Polling interval in seconds | Interval for polling folder changes | yes | 60 |
34+
| diffHours | Time stamp difference in hours | How many hours back to analyze | yes | 24 |
3535

3636
The `s3bucket` thing has the following configuration options:
3737

@@ -46,7 +46,7 @@ The `s3bucket` thing has the following configuration options:
4646
| s3Anonymous | Anonymous Connection | Connect anonymously (works for public buckets) | yes | true |
4747
## Events
4848

49-
This binding currently supports the following events:
49+
This binding supports the following event:
5050

5151
| Channel Type ID | Item Type | Description |
5252
|-----------------|-----------|----------------------------|
@@ -57,49 +57,43 @@ This binding currently supports the following events:
5757
Thing configuration:
5858

5959
```java
60-
folderwatcher:localfolder:myLocalFolder [ localDir="/myfolder", pollIntervalLocal=60, listHiddenLocal="false", listRecursiveLocal="false" ]
60+
folderwatcher:localfolder:myLocalFolder [ localDir="/myfolder", pollIntervalLocal=60, listHiddenLocal="false", listRecursiveLocal="false" ]
6161
folderwatcher:ftpfolder:myLocalFolder [ ftpAddress="X.X.X.X", ftpPort=21, secureMode="EXPLICIT", ftpUsername="username", ftpPassword="password", ftpDir="/myfolder/", listHidden="true", listRecursiveFtp="true", connectionTimeout=33, pollInterval=66, diffHours=25 ]
6262
folderwatcher:s3bucket:myS3bucket [ s3BucketName="mypublic-bucket", pollIntervalS3=60, awsRegion="us-west-1", s3Anonymous="true" ]
6363

6464
```
6565

6666
### Using in a rule:
6767

68-
FTP example:
68+
Local folder example:
6969

7070
```java
71-
rule "New FTP file"
72-
when
73-
Channel "folderwatcher:ftpfolder:myLocalFolder:newfile" triggered
71+
rule "New Local file"
72+
when
73+
Channel "folderwatcher:localfolder:myFTPFolder:newfile" triggered
7474
then
75-
76-
logInfo("NewFTPFile", receivedEvent.toString())
77-
75+
logInfo("NewLocalFile", receivedEvent.toString())
7876
end
7977
```
8078

81-
Local folder example:
79+
FTP example:
8280

8381
```java
84-
rule "New Local file"
85-
when
86-
Channel "folderwatcher:localfolder:myFTPFolder:newfile" triggered
82+
rule "New FTP file"
83+
when
84+
Channel "folderwatcher:ftpfolder:myLocalFolder:newfile" triggered
8785
then
88-
89-
logInfo("NewLocalFile", receivedEvent.toString())
90-
86+
logInfo("NewFTPFile", receivedEvent.toString())
9187
end
9288
```
9389

9490
S3 bucket example:
9591

9692
```java
9793
rule "New S3 file"
98-
when
94+
when
9995
Channel "folderwatcher:s3bucket:myS3bucket:newfile" triggered
10096
then
101-
10297
logInfo("NewS3File", receivedEvent.toString())
103-
10498
end
10599
```

0 commit comments

Comments
 (0)