thewillyan / ecloset Goto Github PK
View Code? Open in Web Editor NEWVirtual closet to manage clothes in order to reduce the environmental impact.
License: GNU General Public License v3.0
Virtual closet to manage clothes in order to reduce the environmental impact.
License: GNU General Public License v3.0
The user may want to see only some clothes based on some criteria, so we should implement the following functionalities
Styles are also part of the filter system and each time the user selects a style as a filter for clothes the style['count']
should be incremented by one. To do this, we need the following filters
My suggestion is that clothing filters and style filters must be added to the clothing.py
file and style.py
file, respectively.
Better handling of user errors is fundamental for a good application. that is why this issue was created with the following goals:
Eg.: The following command gonna add all clothes from input_file.toml
python ./main.py input_file.toml
The first problem we may solve is the way we represent clothes and styles on RAM based on user input.
For the clothes, my suggestion is:
generic_clothe = {
'id': int,
'type': string,
'sex': string,
'size': string,
'color': string,
'purchase_date': (int, int, int),
'status': string,
'price': int
}
where
Key | Meaning |
---|---|
id |
Unique identifier incremented by one. |
type |
Can be "upper" ,"lower" or "footwear" . |
sex |
Can be "M" (male), "F" (female) or "U" (unisex). |
size |
Can be "P" , "M" or "G" . |
purchase_date |
Is a tuple with day, month and year respectively. |
status |
Can be "sale" , "donation" or "keep" . |
price |
Store price in cents. 'donation' and 'keep' clothes get 0 in this field. |
We already discussed the Style data structure, which looks like this:
generic_style = {
'name': string,
'count': int,
'clothes_sets': [ [id1, id2, id3] ]
}
where 'count'
is the number of times this style has been selected by the user, [ id1, id2, id3 ]
is a "clothes set", id1
is a id of a clothing of the type "upper"
, id2
is a id of a clothing of the type "lower"
and id3
is a id of a clothing of the type "footwear"
.
The implementation of Clothing and Style as well as the functions that operate on them must be in different files since they are completely different data structures. Eg: style.py
and clothing.py
.
Once the clothes are stored, the user can choose which ones he wants to donate or sell. That's where this system comes in with the following functionalities
The donated and sold clothes are stored separately in different files. Eg: donated_clothes.toml
and sold_clothes.toml
.
My suggestion is to reuse the clothes_data.toml
template:
[Clothing_1]
id = 1
type = "upper"
size = "M"
sex = "U"
color = "blue"
resolved_date = "10/02/2022" # date of sale or donation
price = 5000 # only for sold clothes
agent = "ONG or Person" # buyer or donation receiver
Where the difference between a donated clothing and a sold clothing is the existence of the price
field.
The clothes that are donated or sold are moved from clothes_data.toml
to donated_clothes.toml
or sold_clothes.toml
, respectively.
To improve functionality and the test process, it's very important to add a storage system as son as possible.
Due to the guidelines, we don't have much freedom on what kind of data is stored. I suggest the following template
#clothes_data.toml
[Clothing_1]
id = 1
type = "upper"
size = "M"
sex = "U"
color = "blue"
purchase_date = "10/02/2022"
status = "stay"
price = 5000 #optional
styles = [ "winter", "summer", "party" ]
A blank line should be used to determine the end of a data set.
All the CRUD components should be part of the storage system, that is, we should implement the following requirements
All storage-related operations should be in a single, separate file. Eg: storage.py
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.