Comments (5)
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.
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.
+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.
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.
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)
- Update Install / Run code in the README HOT 1
- Conclusions text should be dynamic. HOT 2
- Cleaning Out Old Web Front End HOT 1
- Using a Generative Model for Image Generation HOT 4
- Using Multiple Input Keywords HOT 3
- setup.py package installation
- WikiHow Advanced Search Login Problem HOT 9
- Filter for 'risky' content HOT 1
- Unused files? HOT 5
- PEP8 and YAPF Google Python Code Formatting HOT 4
- unsplash required? might need credentials or feature flag to shut off HOT 4
- Breaking Issue: JSONDecodeError HOT 1
- Breaking Issue: KeyError: 'language' HOT 1
- KeyError Prohibited Image Not Found? HOT 5
- Test failing on generate talk from multiple topics HOT 2
- giphy image source is broken HOT 2
- Support German HOT 1
- pixabay image source is broken HOT 1
- The conceptnet bug HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from talk-generator.