Skip to content

Commit b4adbaf

Browse files
committed
Documentation 0.35
1 parent e230048 commit b4adbaf

File tree

2 files changed

+33
-13
lines changed

2 files changed

+33
-13
lines changed

README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@
44

55
[See below for more screenshots](#more-screenshots)
66

7-
[Go to downloadable releases - forthcoming](https://github.com/some-avail/codetwig/releases "Downloads for CodeTwig")
7+
[Go to downloadable releases](https://github.com/some-avail/codetwig/releases "Downloads for CodeTwig")
88

99
[Go to the user-manual](mostfiles/manual_codetwig.txt)
1010

1111

12+
#### Forthcoming version: 0.35
1213

13-
#### Description CodeTwig
14+
### Description CodeTwig
1415

1516
CodeTwig is terminal-program to view the outline of the source-code and to show procedures as usage-trees or used-by-trees. Allthough the tree-function is working quite well, the program is still young. See future-plans below.
1617
Currently only meant for Nim.
1718

1819

19-
#### Installation by building
20+
### Installation by building
2021
Since the program (at this stage) is for Nim only, users = programmers are assumed to be able to build the executable themselves.
2122
Developers can download a release, or clone the code
2223
(CodeTwig has no external components) and do the following:
@@ -26,7 +27,7 @@ nim c -d:release ctwig.nim
2627
which will compile the code to an executable for you local OS.
2728

2829

29-
#### Using CodeTwig
30+
### Using CodeTwig
3031
[Go to the user-manual](mostfiles/manual_codetwig.txt)
3132

3233

@@ -35,18 +36,24 @@ which will compile the code to an executable for you local OS.
3536
Or look at the commits.
3637
[Commits-list](https://github.com/some-avail/codetwig/commits/main)
3738

39+
See below for main step stones.
3840

3941

40-
#### Future plans:
41-
- Both in the views and in the tree-function the following information will be added:
42+
#### Completed from future plans
43+
- ct 0.35 - Both in the views and in the tree-function the following information will be added:
4244
- procedural arguments
4345
- initial comments
46+
47+
48+
### Future plans:
4449
- better automatic source-file-selection
4550
- check multiple dir-levels
4651
- filter out backups, copies and older versions of source-files.
52+
- add a project-field so that multiple projects can be added to one declaration-list to enable multi-project search.
53+
- add a dec-view option (like the tree-view, but show full code)
4754
- add an options-file.
4855

4956

50-
5157
<a name="more-screenshots">More screenshots:</a>
52-
Forthcoming.
58+
Forthcoming.
59+

mostfiles/manual_codetwig.txt

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ ctwig projects/yourproject.pro -c:d
5151
Running this command will create a list of declarations. Declarations are the various procs, template, macros and functions. The file is not very readable, but will be used to create addtional views. Also it is parsed to generate the proc-trees on the fly. (see later). The list contains:
5252
- declarations (like procs) for all source-files
5353
- declarations that are used in above declarations (these are appended to above line)
54+
55+
The arise of the dec-list happens in three phases, whereby phase 3 is the version that is used by other functions.
5456
---------------------------------------------------------------------------
5557

5658
-c:v or --command:views
@@ -59,7 +61,13 @@ no options
5961
Full example:
6062
ctwig projects/yourproject.pro -c:v
6163

62-
Running this command will create some views of the source-code. Currently four views are available, basic and extended view with one level or two levels. The one-level-files show the source-files and the declarations only (usually mostly procs), and the two-level-files shows the usages of each declaration (used procs). The extended provide also the paramaters of function and the added comment.
64+
Running this command will create some views of the source-code. Currently four views are available, basic and extended view with one level or two levels. The one-level-files show the source-files and the declarations only (usually mostly procs), and the two-level-files shows the (first-level) usages of each declaration (used procs). The extended ones provide also the parameters of function and the added comment.
65+
66+
So you get:
67+
yourproject_basic_one-level_view.txt
68+
yourproject_basic_two-level_view.txt
69+
yourproject_extended_one-level_view.txt
70+
yourproject_extended_two-level_view.txt
6371
---------------------------------------------------------------------------
6472

6573
-c:g or --command:generate_all
@@ -68,25 +76,30 @@ no options
6876
Full example:
6977
ctwig projects/yourproject.pro -c:g
7078

71-
This command generates both the declaration-list and all of the views. Us it if you want tu update your project and are not interested in the output screen-notification.
79+
This command generates both the declaration-list and all of the views. Use it if you want to update your project and are not interested in the output screen-notification.
7280
---------------------------------------------------------------------------
7381

7482
-c:t or --command:tree
7583
options:
7684
* direction
77-
-r:u or --direction:usage
85+
-r:u or --direction:usage (default)
7886
-r:b or --direction:used-by
7987
* depth
80-
-d:3 --depth:3
88+
-d:3 --depth:3 (default)
8189

8290
Full examples:
8391
ctwig projects/yourproject.pro -c:t -r:b -d:4
8492
ctwig projects/yourproject.pro -c:t -r:u -d:2
93+
ctwig projects/yourproject.pro -c:t (using the defaults)
8594

8695
Seps can be ommitted:
8796
ctwig projects/yourproject.pro -ct -ru -d2
8897

89-
Lastly above command starts with a box in which a substring can be entered to search for a declaration. Then a list of declarations is displayed which have the substring in them. If the entered substring matches only one declaration, a tree is shown based on the parameters direction and depth. The direction usage refers to the calls to other procs that are made in the proc, where used-by stands for all the procs that are using the declaration (so the reverse process). The depths stands for the number of levels that are shown.
9098

99+
Lastly above command starts with a box in which a substring can be entered to search for a declaration. Then a list of declarations is displayed which have the substring in them. If the entered substring matches only one declaration, a tree is shown based on the parameters direction and depth. The direction usage refers to the calls to other procs that are made in the proc, where used-by stands for all the procs that are using the declaration (so the reverse process). The depths stands for the number of levels that are shown.
91100

101+
As off CT 0.35 you can add a semi-column to indicate not only declaration but module as well, like so:
102+
declaration;module
103+
This is needed to show same-named decs.
92104

105+
Also now declarational arguments and comment are added to the chosen declaration.

0 commit comments

Comments
 (0)