Skip to content

Commit 4fd7752

Browse files
authored
Merge pull request #439 from ignatandrei/docopt.net
2 parents 3b9209b + 9871b62 commit 4fd7752

File tree

27 files changed

+875
-16
lines changed

27 files changed

+875
-16
lines changed

README.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# RSCG - 247 Examples of Roslyn Source Code Generators / 16 created by Microsoft /
1+
# RSCG - 248 Examples of Roslyn Source Code Generators / 16 created by Microsoft /
22

3-
The RSCG_Examples repository is a comprehensive documentation system that automatically processes and showcases 247 Roslyn Source Code Generator (RSCG) examples. The system transforms individual RSCG projects into structured documentation with code examples and cross-referenced content with a searchable website and code example exports.
3+
The RSCG_Examples repository is a comprehensive documentation system that automatically processes and showcases 248 Roslyn Source Code Generator (RSCG) examples. The system transforms individual RSCG projects into structured documentation with code examples and cross-referenced content with a searchable website and code example exports.
44

55
This system serves as both a learning resource for .NET developers interested in source generators and an automated pipeline for maintaining up-to-date documentation about the RSCG ecosystem
66

7-
## Latest Update : 2025-12-14 => 14 December 2025
7+
## Latest Update : 2025-12-15 => 15 December 2025
88

99
If you want to see examples with code, please click ***[List V2](https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG)***
1010

@@ -24,8 +24,32 @@ If you want to be notified each time I add a new RSCG example , please click htt
2424

2525
## Content
2626

27-
Those are the 247 Roslyn Source Code Generators that I have tested you can see and download source code example.
27+
Those are the 248 Roslyn Source Code Generators that I have tested you can see and download source code example.
2828
( including 16 from Microsoft )
29+
### 248. [docopt.net](https://ignatandrei.github.io/RSCG_Examples/v2/docs/docopt.net) , in the [CommandLine](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#commandline) category
30+
31+
Generated on : 2025-12-15 => 15 December 2025
32+
33+
<details>
34+
<summary>Expand</summary>
35+
36+
37+
38+
Author: Atif Aziz
39+
40+
docopt.net is the .net version of the docopt python beautiful command line parser. docopt.net helps you define an interface for your command-line app, and automatically generate a parser for it. docopt.net is based on conventions that have been used for decades in help messages and man pages for program interface description. Interface description in docopt.net is such a help message, but formalized. Check out http://docopt.org for a more detailed explanation.
41+
Quick example: var arguments = new DocOpt().Apply("Usage: prog [-a] [-b] FILE", args); if (arguments["-a"].IsTrue) { ... }
42+
}
43+
44+
Nuget: [https://www.nuget.org/packages/docopt.net/](https://www.nuget.org/packages/docopt.net/)
45+
46+
47+
Link: [https://ignatandrei.github.io/RSCG_Examples/v2/docs/docopt.net](https://ignatandrei.github.io/RSCG_Examples/v2/docs/docopt.net)
48+
49+
Source: [https://github.com/docopt/docopt.net](https://github.com/docopt/docopt.net)
50+
51+
</details>
52+
2953
### 247. [BlazorOcticons](https://ignatandrei.github.io/RSCG_Examples/v2/docs/BlazorOcticons) , in the [Blazor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#blazor) category
3054

3155
Generated on : 2025-12-14 => 14 December 2025

later.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Just later
22

3-
## Latest Update : 2025-12-14 => 14 December 2025
3+
## Latest Update : 2025-12-15 => 15 December 2025
44

55

66

v2/.tours/docopt.net.tour

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
{
3+
"$schema": "https://aka.ms/codetour-schema",
4+
"title": "docopt.net",
5+
"steps":
6+
[
7+
{
8+
"file": "rscg_examples/docopt.net/src/ConsoleArgs/ConsoleArgs.csproj",
9+
"description": "First, we add Nuget [docopt.net](https://www.nuget.org/packages/docopt.net/) in csproj ",
10+
"pattern": "docopt.net"
11+
}
12+
13+
,{
14+
"file": "rscg_examples/docopt.net/src/ConsoleArgs/Program.docopt.txt",
15+
"description": "File Program.docopt.txt ",
16+
"pattern": "this is the code"
17+
}
18+
19+
,{
20+
"file": "rscg_examples/docopt.net/src/ConsoleArgs/Program.cs",
21+
"description": "File Program.cs \r\n>> dotnet run --project rscg_examples/docopt.net/src/ConsoleArgs/ConsoleArgs.csproj ",
22+
"pattern": "this is the code"
23+
}
24+
25+
26+
,{
27+
"file": "rscg_examples/docopt.net/src/ConsoleArgs/obj/GX/DocoptNet/DocoptNet.CodeGeneration.SourceGenerator/ConsoleArgs.ProgramArguments.cs",
28+
"description": "Generated File 1 from 1 : ConsoleArgs.ProgramArguments.cs ",
29+
"line": 1
30+
}
31+
32+
],
33+
34+
"ref": "main"
35+
36+
}

v2/Generator/all.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,3 +246,4 @@ Nr,Key,Source,Category
246246
245,Monify, https://github.com/MooVC/monify,PrimitiveObsession
247247
246,Imposter, https://github.com/themidnightgospel/Imposter,Tests
248248
247,BlazorOcticons, https://github.com/BlazorOcticons/BlazorOcticons,Blazor
249+
248,docopt.net, https://github.com/docopt/docopt.net,CommandLine

v2/RSCGExamplesData/GeneratorDataRec.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,5 +1497,11 @@
14971497
"Category": 21,
14981498
"dtStart": "2025-12-14T00:00:00",
14991499
"show": true
1500+
},
1501+
{
1502+
"ID": "docopt.net",
1503+
"Category": 32,
1504+
"dtStart": "2025-12-15T00:00:00",
1505+
"show": true
15001506
}
15011507
]

v2/book/examples/docopt.net.html

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
2+
<h1>RSCG nr 248 : docopt.net</h1>
3+
4+
<h2>Info</h2>
5+
Nuget : <a href="https://www.nuget.org/packages/docopt.net/" target="_blank">https://www.nuget.org/packages/docopt.net/</a>
6+
7+
<p>You can find more details at : <a href="https://github.com/docopt/docopt.net" target="_blank"> https://github.com/docopt/docopt.net</a></p>
8+
9+
<p>Author :Atif Aziz</p>
10+
11+
<p>Source: <a href="https://github.com/docopt/docopt.net" target="_blank">https://github.com/docopt/docopt.net</a> </p>
12+
13+
<h2>About</h2>
14+
15+
Generating command line argument parsers from usage documentation.
16+
17+
<h2>
18+
How to use
19+
</h2>
20+
<h3>
21+
Add reference to the <a href="https://www.nuget.org/packages/docopt.net/" target="_blank">docopt.net</a> in the csproj
22+
</h3>
23+
<img src="images/docopt.net/ConsoleArgs.csproj.png" width="580" height="580" />
24+
25+
<h3>This was for me the <b>starting</b> code</h3>
26+
27+
<br />
28+
I have <b>coded</b> the file Program.cs
29+
<br />
30+
<img src="images/docopt.net/csFiles/Program.cs.png" width="580" height="580" />
31+
<hr />
32+
33+
<br />
34+
I have <b>coded</b> the file Program.docopt.txt
35+
<br />
36+
<img src="images/docopt.net/csFiles/Program.docopt.txt.png" width="580" height="580" />
37+
<hr />
38+
<h3>And here are the <i>generated</i> files</h3>
39+
40+
<br />
41+
The file <i>generated</i> is ConsoleArgs.ProgramArguments.cs
42+
<br />
43+
<img src="images/docopt.net/generated/ConsoleArgs.ProgramArguments.cs.png" width="580" height="580" />
44+
45+
<p>
46+
You can download the code and this page as pdf from
47+
<a target="_blank" href='https://ignatandrei.github.io/RSCG_Examples/v2/docs/docopt.net'>
48+
https://ignatandrei.github.io/RSCG_Examples/v2/docs/docopt.net
49+
</a>
50+
</p>
51+
52+
53+
<p>
54+
You can see the whole list at
55+
<a target="_blank" href='https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG'>
56+
https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG
57+
</a>
58+
</p>
59+

v2/book/list.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</head>
1818
<body>
1919
<h1>
20-
This is the list of 247 RSCG with examples =>
20+
This is the list of 248 RSCG with examples =>
2121
</h1>
2222

2323
<table >
@@ -1014,6 +1014,10 @@ <h1>
10141014
<td>247</td>
10151015
<td><a href="examples/BlazorOcticons.html">BlazorOcticons</a></td>
10161016
</tr>
1017+
<tr>
1018+
<td>248</td>
1019+
<td><a href="examples/docopt.net.html">docopt.net</a></td>
1020+
</tr>
10171021
</table>
10181022

10191023

v2/book/pandocHTML.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ input-files:
261261
- examples/Monify.html
262262
- examples/Imposter.html
263263
- examples/BlazorOcticons.html
264+
- examples/docopt.net.html
264265

265266
# or you may use input-file: with a single value
266267
# defaults:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"generator":{
3+
"name":"docopt.net",
4+
"nuget":[
5+
"https://www.nuget.org/packages/docopt.net/"
6+
],
7+
"link":"https://github.com/docopt/docopt.net",
8+
"author":"Atif Aziz",
9+
"source":"https://github.com/docopt/docopt.net"
10+
},
11+
"data":{
12+
"goodFor":["Generating command line argument parsers from usage documentation."],
13+
"csprojDemo":"ConsoleArgs.csproj",
14+
"csFiles":["Program.cs","Program.docopt.txt"],
15+
"excludeDirectoryGenerated":[""],
16+
"includeAdditionalFiles":[""]
17+
},
18+
"links":{
19+
"blog":"",
20+
"video":""
21+
}
22+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
docopt.net is the .net version of the docopt python beautiful command line parser. docopt.net helps you define an interface for your command-line app, and automatically generate a parser for it. docopt.net is based on conventions that have been used for decades in help messages and man pages for program interface description. Interface description in docopt.net is such a help message, but formalized. Check out http://docopt.org for a more detailed explanation.
2+
Quick example: var arguments = new DocOpt().Apply("Usage: prog [-a] [-b] FILE", args); if (arguments["-a"].IsTrue) { ... }
3+
}

0 commit comments

Comments
 (0)