Git Product home page Git Product logo

Comments (6)

kernc avatar kernc commented on May 18, 2024 4

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.

b09dan avatar b09dan commented on May 18, 2024 2

@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:

  1. I need to import generated documentation to the project wiki. It doesn't take any effort with markdown.
  2. My chef wants to see docs in single document (It is easy to convert markdown files to .docx/.pdf/.odt)

from pdoc.

kernc avatar kernc commented on May 18, 2024 1

I think, ideally, --html-dir would become --output-dir, and that's where the files lie.

from pdoc.

kernc avatar kernc commented on May 18, 2024

Have you tried plainly pdoc module_name which outputs slightly adapted original markdown?

from pdoc.

b09dan avatar b09dan commented on May 18, 2024

@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.

b09dan avatar b09dan commented on May 18, 2024

from pdoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.