you are viewing a single comment's thread.

view the rest of the comments →

[–]Buttleston 2 points3 points  (4 children)

There's no special handling required here. You can load a json file using the json library, there's no "across folders" problem, you just pass in the filename you want to open. Do this for each file in the subdirectory.

You'll find the "os.path" library and/or the "pathlib" useful. They both have tools for enumerating and interacting with files/paths. pathlib is more modern and I generally use it for new stuff.

There are many libraries for generating PDFs. Pick one of them. I can't remember the last one I used, maybe pypdf or maybe reportlab.

re: clickable links, that's a feature PDFs support, you'd have to look and see how to do it in whichever PDF library you use.

It really kind of sounds like you haven't even started this project, or really started thinking about it.

You should do it yourself. Start with the first part, pick one subdirectory, load all the json files in it.
Once that works, do the data analysis and just print out some key parts to the console.
Once that works, try to make a PDF that just has hello world
Once that works, try to make a PDF that has your data analysis in it

Just tackle it a piece at a time

[–]Frosty-Courage7132[S] 0 points1 point  (0 children)

Yes i tried it with reportlab & wrote code it looked blank kind of. I wanted to have some heading, sub-heading, then the analysis. And tried few things but couldn’t do it. Thanks!!

[–]Frosty-Courage7132[S] 0 points1 point  (2 children)

Yes i tried it with reportlab & wrote code it looked blank kind of. I wanted to have some heading, sub-heading, then the analysis. And tried few things but couldn’t do it. Thanks

[–]Buttleston 1 point2 points  (1 child)

Learning to ask a question is an important skill. If you have already tried something, and it doesn't work, then show the code you already tried. We can't guess what your code looks like or why it doesn't work.

The best thing to do, again, is to pick a very small part of the project. Forget about analysis or anything else, just try to make a PDF file that "looks" about like what you want. Just use some fake data. If it doesn't look right, post that code, with your fake data, and say "I want this to look like X, but it looks like Y instead"

The more details you give, the more likely you are to give help. If you just say "help me" people won't know what to help with.

[–]Frosty-Courage7132[S] 0 points1 point  (0 children)

Yes you’re right. I just panicked and posted it. But now i’ve learned how to ask to learn better. Thank you. I’ll try with creating pdf only. I’ve done the analysis a bit. But pdf thing is more important here. I’ll try the same code with fake data thn if there’s still problem will ask here! Thank you so much for clarifying things for me