Comments (6)
Indeed, it's different. I believe the text output was initially meant more for instant in-terminal module doc viewing.
You could achieve about the thing you expect with:
find project/dir -name '*.py' \! -ipath '*/_[a-z]*' \
-exec sh -c 'mkdir -p "md/$(dirname "$1")"; pdoc "$1" > "md/$(dirname "$1")/$(basename "$1").md"' -- {} \;
tree md
This is somewhat involved, and it's not particularly portable, so your request is justified.
May I ask why you seek to get text files?
from pdoc.
@kernc thanks, I also thought about similar solution! I will try to implement it in your library in the future!
May I ask why you seek to get text files?
I have two main reasons:
- I need to import generated documentation to the project wiki. It doesn't take any effort with markdown.
- My chef wants to see docs in single document (It is easy to convert markdown files to .docx/.pdf/.odt)
from pdoc.
I think, ideally, --html-dir
would become --output-dir
, and that's where the files lie.
from pdoc.
Have you tried plainly pdoc module_name
which outputs slightly adapted original markdown?
from pdoc.
@kernc thanks for reply! Yeah, but I thought it has different functionality, as it doesn't look whole project recursively, like pdoc with option “--html” does. May be there is a possibility to have similar output (text-markdown file on each module that are specified through imports in selected module)?
E.g. it is result of pdoc3 --html --html-dir documentation backend
:
documentation/
└── backend
├── config
│ ├── dev_config.html
│ ├── index.html
│ ├── params.html
│ └── prod_config.html
├── helpers
│ ├── index.html
│ └── is_int.html
├── index.html
├── modules
│ ├── ai_consultant
│ │ ├── index.html
│ │ ├── models.html
│ │ └── route.html
│ ├── authentication
│ │ ├── auth.html
│ │ ├── index.html
│ │ └── models.html
│ ├── home_page
│ │ ├── home_page.html
│ │ └── index.html
│ ├── index.html
│ ├── process_mining
│ │ └── index.html
│ └── survey
│ ├── index.html
│ ├── interact
│ │ ├── answer_creator.html
│ │ ├── index.html
│ │ ├── session_setter.html
│ │ └── survey_getter.html
│ ├── manage
│ │ ├── index.html
│ │ ├── language_getter.html
│ │ ├── survey_assessment.html
│ │ ├── survey_creator.html
│ │ ├── survey_dimension_type_getter.html
│ │ ├── survey_getter.html
│ │ ├── survey_scope_getter.html
│ │ ├── survey_updater.html
│ │ └── user_getter.html
│ ├── models.html
│ └── routes.html
└── run.html
And it is output of pdoc3 backend
:
Module backend
==============
Sub-modules
-----------
* backend.config
* backend.helpers
* backend.modules
* backend.run
from pdoc.
from pdoc.
Related Issues (20)
- Skip-errors not recogniazed HOT 1
- Support inline math with dollar `$...$` delimiters when `--config latex_math=True`
- search field wont appear in generated html file HOT 1
- generating the whole project documentation with 1 command HOT 2
- Support search in docpage HOT 2
- Wrong search hyperlinks to page sections for inherited classes HOT 1
- Strike Through Markdown not working
- PEP224 style docstring not honoured for global variable of type Callable
- HTML files should end with a newline
- Upgrade code reference warnings to errors.
- --skip-errors flag does not work
- feature request: support for headings to organize functions
- Include html containing javascript
- Using a - in folder names prevents linking
- missing docstrings of methods HOT 2
- syntax error with match-case function
- Incorrectly rendered Args section HOT 1
- Add GitHub Flavor Markdown support HOT 2
- Remove indentation in text template for markdown files
- Deprecation warning for PEP224 class variable docstrings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdoc.