This program can be used to show data from your contributed results (workunit statistics and their individual statistics) on World Community Grid.
There is no need to configure wcgformat, since the only purpose of the program is to convert selected text from your screen to a format that can be used to post on the forum.
There are two pagetypes on World Community Grid that can be used to convert text from your screen.
The first type is the Results Status page: https://www.worldcommunitygrid.org/contribution/results. This page shows your results, i.e. the tasks that have been assigned to your device(s).
The second type is the Workunit Status page; its URL begins with https://www.worldcommunitygrid.org/contribution/workunit/ and ends with the number of the workunit to which your task belongs.
The URL of a Workunit Status page is perishable, i.e. the data will be purged and the page will cease to exist after some time. However, by saving the text from your results (and probably using wcgformat), the data will still be available to you until you decide to erase the data.
Since the data of workunits will be purged after some time, this will also mean that results will disappear from your Results Status page, too, after that same time.
The Results Status page is https://www.worldcommunitygrid.org/contribution/results and whenever there are results available to you they will be listed there.
On a Results Status page there are 8 fields, according to the header of these 8 fields:
1. Result name
2. Device name
3. Status
4. Sent time
5. Time due
6. Return time
7. Cpu time/Elapsed time
8. Claimed credit/Granted credit
Underneath the header each individual result is listed, identified by their unique result name.
Image: example of a Results Status page.
You can even filter your results by using the sieve button (indicated by the symbol that you'll find between those of the looking glass and the download symbol, over the 8th field, 'Claimed credit/Granted credit') to narrow down your list. If you still don't know what these symbols look like, see the image below to have them pointed out:
Image: the symbols over the credit field.
To put wcgformat to use with the results from your Results Status page, you should select (e.g. with your mouse) the lines of text that you desire. One way is to start at the left side of the desired result name and end at the right side of the line, so that you will have selected the complete name of the result and the complete contents of the rest of the line. If you desire you can select more lines (results) at once.
After you have made your selection you can paste the selected text: if you have started a terminal, call wcgformat there, then paste the selected text into that terminal and end the input with a newline and a ctrl-D, so that wcgformat will be able to start converting the text.
(NB: You could also paste the selected text into a file and use that file as an argument of wcgformat.)
If you would have selected the four results from the example above and pasted these four lines into wcgformat, the output would look like this:
[code][u]Result name[/u] [u]Status[/u] [u]Sent time[/u] [u]Due / Return time[/u] [u]CPUtime/Elapsed[/u] [u]Claimed/Granted[/u]
OPN1_0109744_00775_[b]1[/b] [b][color=green]Valid [/color][/b] 2022-07-10 05:18:05 2022-07-10 06:05:50 0.74/0.74 13.1/68.8
OPN1_0109727_00554_[b]1[/b] [b][color=green]Valid [/color][/b] 2022-07-10 01:16:58 2022-07-10 02:03:53 0.74/0.74 14.9/14.9
OPN1_0109727_00665_[b]1[/b] [b][color=green]Valid [/color][/b] 2022-07-10 01:16:58 2022-07-10 02:04:50 0.74/0.74 15.6/15.6
OPN1_0109712_00295_[b]1[/b] [b][color=green]Valid [/color][/b] 2022-07-09 23:53:54 2022-07-10 00:41:41 0.73/0.73 14.3/164.3[/code]
Using the output above it may look a bit (read: a lot) more attractive on the forum of World Community Grid than just copying the unformatted text onto the forum.
If we would click on one result name from the example above, e.g. OPN1_0109744_00775_1
, it would mean that we would land on https://www.worldcommunitygrid.org/contribution/workunit/152314650, that is the page of workunit 152314650 in this case. Now this is what we call a Workunit Status page. By the time that you read this, the designated page will be purged, so don't bother clicking that page of workunit 152314650.
On a Workunit Status page there are 8 fields, according to the header of these 8 fields:
1. Result name
2. OS type
3. OS version
4. Status
5. Sent time
6. Time due/Return time
7. Cpu time/Elapsed time
8. Claimed credit/Granted credit
If you compare the 8 fields both on a Results Status page and on a Workunit Status page, you would see they are almost the same, yet different. Also, a looking glass, a sieve and a download button are missing on Workunit Status pages. Furthermore, noteworthy is that you can't click the result name here, it would be futile, isn't it? (Unless you forgot to record your device name on which it took place, see the Results Status page.)
Underneath the header each individual result of the workunit is listed, identified by their unique result name.
Image: example of a Workunit Status page.
To put wcgformat to use with the workunit from the Workunit Status page, you should select (e.g. with your mouse) the lines of text that you desire. One way is to start at the left side of the first result name and end at the right side of the last result line, so that you will have selected the complete name of the first result and the complete contents of the last line. The first line and the last line may be the same if there is only one result.
Image: example of a Workunit Status page after selecting all results.
After you have made your selection you can paste the selected text: if you have started a terminal, call wcgformat there, then paste the selected text into that terminal and end the input with a newline and a ctrl-D, so that wcgformat will be able to start converting the text.
If you would have selected the two lines of text from the example above and pasted these two lines into wcgformat, the output would look like this:
[code][u]Result name[/u] [u]OS type[/u] [u]OS version[/u] [u]Status[/u] [u]Sent time[/u] [u]Due / Return time[/u] [u]CPUtime/Elapsed[/u] [u]Claimed/Granted[/u]
OPN1_0109744_00775_[b]0[/b] Linux Fedora Fedora Linux 36 (Thirty Six) [5.18.10-200.fc36.x86_64|libc 2.35 (GNU libc)] [b][color=green]Valid [/color][/b] 2022-07-09 17:08:52 2022-07-10 05:17:41 3.1/3.12 124.5/68.8
OPN1_0109744_00775_[b]1[/b] Linux Fedora Fedora Linux 35 (Xfce) [5.18.9-100.fc35.x86_64|libc 2.34 (GNU libc)] [b][color=green]Valid [/color][/b] 2022-07-10 05:18:05 2022-07-10 06:05:50 0.74/0.74 13.1/68.8[/code]
There are several options available when using wcgformat to shorten these long lines or to produce less output.
This option tells the program to omit the headerline that will usually be produced.
Example:
[code]OPN1_0109744_00775_[b]1[/b] [b][color=green]Valid [/color][/b] 2022-07-10 05:18:05 2022-07-10 06:05:50 0.74/0.74 13.1/68.8
OPN1_0109727_00554_[b]1[/b] [b][color=green]Valid [/color][/b] 2022-07-10 01:16:58 2022-07-10 02:03:53 0.74/0.74 14.9/14.9
OPN1_0109727_00665_[b]1[/b] [b][color=green]Valid [/color][/b] 2022-07-10 01:16:58 2022-07-10 02:04:50 0.74/0.74 15.6/15.6
OPN1_0109712_00295_[b]1[/b] [b][color=green]Valid [/color][/b] 2022-07-09 23:53:54 2022-07-10 00:41:41 0.73/0.73 14.3/164.3[/code]
This option indicates that the signature of the program wcgformat should be added.
This option will prevent the program from using colours in the field named Status.
This option will try to shorten the text in the field named Status. Adding another -s to the command line will try to shorten the text even more. Useful with statuses like "Pending Validation", "Pending Verification", "Server aborted", "User aborted" and "Waiting to be sent".
This option will prevent generating code for underlining the fieldnames in the headerline.
Example:
[code]Result name Status Sent time Due / Return time CPUtime/Elapsed Claimed/Granted
OPN1_0109744_00775_[b]1[/b] [b][color=green]Valid [/color][/b] 2022-07-10 05:18:05 2022-07-10 06:05:50 0.74/0.74 13.1/68.8
OPN1_0109727_00554_[b]1[/b] [b][color=green]Valid [/color][/b] 2022-07-10 01:16:58 2022-07-10 02:03:53 0.74/0.74 14.9/14.9
OPN1_0109727_00665_[b]1[/b] [b][color=green]Valid [/color][/b] 2022-07-10 01:16:58 2022-07-10 02:04:50 0.74/0.74 15.6/15.6
OPN1_0109712_00295_[b]1[/b] [b][color=green]Valid [/color][/b] 2022-07-09 23:53:54 2022-07-10 00:41:41 0.73/0.73 14.3/164.3[/code]
This option will try to shorten the name of the OS type (in the field OS type). See also option -o.
This option will generate code to put the fields OS type and OS version in a smaller font. Adding another -f to the command line will generate code to put the whole line in a smaller font.
This option will shorten the text "Granted" in the headerline by only one character to "Grant.", while adding another -G to the command line will shorten it even further to just "Gr.", using only three characters to try to make it fit on one line on the forum.
This option will leave out the field OS version. Adding another -o to the command line will also leave out the field OS type.
Example 1, using -o once, in combination with -G specified twice:
[code][u]Result name[/u] [u]OS type[/u] [u]Status[/u] [u]Sent time[/u] [u]Due / Return time[/u] [u]CPUtime/Elapsed[/u] [u]Claimed/Gr.[/u]
OPN1_0109744_00775_[b]0[/b] Linux Fedora [b][color=green]Valid [/color][/b] 2022-07-09 17:08:52 2022-07-10 05:17:41 3.1/3.12 124.5/68.8
OPN1_0109744_00775_[b]1[/b] Linux Fedora [b][color=green]Valid [/color][/b] 2022-07-10 05:18:05 2022-07-10 06:05:50 0.74/0.74 13.1/68.8[/code]
Example 2, using -o twice:
[code][u]Result name[/u] [u]Status[/u] [u]Sent time[/u] [u]Due / Return time[/u] [u]CPUtime/Elapsed[/u] [u]Claimed/Granted[/u]
OPN1_0109744_00775_[b]0[/b] [b][color=green]Valid [/color][/b] 2022-07-09 17:08:52 2022-07-10 05:17:41 3.1/3.12 124.5/68.8
OPN1_0109744_00775_[b]1[/b] [b][color=green]Valid [/color][/b] 2022-07-10 05:18:05 2022-07-10 06:05:50 0.74/0.74 13.1/68.8[/code]
This option will leave out all fields to the right of the field Status, such as Sent time, Time due/Return time, Cpu time/Elapsed time and Claimed credit/Granted credit, so that almost all room may be awarded to the (most of the time long) field OS version. Adding another -O to the command line will shorten the field Status to "Stat.", while adding yet another -O will completely leave out the field Status.
Example 1, using -O once, in combination with -f specified twice:
[code][u]Result name[/u] [size=1][u]OS type[/u] [u]OS version[/u] [/size] [u]Status[/u]
OPN1_0109744_00775_[b]0[/b] [size=1]Linux Fedora Fedora Linux 36 (Thirty Six) [5.18.10-200.fc36.x86_64|libc 2.35 (GNU libc)][/size] [b][color=green]Valid [/color][/b]
OPN1_0109744_00775_[b]1[/b] [size=1]Linux Fedora Fedora Linux 35 (Xfce) [5.18.9-100.fc35.x86_64|libc 2.34 (GNU libc)] [/size] [b][color=green]Valid [/color][/b][/code]
Example 2, using -O twice, in combination with -f specified once:
[code][u]Result name[/u] [size=1][u]OS type[/u] [u]OS version[/u] [/size]
OPN1_0109744_00775_[b]0[/b] [size=1]Linux Fedora Fedora Linux 36 (Thirty Six) [5.18.10-200.fc36.x86_64|libc 2.35 (GNU libc)][/size]
OPN1_0109744_00775_[b]1[/b] [size=1]Linux Fedora Fedora Linux 35 (Xfce) [5.18.9-100.fc35.x86_64|libc 2.34 (GNU libc)] [/size][/code]
Example 3, using -O three times:
[code][u]Result name[/u] [u]OS type[/u] [u]OS version[/u]
OPN1_0109744_00775_[b]0[/b] Linux Fedora Fedora Linux 36 (Thirty Six) [5.18.10-200.fc36.x86_64|libc 2.35 (GNU libc)]
OPN1_0109744_00775_[b]1[/b] Linux Fedora Fedora Linux 35 (Xfce) [5.18.9-100.fc35.x86_64|libc 2.34 (GNU libc)] [/code]