How To Find Solution by SO

Ubuntu Korea Community Wiki
둘러보기로 이동 검색으로 이동
파일:Pictogram-virtualisation-orange-hex.svg
  작업 중인 문서!

  미완성이며, 디자인이 완성되지 않았거나, 아직 채워지지 않은 내용이 있어 여러분의 참여가 필요한 문서입니다.

개요[편집]

파일:12814404 10201281125627783 3960346971609258508 n.jpg


이런 공략집 하나 있다면 코딩을 마우스로 할 수 있지 않을까? 우스갯소리로 요새 대부분 개발자는 스택 오버플로우 IDE로 개발한다는 얘기도 있다.<ref>어디까지나 X소리다. 믿거나 말거나</ref> 이 페이지는 그런 개발자의 가려운 등짝을 긁어주려는 목적으로 만들었다. 헌데, 사이다를 마신 것처럼 완전히 시원하게 긁어주진 못한다. 필자가 시험해본 결과 기대만큼 정확도를 따라오지 못한다. 심지어는 동작성의 보증도 없다(그래서 오픈소스다. 불만 있으면 보고 새로 찍든지 알아서 고치라고). FM대로 개발을 배우는 직장인이라면 절대 사수(멘토)에게 이 페이지를 보여주지 말도록. 그러다 등짝 스매시를 맞는 수가 있다. >>ㅑ :P 가려운 등짝이 가려운걸 넘어서 더 아플 수가 있다.

본문을 보기 전에 git을 설치해야 한다. 아쉽게도 아파트겟! 으로 가져올 수 있다면 발로 설치할 수도 있을텐데, 아직은 github로만 제공한다. 불만 있는 누군가가 PPA 알아서 만들어주겠지 *-_-*<ref>PPA 만들었으면 치사하게 혼자 쓰지 말고 위키에 올려주라</ref> 기본으로 설치했을 것 같지만, 이 글을 보는 대부분은 '컴맹'이라는 점을 감안한다면 일단 링크는 필요한 것 같다.
CS전공 개발자라고 해서 컴퓨터를 고칠 줄 모르는것과 같다. 그러니까 20만원짜리 컴퓨터 같은건 부탁하지 말라고!

 파일:Aptget.png 
[apt://git-all {{#if:|{{{2}}}|git-all}}
설치
]

소개[편집]

결과가 생각보다 정확하진 않다. 키워드 기반 검색 정확도 별로 정렬하는게 아니라 그냥 닥치는대로 추천을 누른 순대로 정렬한다. 하지만 어쩔 수 없지. 억울하면 직접 만들등가.

stackoverflow-cli[편집]

C로 작성했고 libcurl과 libjson-c를 활용했다. 구글 검색엔진으로 검색해보면 제일 처음에 뜨는데 이 소스코드는 4년 전에 작성했고 "실제 동작하지 않는" obsolete 상태기 때문에 굳이 받아서 컴파일하고 설치해보려는 노력은 하지 않는게 좋다. 다만 누군가가 "개조"를 원할 경우를 대비하여 링크만 남겨두도록 하겠다.

필요에 따라 Makefile과 일부 소스코드를 고쳐야 한다. 이 부분을 해결하면 컴파일"만" 된다. 실제론 내려받은 파일이 JSON이 아니라고 하면서 처리 과정을 멈춘다. 하긴 4년전에 찍은건데 바랄걸 바래야지. 꼬우면 처음부터 다시 만드는게 능사다. 엣헴

stack-overflow-command-line[편집]

ruby로 작성했다. 역시 4년전에 작성했다. 설치 방법은 아래 링크에 잘 나와있다. 심지어는 사용 설명까지 들어있다.

우선 rubygems를 설치하고 소스트리를 내려받아야 한다.

{{#ifeq: msg|user|~|{{#ifeq: misc|user|~  mkdir workspace;cd workspace;sudo apt-get install rubygems-integration;|{{#ifeq: root|user|ubuntu-korea|{{#ifeq: user|user|user@ubuntu-korea|(undefined)}}}} ~ {{#ifeq: root|user|#|{{#ifeq: user|user|$|$}}}}  mkdir workspace;cd workspace;sudo apt-get install rubygems-integration;}}}}
{{#ifeq: msg|user|~/workspace|{{#ifeq: misc|user|~/workspace  git clone https://github.com/antoviaque/stack-overflow-command-line.git|{{#ifeq: root|user|ubuntu-korea|{{#ifeq: user|user|user@ubuntu-korea|(undefined)}}}} ~/workspace {{#ifeq: root|user|#|{{#ifeq: user|user|$|$}}}}  git clone https://github.com/antoviaque/stack-overflow-command-line.git}}}}
{{#ifeq: msg|msg|'stack-overflow-command-line'에 복제합니다...
remote: Counting objects: 102, done.
remote: Total 102 (delta 0), reused 0 (delta 0), pack-reused 102
오브젝트를 받는 중: 100% (102/102), 52.81 KiB | 0 bytes/s, 완료.
델타를 알아내는 중: 100% (35/35), 완료.
연결을 확인하는 중입니다...완료.
|{{#ifeq: misc|msg|'stack-overflow-command-line'에 복제합니다...
remote: Counting objects: 102, done.
remote: Total 102 (delta 0), reused 0 (delta 0), pack-reused 102
오브젝트를 받는 중: 100% (102/102), 52.81 KiB | 0 bytes/s, 완료.
델타를 알아내는 중: 100% (35/35), 완료.
연결을 확인하는 중입니다...완료.  {{{2}}}|{{#ifeq: root|msg|ubuntu-korea|{{#ifeq: user|msg|user@ubuntu-korea|(undefined)}}}} 'stack-overflow-command-line'에 복제합니다...
remote: Counting objects: 102, done.
remote: Total 102 (delta 0), reused 0 (delta 0), pack-reused 102
오브젝트를 받는 중: 100% (102/102), 52.81 KiB | 0 bytes/s, 완료.
델타를 알아내는 중: 100% (35/35), 완료.
연결을 확인하는 중입니다...완료.
 {{#ifeq: root|msg|#|{{#ifeq: user|msg|$|$}}}}  {{{2}}}}}}}
{{#ifeq: msg|user|~/workspace|{{#ifeq: misc|user|~/workspace  cd stack-overflow-command-line|{{#ifeq: root|user|ubuntu-korea|{{#ifeq: user|user|user@ubuntu-korea|(undefined)}}}} ~/workspace {{#ifeq: root|user|#|{{#ifeq: user|user|$|$}}}}  cd stack-overflow-command-line}}}}

그 다음 필요한 루비 라이브러리를 설치해주자. 굳이 gem으로 한방에 처리가 가능한데 apt-get 으로 삽질하는 일은 없길 빈다. 배포판 저장소가 모든 개발 라이브러리를 다 감당할 수는 없는데다 그 많은 개발 라이브러리가 공식 트리에 올라간다는 보장도 없다. 한 마디로 rubygem을 안 믿는건 인생 낭비다.

{{#ifeq: msg|user|~/workspace/stack-overflow-command-line|{{#ifeq: misc|user|~/workspace/stack-overflow-command-line  sudo gem install stackoverflow;|{{#ifeq: root|user|ubuntu-korea|{{#ifeq: user|user|user@ubuntu-korea|(undefined)}}}} ~/workspace/stack-overflow-command-line {{#ifeq: root|user|#|{{#ifeq: user|user|$|$}}}}  sudo gem install stackoverflow;}}}}
{{#ifeq: msg|msg|Fetching: terminal-table-1.5.2.gem (100%)
Successfully installed terminal-table-1.5.2
Fetching: sqlite3-1.3.11.gem (100%)
Building native extensions. This could take a while...
Successfully installed sqlite3-1.3.11
Fetching: libxml-ruby-2.8.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed libxml-ruby-2.8.0,
Fetching: stackoverflow-0.1.5.gem (100%)
Successfully installed stackoverflow-0.1.5
Parsing documentation for terminal-table-1.5.2
Installing ri documentation for terminal-table-1.5.2
Parsing documentation for sqlite3-1.3.11
Installing ri documentation for sqlite3-1.3.11
Parsing documentation for libxml-ruby-2.8.0
Installing ri documentation for libxml-ruby-2.8.0
Parsing documentation for stackoverflow-0.1.5
Installing ri documentation for stackoverflow-0.1.5
Done installing documentation for terminal-table, sqlite3, libxml-ruby, stackoverflow after 5 seconds
4 gems installed
|{{#ifeq: misc|msg|Fetching: terminal-table-1.5.2.gem (100%)
Successfully installed terminal-table-1.5.2
Fetching: sqlite3-1.3.11.gem (100%)
Building native extensions. This could take a while...
Successfully installed sqlite3-1.3.11
Fetching: libxml-ruby-2.8.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed libxml-ruby-2.8.0,
Fetching: stackoverflow-0.1.5.gem (100%)
Successfully installed stackoverflow-0.1.5
Parsing documentation for terminal-table-1.5.2
Installing ri documentation for terminal-table-1.5.2
Parsing documentation for sqlite3-1.3.11
Installing ri documentation for sqlite3-1.3.11
Parsing documentation for libxml-ruby-2.8.0
Installing ri documentation for libxml-ruby-2.8.0
Parsing documentation for stackoverflow-0.1.5
Installing ri documentation for stackoverflow-0.1.5
Done installing documentation for terminal-table, sqlite3, libxml-ruby, stackoverflow after 5 seconds
4 gems installed  {{{2}}}|{{#ifeq: root|msg|ubuntu-korea|{{#ifeq: user|msg|user@ubuntu-korea|(undefined)}}}} Fetching: terminal-table-1.5.2.gem (100%)
Successfully installed terminal-table-1.5.2
Fetching: sqlite3-1.3.11.gem (100%)
Building native extensions. This could take a while...
Successfully installed sqlite3-1.3.11
Fetching: libxml-ruby-2.8.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed libxml-ruby-2.8.0,
Fetching: stackoverflow-0.1.5.gem (100%)
Successfully installed stackoverflow-0.1.5
Parsing documentation for terminal-table-1.5.2
Installing ri documentation for terminal-table-1.5.2
Parsing documentation for sqlite3-1.3.11
Installing ri documentation for sqlite3-1.3.11
Parsing documentation for libxml-ruby-2.8.0
Installing ri documentation for libxml-ruby-2.8.0
Parsing documentation for stackoverflow-0.1.5
Installing ri documentation for stackoverflow-0.1.5
Done installing documentation for terminal-table, sqlite3, libxml-ruby, stackoverflow after 5 seconds
4 gems installed
 {{#ifeq: root|msg|#|{{#ifeq: user|msg|$|$}}}}  {{{2}}}}}}}
{{#ifeq: msg|user|~/workspace/stack-overflow-command-line|{{#ifeq: misc|user|~/workspace/stack-overflow-command-line  |{{#ifeq: root|user|ubuntu-korea|{{#ifeq: user|user|user@ubuntu-korea|(undefined)}}}} ~/workspace/stack-overflow-command-line {{#ifeq: root|user|#|{{#ifeq: user|user|$|$}}}}  }}}}

설치 끝. 사용 설명대로 활용하면 된다. 결과 화면은 man page 포맷으로 나온다(ㅋㅋㅋ). 결과는 맘에 안들지만.

마무리[편집]

페이지 상단에 언급한 대로 지속적인 수정이 필요하다. 누구든 수정해도 되며, 추가할 내용이 있으면 추가하여 불쌍한 개발자를 위기에서 구제해주기 바란다. :P

참고[편집]

<references/>