question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Following the rework of constants.py (and associated files) the question of Folder Structure and dirs has come up.

For now the PR I finished has at least moved images out of the videos folder (because really, why would they be there), but there’s some open questions.

There’s two questions we have to briefly address.

First, how is the folder structure supposed to look like? Here’s I think the most current suggestion by @eulertour

media
  <module name>
    <scene name>
      svg
      images
      video
        <resolution>p<framerate>

I’m fine with that in principle, but have some reservations. In practical application this could create quite a bit of code overhead if the DIR variables aren’t broken down to one. The reason for that is if we go with this folder structure, but also have a separately defined, say for example, VIDEO_DIR, then we need separate code to move stuff around for it to look like this, lest we drop module/scene:

video
  <module name>
    <scene name>
      <resolution>p<framerate>

With respect to that something like this:

media
  svg
  images
    <module name>
      <scene name>
        <resolution>p
  video
    <module name>
      <scene name>
        <resolution>p<framerate>

Is generally a bit more consistent in behavior, whatever the DIR variables, and the code would be simpler too.

And while we could also split images by resolution like that, and I can think of some cases where that would be helpful, do we actually want to? I reckon that with the “save all images” options it definitely would be better, because without being split by resolution that could turn into a real serious mess for a user, but eh. I’m not partial to either.

Second, what are our DIR variables going to be? Currently we have:

MEDIA_DIR
VIDEO_DIR
TEX_DIR
TEXT_DIR

As @eulertour suggested and I thought of too TEX and TEXT should probably be merged into SVG. Them having to be split would be a real fringe case, and even then the cli output should be enough to do so. What about the others? Do we remove VIDEO and put it into whatever MEDIA is by default? For that matter do we just remove TEX/TEXT and put that there too, leaving only MEDIA? Or do we go in the other direction and instead also add IMAGE to place images separately?

My suggestion would be the second folder structure like that, with a resolution folder for images, TEX/TEXT put together and add IMAGE.

Any ideas or opinions?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:27 (22 by maintainers)

github_iconTop GitHub Comments

2reactions
leotrscommented, May 27, 2020

@eulertour Agreed on all four accounts (3 list items + not changing the VIDEO_DIR).

Once we decide upon and implement these changes, I will open a different issue on the following topic (I mention it here for future reference). I’m all for having the default output dir be ./media/<module>/<resolution>p<framerate>/<scene>.mp4, but I also think it would be desirable to allow the user to modify it as freely as possible. For example, a mad user (like myself) might prefer ./media/<module>_<resolution>p<framerate>_<scene>.mp4. It’d be possible to implement this easily with the config.cfg that I’m working on rn. More on that later.

But, let’s keep this discussion about the default values for now.

1reaction
kilacoda-oldcommented, May 26, 2020

No. They save time once you’re working a lot with them, previewing and rerendering them. Instead of tempfiling them, store them in a better place.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Folder Structure - an overview | ScienceDirect Topics
A simple folder structure reduces clutter. The key insight here is that the latest version of the work product must be accessed easily...
Read more >
Best Practices for Folder Structures - UW Finance
A strong folder structure: Groups together records by function, such as putting all your contracts or grant records in one location; Groups together...
Read more >
5 Tips To Create An Organized File Structure Like A Pro
One folder structure best practice is to avoid having folders that compete with one another. Try not to create folders with overlapping ...
Read more >
Folder Structure Diagram Tool to Organize Folders - Creately
Folder structure templates (also known as folder structure diagrams) can help you visualize and retain information about how your files and folders are ......
Read more >
How to Create a Folder Structure - A Step-by-Step Guide
It is unique to your organization, and must be based on how your users look for information. You can organize assets by subject,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found