Skip to content
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

Add commands to create, display and process an RTable #7519

Open
4 tasks
XVilka opened this issue May 18, 2017 · 12 comments
Open
4 tasks

Add commands to create, display and process an RTable #7519

XVilka opened this issue May 18, 2017 · 12 comments

Comments

@XVilka
Copy link
Contributor

XVilka commented May 18, 2017

<pancake> i have implemented the RTable api so we just need to have a command like the agn/age/agg but for tables.

libr/util/table.c:

// TODO: to be implemented
R_API RTable *r_table_clone(RTable *t) {
	// TODO: implement
	return NULL;
}

R_API RTable *r_table_push(RTable *t) {
	// TODO: implement
	return NULL;
}

R_API RTable *r_table_pop(RTable *t) {
	// TODO: implement
	return NULL;
}

R_API void r_table_fromjson(RTable *t, const char *csv) {
	//  TODO
}

R_API void r_table_fromcsv(RTable *t, const char *csv) {
	//  TODO
}

R_API char *r_table_tohtml(RTable *t) {
	// TODO
	return NULL;
}

R_API void r_table_transpose(RTable *t) {
	// When the music stops rows will be cols and cols... rows!
}

R_API void r_table_format(RTable *t, int nth, RTableColumnType *type) {
	// change the format of a specific column
	// change imm base, decimal precission, ...
}

// to compute sum result of all the elements in a column
R_API ut64 r_table_reduce(RTable *t, int nth) {
	// When the music stops rows will be cols and cols... rows!
	return 0;
}
@XVilka XVilka added this to the 9999 milestone May 18, 2017
@radare
Copy link
Collaborator

radare commented May 18, 2017 via email

@XVilka
Copy link
Contributor Author

XVilka commented May 18, 2017

For example you'll want to make some table in r2 output, something like that:

   31  30       26 25                                  0
 +----+-----------+-------------------------------------+
 | op | 0 0 1 0 1 |                 imm26               |
 +----+-----------+-------------------------------------+

But having a generic API to do that, like graph API/commands will make it easier to improve some r2 commands output. E.g. some commands can have this table output.

@radare
Copy link
Collaborator

radare commented May 18, 2017 via email

@XVilka
Copy link
Contributor Author

XVilka commented Jun 7, 2017

This seems useful for prettifying also "dbta" command.

@XVilka XVilka modified the milestones: 9999, 2.9.0 - pre-r2con May 23, 2018
@XVilka XVilka modified the milestones: 2.9.0 - pre-r2con, 9999 Aug 13, 2018
@XVilka XVilka added the GSoC label Nov 16, 2018
@XVilka XVilka removed the GSoC label Feb 26, 2019
@XVilka XVilka added this to To do in Console Interface Improvements via automation Apr 3, 2019
@deepakchethan deepakchethan moved this from To do to In progress in Console Interface Improvements May 22, 2019
@deepakchethan deepakchethan moved this from In progress to To do in Console Interface Improvements May 29, 2019
@deepakchethan deepakchethan moved this from To do to In progress in Console Interface Improvements Aug 18, 2019
@deepakchethan deepakchethan moved this from In progress to Review in progress in Console Interface Improvements Sep 9, 2019
@deepakchethan deepakchethan moved this from Review in progress to In progress in Console Interface Improvements Sep 9, 2019
@XVilka
Copy link
Contributor Author

XVilka commented Nov 6, 2019

@ret2libc @radare for the table API syntax ideas/changes for the tree-sitter parser.

@radare
Copy link
Collaborator

radare commented Nov 6, 2019

uhm we just need to define commands, but the api is there, suggestions?

@radare radare modified the milestones: 9999, 4.1.0 Nov 6, 2019
@XVilka
Copy link
Contributor Author

XVilka commented Dec 4, 2019

Postponing to 4.2.0

@XVilka
Copy link
Contributor Author

XVilka commented Jan 19, 2020

@ret2libc since you mentioned the table API in the another PR - here the feedback/proposals are welcome.

@ret2libc
Copy link
Contributor

@XVilka isn't it already implemented? Why is the issue still open?

@XVilka
Copy link
Contributor Author

XVilka commented Jan 19, 2020

@ret2libc API is implemented, but not the commands, like we have the generic commands for graphs for example.

@XVilka
Copy link
Contributor Author

XVilka commented Jan 19, 2020

Some API functions are not implemented yet too: https://github.com/radareorg/radare2/blob/master/libr/util/table.c#L858

@XVilka XVilka modified the milestones: 4.3.0, 4.5.0 Mar 2, 2020
@XVilka XVilka added this to To do in User Experience via automation Apr 22, 2020
@radare radare changed the title Generic "table" command/api Add commands to create, display and process an RTable May 12, 2020
@radare radare modified the milestones: 4.5.0 - Organized Chaos, 4.6.0 May 12, 2020
@radare
Copy link
Collaborator

radare commented May 12, 2020

@XVilka i have updated the issue text and title to be in sync with the current situation

@ret2libc ret2libc removed this from the 4.6.0 milestone Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

4 participants