scancode-server icon indicating copy to clipboard operation
scancode-server copied to clipboard

Create a CLI for `scancode-server`

Open chetanya-shrimali opened this issue 7 years ago • 9 comments

create a command-line interface for scancode-server. So that we could run commands directly from the terminal.

chetanya-shrimali avatar Feb 17 '18 20:02 chetanya-shrimali

Interesting idea! Can you elaborate a bit what would be the workflow? Especially assuming that the cli is not co-located with the server.

pombredanne avatar Feb 19 '18 15:02 pombredanne

@pombredanne we can create a package for the project, using setuptools and Click/Docopt for creating the interface. Views @chetanya-shrimali

yashLadha avatar Mar 09 '18 11:03 yashLadha

@yashLadha exactly. I think I prefer Click (which is what is used in the ScanCode toolkit). One thing that would need to be fleshed out first would be what this CLI would offer?

pombredanne avatar Mar 09 '18 17:03 pombredanne

@pombredanne what i think is to include main functionalities like parsing and major functional endpoints in the code. That way the documentation of the CLI would be easy and meaningful. Porting the whole code and giving meaningful endpoints for different function would be a good code. However i haven't gone through the codebase yet (suggesting on my past experience with CLI apps creation), i will be in better position to tell functional endpoints when i will atleast walk through the codebase.

yashLadha avatar Mar 09 '18 17:03 yashLadha

@yashLadha ok, if you were to kinda sketch out what would the help of this CLI look like, what would it be roughly?

pombredanne avatar Mar 09 '18 18:03 pombredanne

I have created a CLI for a web app, so if i think in that way then the help should contains the short param (-) and long param (--) and them all the necessary functional endpoints (file path or directory path to parse, custom config param or file, threads something like that). These params differ from project to project, so i won;t be able to solidify the proposal till i atleast walk through the code. @pombredanne . What is in your mind?

yashLadha avatar Mar 09 '18 18:03 yashLadha

@yashLadha I meant by this: what would be the argument and options? what could you do with the CLI?

pombredanne avatar Mar 09 '18 19:03 pombredanne

@yashLadha ping?

pombredanne avatar Mar 23 '18 23:03 pombredanne

For that I have to look into the codebase. Currently my in-semester examinations are going on.

On Sat 24 Mar, 2018, 5:13 AM Philippe Ombredanne, [email protected] wrote:

@yashLadha http:///yashLadha ping?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nexB/scancode-server/issues/114#issuecomment-375826209, or mute the thread https://github.com/notifications/unsubscribe-auth/ARMqT_Sn6JdWK1tPtyi0U3IHKNHaZs4xks5thYi8gaJpZM4SJdBo .

yashLadha avatar Mar 24 '18 03:03 yashLadha