Flash_Cards_Sturdy_Cards_App 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.DS_Store +0 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +6 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +134 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/.DS_Store +0 -0
- data/lib/classes/Card.rb +23 -0
- data/lib/classes/Deck.rb +71 -0
- data/lib/database/cards.csv +19 -0
- data/lib/database/decks.csv +11 -0
- data/lib/database/recap.csv +0 -0
- data/lib/database/recent.csv +0 -0
- data/lib/database/unfamiliar.csv +0 -0
- data/lib/noname/README.md +102 -0
- data/lib/noname/version.rb +6 -0
- data/lib/source_code.rb +490 -0
- data/lib/tests.rb +37 -0
- data/resources/UML Sturdy Cards.png +0 -0
- data/software_dev_plan/pseudo_code.txt +218 -0
- data/sturdy_cards.gemspec +52 -0
- metadata +97 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9a5c9004967345d130c3deede895d6907d4028fa404135c0032d16054d0818a8
|
4
|
+
data.tar.gz: 3a8d824e15692c82f41040d7bdc57c0ba6c16fbdcd607ae1b17062464753c51d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c104285471e9583565a6fa6fc0a20772d63e8debf5f129247948aa4562f8f9b971dd349789bae611d56bd4c3d93036d2cfca8fdc2da7c18ce4e85651b6368869
|
7
|
+
data.tar.gz: ec5ab1da8ab494cefdd7f9354c75d86f9b79d9f970e8988d971ac1c04f0f3a300cd8eea28d7fa05cf36d0da09474a80ebce587a247c851b0827d790a704de763
|
data/.DS_Store
ADDED
Binary file
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at angusl.zanshin@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [https://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: https://contributor-covenant.org
|
74
|
+
[version]: https://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 CoderAcademy-MEL
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,134 @@
|
|
1
|
+
# STURDY CARDS
|
2
|
+
|
3
|
+
- [STURDY CARDS](#sturdy-cards)
|
4
|
+
- [Installation](#installation)
|
5
|
+
- [About](#about)
|
6
|
+
- [Research and Problem statement](#research-and-problem-statement)
|
7
|
+
- [Features](#features)
|
8
|
+
- [Next Steps](#next-steps)
|
9
|
+
- [Tutorial](#tutorial)
|
10
|
+
- [UML Diagram](#uml-diagram)
|
11
|
+
- [Project Timeline](#project-timeline)
|
12
|
+
- [Github](#github)
|
13
|
+
- [Development](#development)
|
14
|
+
- [Contributing](#contributing)
|
15
|
+
- [License](#license)
|
16
|
+
- [Code of Conduct](#code-of-conduct)
|
17
|
+
- [noname](#noname)
|
18
|
+
|
19
|
+
|
20
|
+
## Installation
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
gem 'noname'
|
24
|
+
```
|
25
|
+
|
26
|
+
And then execute:
|
27
|
+
|
28
|
+
$ bundle install
|
29
|
+
|
30
|
+
Or install it yourself as:
|
31
|
+
|
32
|
+
$ gem install noname
|
33
|
+
|
34
|
+
## About
|
35
|
+
|
36
|
+
|
37
|
+
Sturdy cards is flash cards with spaced repetition learning feature. It is created for anyone who wants to reinforce their learning through spaced repetition.
|
38
|
+
|
39
|
+
The concept is simple.
|
40
|
+
|
41
|
+
1. You will be given a few default decks to get a feel of how the application works.
|
42
|
+
2. You can create custom decks and cards within the decks.
|
43
|
+
3. You can export decks as csv files to share information with friends/families, or create new decks by importing csv files
|
44
|
+
4. Once you are all set up, you can start learning. There are a few different modes available for you so you will never get bored of being tested by the same method throughout the process.
|
45
|
+
5. Lastly, sit back and be sturdy. Your knowledge will only ever going to get sturdier.
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
* There is a [tutorial](##Tutorial) section below if you need further instructions on how to use the application.
|
50
|
+
* Feel free to read through the [feature section](##Features) to understand how our feature works.
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
#### Research and Problem statement
|
55
|
+
|
56
|
+
From my learning experience and my observation with how humans learn, we humans learn and retain better through continuous repetition. As quoted from Tony Robbins,
|
57
|
+
|
58
|
+
> Repetitions is a mother of skill
|
59
|
+
> - Tony Robbins
|
60
|
+
|
61
|
+
**"Many students find it difficult to memorise information even though the information has been processed and understood. More often than not, subject contents delivered in a traditional method, do not provide students with the time and reinforcement tool to excel in mastering those content."**
|
62
|
+
|
63
|
+
With Sturdy Cards, you can be rest assured your learning will be taken care of. By using spaced repetition and several distinctive modes available to choose from, we can help you learn and retain information more effectively. For those who are already at an advanced level in a subject, your subject expertise can be further reinforced.
|
64
|
+
|
65
|
+
## Features
|
66
|
+
|
67
|
+
| Features | Functions | Released Date |
|
68
|
+
|:----------------- | :--------------------------------------------------------: | :---------------------------------: |
|
69
|
+
|1. Decks | Allows deck viewing, creation, updating and deletion | 14-March-2020 |
|
70
|
+
|2. Cards | Allows card viewing, creation, updating and deletion | 14-March-2020 |
|
71
|
+
|3. Learning Mode | Users are given a few different modes to learn | 14-March-2020 - Present |
|
72
|
+
|
73
|
+
## Next Steps
|
74
|
+
|
75
|
+
1. More learning modes - TBA
|
76
|
+
2. Learning Progress - implement a tracking feature every time the users attempt the learning mode
|
77
|
+
3. Export/Import of csv files as decks and cards
|
78
|
+
4. Notifications - daily question auto-prompt
|
79
|
+
5. Community and Friends - allow information to be published publicly in the app and follow friends
|
80
|
+
6. Ranking system
|
81
|
+
7. Competitions
|
82
|
+
|
83
|
+
## Tutorial
|
84
|
+
|
85
|
+
The app runs on terminal command-line.
|
86
|
+
|
87
|
+
CSV files are used to keep the data created/altered from the command-line.
|
88
|
+
|
89
|
+
Notes:
|
90
|
+
* Most deck search functionality uses id unless stated otherwise by the program.
|
91
|
+
* Card search functionality uses card_name
|
92
|
+
* Errors like duplicates, names and non-existent data are captured
|
93
|
+
|
94
|
+
The first menu you will encounter is the *Main Menu*
|
95
|
+
* Select one of the options (select 1 as Learning Mode is in progress)
|
96
|
+
* The next stop is *Deck Menu*.
|
97
|
+
* Select one of the options (View, Create, Update and etc)
|
98
|
+
* In View Deck, you will be asked to select a deck id. (The program will catch the error if id does not exist and asks for your input again)
|
99
|
+
* In Create Deck, you will be asked *name* and *topic* of the deck you want to create (If name already exists, you will need to enter another name)
|
100
|
+
* In Update Deck, the information presented is the same as View Deck. Once a deck is selected for update, it will update the csv file.
|
101
|
+
* In Delete Deck, select a deck to be removed (csv will update). If deck does not exist, it will prompt you to enter a valid id.
|
102
|
+
|
103
|
+
|
104
|
+
## UML Diagram
|
105
|
+
|
106
|
+

|
107
|
+
|
108
|
+
## Project Timeline
|
109
|
+
|
110
|
+
[Sturdy Cards - Trello](https://trello.com/b/crD1QQab/sturdycards-terminal-app)
|
111
|
+
|
112
|
+
## Github
|
113
|
+
|
114
|
+
[codebender16-git-hub](https://github.com/codebender16/noname)
|
115
|
+
|
116
|
+
## Development
|
117
|
+
|
118
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
119
|
+
|
120
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
121
|
+
|
122
|
+
## Contributing
|
123
|
+
|
124
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/noname. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/noname/blob/master/CODE_OF_CONDUCT.md).
|
125
|
+
|
126
|
+
|
127
|
+
## License
|
128
|
+
|
129
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
130
|
+
|
131
|
+
## Code of Conduct
|
132
|
+
|
133
|
+
Everyone interacting in the Noname project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/noname/blob/master/CODE_OF_CONDUCT.md).
|
134
|
+
# noname
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "noname"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/.DS_Store
ADDED
Binary file
|
data/lib/classes/Card.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# CARD IS A CHILD CLASS
|
2
|
+
require_relative "Deck"
|
3
|
+
|
4
|
+
class Card < Deck
|
5
|
+
attr_accessor :card_id, :deck, :card_name, :description
|
6
|
+
|
7
|
+
def initialize(card_id, deck, card_name, description)
|
8
|
+
@card_id = card_id
|
9
|
+
@deck = deck
|
10
|
+
@card_name = card_name
|
11
|
+
@description = description
|
12
|
+
# Deck.add_card(deck)
|
13
|
+
end
|
14
|
+
|
15
|
+
def to_a
|
16
|
+
[@card_id, @deck, @card_name, @description]
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
# ruby = Deck.new(nil, "ruby deck", "ruby")
|
23
|
+
# ruby_card_one = Card.new("file handling", "something to do with files", ruby)
|
data/lib/classes/Deck.rb
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
# require_relative "Card"
|
2
|
+
# DECK IS A PARENT CLASS
|
3
|
+
|
4
|
+
class Deck
|
5
|
+
|
6
|
+
attr_reader :familiarity_rate, :test_counts, :id, :date_created
|
7
|
+
attr_accessor :date_modified, :topic, :deck_name, :card_counts
|
8
|
+
|
9
|
+
@@deck_counts = 0
|
10
|
+
|
11
|
+
def initialize(id, deck_name, topic)
|
12
|
+
@id = id
|
13
|
+
@deck_name = deck_name
|
14
|
+
@date_created = Time.new.to_s[0, 10]
|
15
|
+
@date_modified = @date_created
|
16
|
+
@familiarity_rate = 0
|
17
|
+
@card_counts = 0
|
18
|
+
@test_counts = 0
|
19
|
+
@familiar_card_counts = 0
|
20
|
+
@topic = topic
|
21
|
+
end
|
22
|
+
|
23
|
+
# def calculate_familiarity_rate # divide {familiar_card_counts} by {card_counts}
|
24
|
+
# @familiarity_rate = familiar_card_counts / card_counts
|
25
|
+
# end
|
26
|
+
|
27
|
+
def to_a
|
28
|
+
[@id, @deck_name, @topic]
|
29
|
+
end
|
30
|
+
|
31
|
+
# INCREMENTING COUNTS FOR CLASS VAR AND INSTANCE VAR
|
32
|
+
|
33
|
+
# def self.add_card_to_count # add everytime a card is created from Card class
|
34
|
+
# card_counts += 1
|
35
|
+
# end
|
36
|
+
|
37
|
+
# def add_card(deck)
|
38
|
+
# self.class.add_card_to_count
|
39
|
+
# end
|
40
|
+
|
41
|
+
class << self
|
42
|
+
attr_accessor :deck_counts, :card_counts
|
43
|
+
|
44
|
+
def add_deck_to_count
|
45
|
+
@@deck_counts += 1
|
46
|
+
end
|
47
|
+
|
48
|
+
def add_test_to_count # add everytime a practice is attempted
|
49
|
+
@test_counts += 1
|
50
|
+
end
|
51
|
+
|
52
|
+
def add_familiar_card_to_count
|
53
|
+
@familiar_card_counts += 1
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
|
58
|
+
def view_deck(deck_name)
|
59
|
+
if deck_name == @deck_name
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def del_deck(deck_name)
|
64
|
+
|
65
|
+
end
|
66
|
+
|
67
|
+
def back_to_main_menu
|
68
|
+
# go back to main menu
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
card id,deck,card name,description
|
2
|
+
1,trying,try harder,soldier through1,
|
3
|
+
2,ruby arrays,"[a, b, c] + [d, e]","= [a, b, c, d, e]"
|
4
|
+
3,ruby arrays,creating an array ,"array.new, arr = []"
|
5
|
+
4,ruby arrays,accessing elements, arr[index], arr.at(index)
|
6
|
+
5,ruby arrays,access first element, arr.first
|
7
|
+
6,ruby arrays,access last element, arr.last
|
8
|
+
7,ruby arrays,arr.drop(n), return elements after n
|
9
|
+
8,ruby arrays,arr.length, counts number of elements in an array
|
10
|
+
9,ruby arrays,arr.include?, return TRUE if exist in an array
|
11
|
+
10,ruby arrays,arr.unshift, add new item to beginning
|
12
|
+
11,ruby arrays,arr.shift, retrieve and remove first element
|
13
|
+
12,ruby arrays,arr.pop, remove last element
|
14
|
+
13,ruby arrays,interating over an array, arr.each do |item|
|
15
|
+
14,ruby arrays,Array.new(4) {Hash.new}, => [{}, {}, {}, {}]
|
16
|
+
15,ruby arrays,what is slicing?, return a specified range of elements
|
17
|
+
16,ruby arrays,arr.empty?, return FALSE is it is not empty
|
18
|
+
17,ruby arrays,remove nil?, arr.compact
|
19
|
+
18,ruby arrays, arr.uniq, remove duplicate elements from an array
|
@@ -0,0 +1,11 @@
|
|
1
|
+
id,deck name,topic
|
2
|
+
1,ruby file handling,files
|
3
|
+
2,ruby arrays,arrays
|
4
|
+
3,fdsgf,gfdgff
|
5
|
+
4,python,python arrays
|
6
|
+
5,fate series,fate stay night
|
7
|
+
6,naruto,flame jutsu
|
8
|
+
7,testing,manual testing
|
9
|
+
8,second test,2nd time
|
10
|
+
9,trying,maybe not
|
11
|
+
10,c++,Object oriented
|