-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More cli support #18
base: master
Are you sure you want to change the base?
More cli support #18
Conversation
This pull request has grown somewhat large. |
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
de0a053
to
3d9786e
Compare
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
HACKING.md
Outdated
@@ -2,6 +2,13 @@ | |||
|
|||
*Essential Information for Hacking COGNAC* | |||
|
|||
## Enabling debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enabling Debug Mode
HACKING.md
Outdated
@@ -2,6 +2,13 @@ | |||
|
|||
*Essential Information for Hacking COGNAC* | |||
|
|||
## Enabling debug | |||
|
|||
To enable debug, use `--debug-mode` in `./configure` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To enable debug mode, use the --debug-mode option with the ./configure command
HACKING.md
Outdated
To enable debug, use `--debug-mode` in `./configure` | ||
|
||
then the `debug` commande in the shell script will print some information. | ||
without this option debug will print nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once enabled, the debug command in the shell script will print debug information. Without this option, the debug command will not output any information.
HACKING.md
Outdated
@@ -35,6 +42,28 @@ A relatively easy way to add a feature in Cognac is to start by modifying the ge | |||
|
|||
For exemple, if you modify a function like `parse_thatarg()` in "osc_sdk.c", once the changes are working, you can then search (using a tool like grep) through the generator code to find where `parse_thatarg` is generated. From there, you can add modifications to the generator to make the change permanent and automated. | |||
|
|||
## Example to add a new API, that doesn't work at first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example: Adding a New API That Initially Doesn't Work
HACKING.md
Outdated
@@ -35,6 +42,28 @@ A relatively easy way to add a feature in Cognac is to start by modifying the ge | |||
|
|||
For exemple, if you modify a function like `parse_thatarg()` in "osc_sdk.c", once the changes are working, you can then search (using a tool like grep) through the generator code to find where `parse_thatarg` is generated. From there, you can add modifications to the generator to make the change permanent and automated. | |||
|
|||
## Example to add a new API, that doesn't work at first. | |||
|
|||
Let's say you ahve configure cognac like this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's say you have configured Cognac like this:
bin/README.md
Outdated
`path`, if the argument is use in the path | ||
`header` if it is an http header | ||
`query` if it is in a query string | ||
`data` if it is use in post data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return where the argument is used:
path
: If the argument is used in the URL path.header
: If the argument is used as an HTTP header.query
: If the argument is in a query string.data
: If the argument is used in POST data.
bin/README.md
Outdated
|
||
# construct_path | ||
|
||
generate the C code to create a osc_str that the path of the call. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generate the C code to create an osc_str for the path of the call.
bin/README.md
Outdated
osc_str_append_string(&end_call, "/get"); | ||
``` | ||
|
||
The code generated is not exhaustive, but you get the idea. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generated code is not exhaustive, but it conveys the general idea.
configure
Outdated
--debug-mode enable debug in cognac (output on stderr) | ||
--function-suffix=suffix suffix use to find function in componants, default: Request | ||
--funclist-arg=arg arguments to pass to funclist | ||
--from-path use paths instead of componant suffix for functions generations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--from-path: Uses paths instead of component suffixes for function generation.
@@ -28,6 +33,11 @@ for arg in $@; do | |||
--wget-json-search wget json-search.Appimage | |||
--gnu-sed-alias use gsed for sed | |||
--cli-name=Name set cli name, default: oapi-cli | |||
--sdk-name=name set sdk Name, default: osc-sdk | |||
--debug-mode enable debug in cognac (output on stderr) | |||
--function-suffix=suffix suffix use to find function in componants, default: Request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--function-suffix=suffix: Suffix used to identify functions in components. Default:
Signed-off-by: Matthias Gatto <[email protected]>
Signed-off-by: Matthias Gatto <[email protected]>
No description provided.