Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag is not getting added to the URL #123

Closed
amolkahat opened this issue May 17, 2018 · 5 comments · Fixed by #166
Closed

Tag is not getting added to the URL #123

amolkahat opened this issue May 17, 2018 · 5 comments · Fixed by #166
Labels
Hacktoberfest Hacktoberfest

Comments

@amolkahat
Copy link
Member

~/T/s/p/p/ca >>> readit -v                                                      
+====+==========================================+======+============+==========+
| ID |                   URL                    | TAG  |    DATE    |   TIME   |
+====+==========================================+======+============+==========+
| 1  |    https://github.com/xxx/xxx            | None | 2018-05-17 | 15:03:25 |
+----+------------------------------------------+------+------------+----------+
~/T/s/p/p/ca >>> readit -t github https://github.com/keon/algorithms            
******************************* 
This URL is already bookmarked.
 ******************************
+====+==========================================+======+============+==========+
| ID |                   URL                    | TAG  |    DATE    |   TIME   |
+====+==========================================+======+============+==========+
| 1  |    https://github.com/xxx/xxx            | None | 2018-05-17 | 15:03:25 |
+----+------------------------------------------+------+------------+----------+
~/T/s/p/p/ca >>> readit -v 
+====+==========================================+======+============+==========+
| ID |                   URL                    | TAG  |    DATE    |   TIME   |
+====+==========================================+======+============+==========+
| 2  |    https://github.com/xxx/xxx            | None | 2018-05-17 | 15:03:25 |
+----+------------------------------------------+------+------------+----------+
~/T/s/p/p/ca >>> readit -tl 
+================+
| Available TAGs |
+================+
|      None      |
+----------------+
~/T/s/p/p/ca >>> 
@ganeshhubale
Copy link
Collaborator

[ganesh@localhost ~]$ readit -v
Database is empty.
[ganesh@localhost ~]$ readit -a https://github.com/projectreadit/readit
Bookmarked.
[ganesh@localhost ~]$ readit -v
+====+==========================================+======+============+==========+
| ID |                   URL                    | TAG  |    DATE    |   TIME   |
+====+==========================================+======+============+==========+
| 9  | https://github.com/projectreadit/readit  | None | 2018-05-17 | 22:29:23 |
+----+------------------------------------------+------+------------+----------+
[ganesh@localhost ~]$ readit -t github https://github.com/keon/algorithms
Bookmarked.
[ganesh@localhost ~]$ readit -v
+====+========================================+========+============+==========+
| ID |                  URL                   |  TAG   |    DATE    |   TIME   |
+====+========================================+========+============+==========+
| 9  | https://github.com/projectreadit/readi |  None  | 2018-05-17 | 22:29:23 |
|    |                   t                    |        |            |          |
+----+----------------------------------------+--------+------------+----------+
| 10 |   https://github.com/keon/algorithms   | github | 2018-05-17 | 22:29:50 |
+----+----------------------------------------+--------+------------+----------+
[ganesh@localhost ~]$ readit -tl
+================+
| Available TAGs |
+================+
|      None      |
+----------------+
|     github     |
+----------------+

@amolkahat

  • I have performed same commands and above is the result. Please review and suggest changes.
  • This is recently released version v0.2 of readit tool.
  • If particular URL is already present in database with None value of tag then it will not be added with new tag name because URL field in database table is UNIQUE. Please refer below result:
[ganesh@localhost ~]$ readit -v
+====+========================================+========+============+==========+
| ID |                  URL                   |  TAG   |    DATE    |   TIME   |
+====+========================================+========+============+==========+
| 9  | https://github.com/projectreadit/readi |  None  | 2018-05-17 | 22:29:23 |
|    |                   t                    |        |            |          |
+----+----------------------------------------+--------+------------+----------+
| 10 |   https://github.com/keon/algorithms   | github | 2018-05-17 | 22:29:50 |
+----+----------------------------------------+--------+------------+----------+
[ganesh@localhost ~]$ readit -t myproject https://github.com/projectreadit/readit
******************************* 
This URL is already bookmarked.
 ******************************
+====+==========================================+======+============+==========+
| ID |                   URL                    | TAG  |    DATE    |   TIME   |
+====+==========================================+======+============+==========+
| 9  | https://github.com/projectreadit/readit  | None | 2018-05-17 | 22:29:23 |
+----+------------------------------------------+------+------------+----------+
[ganesh@localhost ~]$ 

@ganeshhubale ganeshhubale added this to the Release v0.3 milestone May 17, 2018
@amolkahat
Copy link
Member Author

@ganeshhubale I agree upon the UNIQUE URL field. But if you want to tag you should do that.
Suppose currently I tagged this link as Github but later on, I want to move this to the data_structure so tagging should be changeable for the bookmark.

@amolkahat
Copy link
Member Author

@ganeshhubale You have any plan on multiple tagging?

@ganeshhubale
Copy link
Collaborator

Yes. I will add multiple tag features to one URL. But then I need to remove UNIQUE constraint of URL column.

@amolkahat
Copy link
Member Author

@ganeshhubale I don't think you need to remove the UNIQUE constraint of the URL column. Instead, you need to implement database logic with multiple tables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest Hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants