|
362 | 362 | " **kwargs):\n", |
363 | 363 | " \"Export notebooks in `path` to Python modules\"\n", |
364 | 364 | " if os.environ.get('IN_TEST',0): return\n", |
| 365 | + " if not is_nbdev(): raise Exception('`nbdev_export` must be called from a directory within a nbdev project.')\n", |
365 | 366 | " if procs:\n", |
366 | | - " import nbdev.export\n", |
367 | | - " procs = [getattr(nbdev.export, p) for p in L(procs)]\n", |
| 367 | + " import nbdev.export\n", |
| 368 | + " procs = [getattr(nbdev.export, p) for p in L(procs)]\n", |
368 | 369 | " files = nbglob(path=path, as_path=True, **kwargs).sorted('name')\n", |
369 | 370 | " for f in files: nb_export(f, procs=procs)\n", |
370 | 371 | " add_init(get_config().lib_path)\n", |
|
576 | 577 | "text/markdown": [ |
577 | 578 | "---\n", |
578 | 579 | "\n", |
579 | | - "[source](https://github.com/fastai/nbdev/blob/master/nbdev/doclinks.py#L216){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n", |
| 580 | + "[source](https://github.com/fastai/nbdev/blob/master/nbdev/doclinks.py#L226){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n", |
580 | 581 | "\n", |
581 | 582 | "### NbdevLookup.doc\n", |
582 | 583 | "\n", |
583 | 584 | "> NbdevLookup.doc (sym)\n", |
584 | 585 | "\n", |
585 | | - "Link to docs for `sym`" |
| 586 | + "*Link to docs for `sym`*" |
586 | 587 | ], |
587 | 588 | "text/plain": [ |
588 | 589 | "---\n", |
589 | 590 | "\n", |
590 | | - "[source](https://github.com/fastai/nbdev/blob/master/nbdev/doclinks.py#L216){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n", |
| 591 | + "[source](https://github.com/fastai/nbdev/blob/master/nbdev/doclinks.py#L226){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n", |
591 | 592 | "\n", |
592 | 593 | "### NbdevLookup.doc\n", |
593 | 594 | "\n", |
594 | 595 | "> NbdevLookup.doc (sym)\n", |
595 | 596 | "\n", |
596 | | - "Link to docs for `sym`" |
| 597 | + "*Link to docs for `sym`*" |
597 | 598 | ] |
598 | 599 | }, |
599 | 600 | "execution_count": null, |
|
670 | 671 | "text/markdown": [ |
671 | 672 | "---\n", |
672 | 673 | "\n", |
673 | | - "[source](https://github.com/fastai/nbdev/blob/master/nbdev/doclinks.py#L221){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n", |
| 674 | + "[source](https://github.com/fastai/nbdev/blob/master/nbdev/doclinks.py#L231){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n", |
674 | 675 | "\n", |
675 | 676 | "### NbdevLookup.code\n", |
676 | 677 | "\n", |
677 | 678 | "> NbdevLookup.code (sym)\n", |
678 | 679 | "\n", |
679 | | - "Link to source code for `sym`" |
| 680 | + "*Link to source code for `sym`*" |
680 | 681 | ], |
681 | 682 | "text/plain": [ |
682 | 683 | "---\n", |
683 | 684 | "\n", |
684 | | - "[source](https://github.com/fastai/nbdev/blob/master/nbdev/doclinks.py#L221){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n", |
| 685 | + "[source](https://github.com/fastai/nbdev/blob/master/nbdev/doclinks.py#L231){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n", |
685 | 686 | "\n", |
686 | 687 | "### NbdevLookup.code\n", |
687 | 688 | "\n", |
688 | 689 | "> NbdevLookup.code (sym)\n", |
689 | 690 | "\n", |
690 | | - "Link to source code for `sym`" |
| 691 | + "*Link to source code for `sym`*" |
691 | 692 | ] |
692 | 693 | }, |
693 | 694 | "execution_count": null, |
|
729 | 730 | "text/markdown": [ |
730 | 731 | "---\n", |
731 | 732 | "\n", |
732 | | - "[source](https://github.com/fastai/nbdev/blob/master/nbdev/doclinks.py#L238){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n", |
| 733 | + "[source](https://github.com/fastai/nbdev/blob/master/nbdev/doclinks.py#L248){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n", |
733 | 734 | "\n", |
734 | 735 | "### NbdevLookup.linkify\n", |
735 | 736 | "\n", |
|
738 | 739 | "text/plain": [ |
739 | 740 | "---\n", |
740 | 741 | "\n", |
741 | | - "[source](https://github.com/fastai/nbdev/blob/master/nbdev/doclinks.py#L238){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n", |
| 742 | + "[source](https://github.com/fastai/nbdev/blob/master/nbdev/doclinks.py#L248){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n", |
742 | 743 | "\n", |
743 | 744 | "### NbdevLookup.linkify\n", |
744 | 745 | "\n", |
|
0 commit comments