Help in adding a codebase for documentation purpose

27 views
Skip to first unread message

Gaurav Sehrawat

unread,
Aug 20, 2017, 5:27:29 AM8/20/17
to devdocs
Greetings everyone,

There are few libraries in python which I would like to search through as documentation since python libraries have docstring in functions and classes. One might not need to scrap the web but just the codebase, for example indexing this kind of file[0].

So if we can add an regex to extract out the function/methods/classes names and index in devdocs app. And devdocs app can show the file and focus on the function while searching, it would be equivalent documentation. Am I making sense?

Some analogy
---
Think how Sublime text shows all the function/classes when you press `Cmd + r / Ctrl + r`. But it does for one file only what if DevDocs can index all the function/class while filenames and do the same thing?

So I tried adding files from local-repo but it seems it ignores the files since they aren't served from localhost.

Any hints will be helpful, any thoughts are most welcomed. 


Thanks

Thibaut Courouble

unread,
Aug 27, 2017, 12:18:15 PM8/27/17
to devdocs
Hi Gaurav

I'm the maintainer of DevDocs.

What you describe sounds reasonable, but I think it falls outside the scope of DevDocs, which is really about indexing documentation — not source code. The project is open source so you're welcome to try to implement this, and I'd definitely consider it if you wanted to contribute your changes back, but I can't promise that this would be accepted in DevDocs, and I unfortunately don't have the time to provide much assistance.

Tornado has an official documentation. It'd be a good start to add this to DevDocs, before considering indexing the code.


>  So I tried adding files from local-repo but it seems it ignores the files since they aren't served from localhost.

The codebase/scraping code is very much geared towards scraping HTML documents, not source code. For example, this line makes it so any non-HTML file is ignored by the scraper. A lot of changes would be required to make DevDocs scrape source code, to the point where this would probably be best done as a separate project/app (forked off DevDocs).

Thibaut

Gaurav Sehrawat

unread,
Aug 27, 2017, 12:41:10 PM8/27/17
to devdocs
Thanks for the help.

I will be taking to your suggestion for starting with Tornado's documentation before indexing the code.

Also thanks for pointing out the efforts required to make code scrapping.

Thanks
Reply all
Reply to author
Forward
0 new messages