Skip to content

Commit

Permalink
added user profile browsing closes:#32
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamkrishnar committed Mar 4, 2017
1 parent f9dd433 commit ee6db71
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 10 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -16,6 +16,7 @@ script:
- socli for loop in java
- socli unit test in java
- socli --help
- socli -u 22656
deploy:
provider: pypi
user: gautamkrishnar
Expand Down
16 changes: 15 additions & 1 deletion README.md
Expand Up @@ -66,7 +66,7 @@ socli -iq html error 404
This will display a list of questions from stack overflow for the query "*html error 404*" and it will allow you to choose any of the question you like interactively. When you chose a question, it will display the complete description of the chosed question with its most voted answer. Now you can browse through all the answers of that questions on stack overflow interactively.
##### Manual search
Manual search
This will allow you to choose a question number for example:
```sh
socli -r 2 -q javascript porotype function
Expand All @@ -84,6 +84,16 @@ socli -t javascript,node.js -q window.open
```
See the complete list of tags [here](http://stackoverflow.com/tags).
##### User Profile browsing
Just use the command below to set your [user ID]( http://meta.stackexchange.com/a/111130) in socli. When you execute the command next time, it will automaticially fetch the data.
```sh
socli -u
```
if your are an extensive user of StackOverflow, **socli** allows you to set your own API key to overcome the [StackOverflow API Limitations](http://stackapps.com/a/3057/41332). Just use the command below:
```sh
socli --api
```
You can get an API Key [here](http://stackapps.com/apps/oauth/register) by registering as a new app. Please don't use SoCLI as app name.
##### New question
If you can't find an answer for your question in stack overflow, **socli** allows you to creata a new question via the web browswer. Just type the command below and **socli** will open the new question page of stack overflow in the web browser for you:
Expand All @@ -105,6 +115,9 @@ Usage: socli [ Arguments] < Search Query >
| -r | --res | Used for manual search. It takes the question number as the argument and it must be followed by a -q or --query after it. | socli -r 4 -q query |
| -t | --tag | Specifies the tag to search for the query on stack overflow. It must be followed by a -q or --query after it. | socli -t js -q query |
| -n | --new | Opens the web browser to create a new question on stack overflow. | socli --new |
| -u | --user | Displays the user profile informations. If no argument is given, it will display your profile. | socli -u 22656 |
| -a | --api | Sets a custom API key. | socli -api |
| -d | --del | Deletes the configuration file generated by socli -u manually. | socli -d |
| -h | --help | Displays the help text. | socli --help |
###### Query
Expand All @@ -118,6 +131,7 @@ These are the amazing features of **socli**:
* Question stats view
* Tag support
* Can open the page in a browser
* Can view user profiles
* Can create a new question via the web browser
### To Do
Expand Down
73 changes: 64 additions & 9 deletions README.rst
Expand Up @@ -38,7 +38,7 @@ Install **python** and just use **pip** command to install **socli**:
For Windows
'''''''''''

Method 1 (Using Installer Easy way)
Method 1 (Using Installer :star: Easy way)


Download and install the latest release of
Expand Down Expand Up @@ -121,10 +121,8 @@ complete description of the chosed question with its most voted answer.
Now you can browse through all the answers of that questions on stack
overflow interactively.
Manual search
'''''''''''''
This will allow you to choose a question number for example:
Manual search This will allow you to choose a question number for
example:
.. code:: sh
Expand Down Expand Up @@ -152,6 +150,30 @@ You can also specify multiple tags, Just seporate them with a comma:
See the complete list of tags `here <http://stackoverflow.com/tags>`__.
User Profile browsing
'''''''''''''''''''''
Just use the command below to set your `user
ID <http://meta.stackexchange.com/a/111130>`__ in socli. When you
execute the command next time, it will automaticially fetch the data.
.. code:: sh
socli -u
if your are an extensive user of StackOverflow, **socli** allows you to
set your own API key to overcome the `StackOverflow API
Limitations <http://stackapps.com/a/3057/41332>`__. Just use the command
below:
.. code:: sh
socli --api
You can get an API Key
`here <http://stackapps.com/apps/oauth/register>`__ by registering as a
new app. Please don't use SoCLI as app name.
New question
''''''''''''
Expand Down Expand Up @@ -259,6 +281,33 @@ Arguments (optional)
| | | on stack | |
| | | overflow. | |
+-----------+-----------+-----------+-----------+
| -u | --user | Displays | socli -u |
| | | the user | 22656 |
| | | profile | |
| | | informati | |
| | | ons. | |
| | | If no | |
| | | argument | |
| | | is given, | |
| | | it will | |
| | | display | |
| | | your | |
| | | profile. | |
+-----------+-----------+-----------+-----------+
| -a | --api | Sets a | socli |
| | | custom | -api |
| | | API key. | |
+-----------+-----------+-----------+-----------+
| -d | --del | Deletes | socli -d |
| | | the | |
| | | configura | |
| | | tion | |
| | | file | |
| | | generated | |
| | | by socli | |
| | | -u | |
| | | manually. | |
+-----------+-----------+-----------+-----------+
| -h | --help | Displays | socli |
| | | the help | --help |
| | | text. | |
Expand All @@ -275,7 +324,8 @@ Features
These are the amazing features of **socli**: \* Manual Search \*
Interactively browse stack overflow using the interactive mode \*
Coloured interface \* Question stats view \* Tag support \* Can open the
page in a browser \* Can create a new question via the web browser
page in a browser \* Can view user profiles \* Can create a new question
via the web browser
To Do
~~~~~
Expand Down Expand Up @@ -304,7 +354,7 @@ follow the steps below:
7. Commit your changes: ``git commit -am 'Added new feature'``
8. Push to the branch: ``git push``
9. Submit a `new pull
request <https://github.com/gautamkrishnar/socli/pull/new>`__
request <https://github.com/gautamkrishnar/socli/pull/new>`__ :smile:
Contributors
~~~~~~~~~~~~
Expand Down Expand Up @@ -339,7 +389,12 @@ problem PR `#24 <https://github.com/gautamkrishnar/socli/pull/21>`__ \*
OpenCollective `#27 <https://github.com/gautamkrishnar/socli/pull/27>`__
\* `Elliott Beach <https://github.com/e-beach>`__ for improving color
support by adding colorama
`#29 <https://github.com/gautamkrishnar/socli/pull/29>`__
`#29 <https://github.com/gautamkrishnar/socli/pull/29>`__ \* `Aditya
Tandon <https://github.com/adityatandon007>`__ for the issue
`#30 <https://github.com/gautamkrishnar/socli/issues/30>`__ \* `Akshatha
Nayak <https://github.com/Aksh77>`__ for your first contribution to an
open source project. PR
`#31 <https://github.com/gautamkrishnar/socli/issues/31>`__
Bugs
~~~~
Expand Down Expand Up @@ -396,7 +451,7 @@ sponsor <https://opencollective.com/socli#sponsor>`__]
Liked it?
~~~~~~~~~
Hope you liked this project, don't forget to give it a star
Hope you liked this project, don't forget to give it a star :star:
.. |PyPI version| image:: https://badge.fury.io/py/socli.svg
:target: https://badge.fury.io/py/socli
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
@@ -1,4 +1,7 @@
# SoCLI Changelog
### 3.2
* Added user profiles

### 3.1
* Bugfix release

Expand Down

0 comments on commit ee6db71

Please sign in to comment.