Skip to content
forked from puhoy/snip

index and search through git repos

Notifications You must be signed in to change notification settings

T0niMichel/snip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snip

index & search in (snippet-)repos

features

  • syntax highlighting with pygments (and copy to clipboard directly)
  • pull all repos at once
  • search by keywords and get a preview of the results

installation (todo...)

clone this repo

  cd snip
  pyvenv-3.4 env
  source env/bin/activate (bash)
  . env/bin/activate.fish (fish)
  pip install -r requirements.txt

then you can clone snippet repos to snip/repos.

snip will index them after a "snip.py pull" (which will pull all repos in snip/repos first) or if you run "snip.py index"

usage

you should set an alias to "snip" (or so) so you dont have to type the whole "python 3 snip search..." thing

bash (in .bashrc):

alias snip="/home/user/snip/env/bin/python3 /home/user/snip/snip.py"

fish

function snip
    /home/user/snip/env/bin/python3 /home/user/snip/snip.py $argv
end

funcsave snip

usage:

  > snip -h
  usage: snip.py [-h] {pull,show,search,s,index} ...
  
  positional arguments:
    {pull,show,search,s,index}
      pull                pull all repos
      show                show and highlight file
      search (s)          search for a term
      index               re-index all repos
  
  optional arguments:
    -h, --help            show this help message and exit

todo

  • web frontend (simple template for flask/jinja, "snip web" starts a browser"; rest endpoint for searching (js search thing..))
  • search in github gists (in web view only?)

About

index and search through git repos

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 61.9%
  • CSS 25.8%
  • HTML 12.3%