Comments (15)
Ok. I'll take this issue.
from motivate.
@michellymenezes I think I have fixed this issue. Let me know if there's any problem. Clone and install again
from motivate.
Issue was still open, you mentioned there were issues with previous implementation. In this case it's better to not worry about cost, but worry about ease of the database. Maintaining multiple json files only makes sense if there is a difference between them (001 = science quotes, 002 = history quotes, 007 = james bond quotes). If you wish for randomization it'll be easier if you don't have to randomize file in addition to the quote.
If you'd like I can do the same refactoring to your same quote as this one. It ends up improving readability.
from motivate.
Is it to remove duplicated quotes in an unique file or among all files? Is the script allowed to edit the files in data folder?
from motivate.
We want to remove duplicate quotes from all the json files in data
folder. We already have a script to find duplicate entries. That script will be useful.
Yes, the script is allowed to edit the files in data
folder. Whenever there's a duplicate entry in json file, it should be removed.
from motivate.
Can't run $ motivate
TypeError: join() argument must be str or bytes, not 'PosixPath'
from motivate.
@mubaris I've made a script to create a new json file with all unique quotes #25
from motivate.
@michellymenezes It would be very useful instead creating new json file, if we could remove the entry from existing json files.
from motivate.
Can I take this up?
from motivate.
There's already a PR. There's a small problem with it. If you can find a method to eliminate that issue, let me know.
from motivate.
What's the problem?
from motivate.
Check #25
from motivate.
Hey in your find_dupes.py file,can you explain me in this line of code
dupes = sorted([x for x in quotes if x['quote'] in seen or seen.add(x['quote'])], key=lambda x:x['quote'])
What do the 'key=lambda x:x['quote']' does?
from motivate.
@mubaris I think removing repeated quotes from each file will cost more than computing unique quotes and getting everything from a unique file.
from motivate.
@mubaris Hey is the issue still open?I made a fix for what you want to achieve.
from motivate.
Related Issues (20)
- Wrong JSON
- Use quotes' API HOT 3
- Can not install - "data is not a directory" HOT 1
- Error in file 161.json
- Can't update database HOT 2
- Color of quote should be blue and author detail red. HOT 3
- Cannot install - "This script must be with sudo" HOT 2
- This repo is active? HOT 1
- Add support for Windows HOT 3
- "can't find the data folder. You probably haven't run 'install.sh' " when typing ' moti ' in the command terminal HOT 1
- Convert to Python Package
- Fix README HOT 2
- missing scripts HOT 1
- Add support for Fish and other shells HOT 4
- Unable to push to remote branch HOT 1
- Can't do git push origin master HOT 1
- Project Status
- ANSI colour codes don't work in (newer) Windows 10 command line HOT 3
- Encountered an JSON error on repeated running of the code HOT 4
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 motivate.