Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate graph for all .py in folder recursively #87

Open
shruti222patel opened this issue Oct 14, 2023 · 2 comments
Open

Generate graph for all .py in folder recursively #87

shruti222patel opened this issue Oct 14, 2023 · 2 comments

Comments

@shruti222patel
Copy link

Hi,

This is my first time using this library. Thank you for creating and maintaining. 🙏
Is there a way I recursively generate a graph for all python files within a folder and its' sub-directories?

(I imagine this is possible if I use the pacakge's low-level apis. I'm hoping there's a more straightforward method or flag I can use.)

@jasonharitou
Copy link

I also have this question/feature request.

@mirrorcoloured
Copy link

You can work around this by getting your shell to list the desired files and pass them all to code2flow as arguments. I came up with these:
Powershell:
code2flow (Get-ChildItem -Filter "*.py" -Recurse | Resolve-Path -Relative)
Bash:
find . -name "*.py" -exec code2flow {} +

Or with a configurable depth limit:
Powershell:
code2flow (Get-ChildItem -Filter "*.py" -Depth 1 | Resolve-Path -Relative)
Bash:
find . -maxdepth 1 -name "*.py" -exec code2flow {} +

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants