jckantor / nbpages

Command line tool to maintain a repository of Jupyter notebooks.
https://jckantor.github.io/nbpages/
MIT License
1 stars 4 forks source link

python library usage index #36

Open jckantor opened 4 years ago

jckantor commented 4 years ago

Index usage of python libraries by search code cells for "from ... import" and "import ... " expressions. Display as "python_library_index" sorted by library, sublibrary with links to each instance of usage. Add link to the index file in index.html.

adowling2 commented 4 years ago

This sounds link a great idea. Would it be possible to search code for specific commands too? For my class, I would want to search for least_squares(, newton_system(, and a few other function names. We could have a configuration file where the repo maintainer adds the code search strings. This would be super helpful for students.

jckantor commented 4 years ago

This would actually work as is. The way to do this is explicitly import the function such as

from scipy.integrate import solve_ivp

This would be indexed as scipy.integrate.solve_ivp. The option would be tag those cells. Would that be sufficient? I'm trying to think of a clean way of adding optional indexing terms to nbpages.cfg.