Coder Social home page Coder Social logo

Comments (5)

twinters avatar twinters commented on June 1, 2024

Sounds great! Way cleaner than the way we currently do it! I think there is one function that already handles all of the downloading anyway, so should be a fairly easy improvement by only changing some lines there.

from talk-generator.

h0h0h0 avatar h0h0h0 commented on June 1, 2024

Here's the way it could work.

Currently the system downloads to a download directory located in the python package directory itself. This is probably NOT a blocker piece of tech debt; but it does have a little bit of a code smell to it since we are writing and making changes to the python package directory and that directory is usually expected to stay static.

So where is a great place to keep these downloaded files around when needed but store them in a place that a user can expect to examine and even change if necessary? We are going to use a user data directory that is OS specific.

The https://pypi.org/project/appdirs/ libary has a great write up on this. To save you the trouble of going to the file:


the problem
What directory should your app use for storing user data? If running on Mac OS X, you should use:

> ~/Library/Application Support/<AppName>

If on Windows (at least English Win XP) that should be:

> C:\Documents and Settings\<User>\Application Data\Local Settings\<AppAuthor>\<AppName>

or possibly:

> C:\Documents and Settings\<User>\Application Data\<AppAuthor>\<AppName>
for roaming profiles but that is another story.

The solution

Introduce a download manager that makes use of the appdirs python library and move the downloaded directory to the user data directory.

Change Boundaries

The change should only affect download directory that the talkgenerator.sources uses. Leave other directories alone for now. This will be a pilot.

from talk-generator.

korymath avatar korymath commented on June 1, 2024

+1, I like the proposed solution to the data download directories / cross platform. This would likely work on linux / server systems as well.

from talk-generator.

twinters avatar twinters commented on June 1, 2024

Yes indeed, sounds cool! Although we don't really need the files after generating the slide deck (as the PowerPoint format embeds these files). Will these downloaded files then still be removed after generation as originally planned?

from talk-generator.

korymath avatar korymath commented on June 1, 2024

This should be optional.

If you want to keep the “harvest” you should be able to specify an output directory where the output pptx and a directory of ‘source’ files.

from talk-generator.

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.