forked from gautamkrishnar/socli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
socli.1
116 lines (115 loc) · 4.27 KB
/
socli.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
.TH SOCLI 1
.SH NAME
socli \- Stack Overflow command line client
.SH SYNOPSIS
socli [ Arguments ] < Search Query >
.SH DESCRIPTION
Stack Overflow command line written in python.Using SOCLI you can search and browser Stack Overflow without leaving the terminal.
.SH OPTIONS
.B \-h " or" \-\-help
Displays this help
.TP
.B \-q " or" \-\-query
.TP
If any of the following commands are used then you must specify search query after query after query argument.
.TP
.B \-i " or" \-\-interactive
To search in Stack Overflow and display the matching results. You can chose and browse any of the result interactively
.TP
.B \-r " or"\-\-res
To select and display a result manually and display its most voted answer.
.TP
.B \-t " or"\-\-tag
To search a query by tag on Stack Overflow. Visit https://stackoverflow.com/tags to see the list of all flags.
.TP
.B \-n " or" \-\-new
Opens the Stack Overflow new questions page in your default browser.You can create a new question using it.
.TP
.B \-u " or" \-\-user
Displays information about the user provided as the next argument(optional). If no argument is provided it will ask the user to enter a default username. Now the user can run the command without the argument.
.TP
.B \-d " or" \-\-del
Deletes the configuration file generated by socli
.TP
.B \-a " or" \-\-api
SoCLI uses custom API key for socli
.TP
.B \-s " or" \-\-sosearch
SoCLI uses google search by default. Use this option to search Stack Overflow directly.
.TP
.B \-o " or" \-\-open\-url
Opens the given url in socli
.TP
.B \-v " or" \-\-version
Displays the current version of socli
.SH EXAMPLES
.TP
Displays second search result of the query "foo bar"
.TP
socli --res 2 --query foo bar
.TP
Displays the search result of the query "foo bar" in Stack Overflow's javascript and node.js tags.
.TP
socli --tag javascript,node.js --query foo bar
.TP
socli for loop in python
.TP
socli -iq while loop in python
.SH USAGE
Use the socli command followed by the search query
.TP
.B Quick Search
.TP
socli for loop in python syntax
.TP
The above command will search for the query "for loop in python synxtax" and displays the first most voted question in Stack Overflow.Pretty quick, right?
.TP
.B Interactive Search
.TP
You can search Stack Overflow by using the command below.
.TP
socli -iq html error 404
.TP
This will display list of questions from Stack Overflow for the query "html error 404" and it will allow to choose any of the questions you like interactively.When you choose a question, it will display the complete description of the chosen question with its most voted answer. You can also browse through the other answers to that question using the up and down arrow keys as well as go back to the list of questions using the left arrow key.
.TP
.B Manual Search
.TP
This will allow you to specify a requested quesion number for you query. For example , consider the following command.
.TP
socli -r 2 -q javascript prototype function
.TP
This command searches for "javascript prototype function" in Stack Overflow and displays the second question that contains it.
.TP
.B Topic\-Based Search
.TP
Stack Overflow supports topics by using tags. Socli allows you to query Stack Overflow based on specific tags.Just specify the tag via the following command.
.TP
socli -t javascript -q window.open
.TP
You can also specify multiple tags.Just seperate them with a comma:
.TP
socli -t javascript,node.js -q window.open
.TP
.B User Profile Browsing
.TP
Just use the command below to set your user ID in socli. When you execute the command next time, it will automaticially fetch the data.
.TP
socli -u
.TP
if your are an extensive user of StackOverflow, socli allows you to set your own API key to overcome the StackOverflow API Limitations. Just use the command below:
.TP
socli -api
.TP
.B Posting a New Question
.TP
If you can't find an answer for your question in Stack Overflow, socli allows you to create a new question via the web browser. Just type the command below and socli will open the new question page of Stack Overflow in the web browser for you:
.TP
socli -n
.TP
.B Url Browsing
.TP
If you have the url of the Stack Overflow post then you can view it using.
.TP
socli --open-url https://stackoverflow.com/questions/20639180/explanation-of-how-nested-list-comprehension-works
.SH SEE ALSO
Visit https://github.com/gautamkrishnar/socli