summary refs log tree commit diff stats
path: root/doc
Commit message (Expand)AuthorAgeFilesLines
* removed pydoc since it can be generated with "make doc" easilyhut2010-06-2146-6669/+0
* version = version + 1 v1.1.1hut2010-06-184-6/+7
* new stable version v1.1.0hut2010-06-092-3/+3
* updated manpagehut2010-06-091-5/+4
* renamed "--fail-if-run" to the more accurate "--fail-unless-cd"hut2010-06-091-3/+3
* updated pydochut2010-06-0918-57/+113
* Changed hashbang line to "#!/usr/bin/env python"hut2010-06-092-2/+2
* updated pydochut2010-05-1647-666/+349
* Fixed bug #65 by adding flag "--fail-if-run"hut2010-04-261-1/+5
* updated pydochut2010-04-205-248/+10
* updated pydochut2010-04-1941-2286/+247
* ranger.1: added S key to man pagehut2010-04-161-0/+3
* Fixed suggested cd-after-exit-script for zshhut2010-04-131-1/+1
* added doc/print_keys.pyhut2010-04-081-0/+14
* corrected documentationhut2010-04-061-1/+1
* Improved tabshut2010-04-061-0/+3
* updated keybindings and documentationhut2010-04-061-1/+21
* ranger.1: updatehut2010-04-011-4/+7
* ranger.1: updatedhut2010-04-011-1/+1
* added a man pagehut2010-04-011-0/+187
* rebuilt pydochut2010-03-3118-65/+188
* removed doc/pick.sh, pointless to have it therehut2010-03-311-25/+0
* removed UML stuff, it's uselesshut2010-03-3115-2337/+0
* removed the cd-after-exit hackhut2010-03-291-161/+0
* updated TODO and pydochut2010-03-2120-52/+85
* doc/colorschemes: ugh, its no logical but bitwise OR!hut2010-03-171-1/+1
* incremented verison number v1.0.4hut2010-03-121-2/+2
* standardized formatting of headings in doc/hut2010-03-122-13/+31
* added doc/uml.txthut2010-03-121-0/+5
* updated pydochut2010-03-1217-161/+33
* updated pydochut2010-03-1270-3946/+816
* added two new colorschemes using 88 colorshut2010-03-121-0/+23
* added documentation on how colorschemes workhut2010-03-121-0/+91
* added symlink: doc/help => ranger/helphut2010-02-281-0/+1
* incremented version number and updated pydoc html files v1.0.3hut2010-02-1675-1972/+1415
* doc/cd-after-exit: updatedhut2010-02-141-21/+15
* doc/pick.sh: corrected commit orderhut2010-02-091-1/+1
* doc: what breaks cd-after-exit support in zshhut2010-02-091-0/+2
* pick.sh: added -m to checkout commadshut2010-02-051-3/+3
* pick.sh: added variables for easier customizationhut2010-02-041-7/+8
* added doc/pick.shhut2010-02-041-0/+24
* updated dochut2010-01-211-4/+20
* 1.0.2! v1.0.2hut2010-01-1430-84/+116
* updated pydoc documentationhut2010-01-1361-846/+795
* todo: added more info on bug #31hut2010-01-091-0/+5
* random cleanups and fixeshut2010-01-071-5/+6
* new minor version v1.0.1hut2010-01-022-4/+4
* updated pydoc documentationhut2010-01-0248-788/+3167
* notify: merged into statusbar, allow to view the log in the pagerhut2010-01-013-35/+2
* cleanupshut2009-12-311-1/+5
lass="p">(data, byte('\n')) } } return data } // apiEndpointQuery is called via apiEndpointHandler when // the endpoint is "users" and r.FormValue("q") is not empty. // It queries the registry cache for users or user URLs // matching the term supplied via r.FormValue("q") func apiEndpointQuery(w http.ResponseWriter, r *http.Request) error { query := r.FormValue("q") urls := r.FormValue("url") pageVal := r.FormValue("page") var out []string var err error pageVal = strings.TrimSpace(pageVal) page, err := strconv.Atoi(pageVal) errLog("", err) vars := mux.Vars(r) endpoint := vars["endpoint"] // Handle user URL queries first, then nickname queries. // Concatenate both outputs if they're both set. // Also handle mention queries and status queries. // If we made it this far and 'default' is matched, // something went very wrong. switch endpoint { case "users": var out2 []string if query != "" { out, err = twtxtCache.QueryUser(query) apiErrCheck(err, r) } if urls != "" { out2, err = twtxtCache.QueryUser(urls) apiErrCheck(err, r) } if query != "" && urls != "" { out = joinQueryOuts(out2) } case "mentions": if urls == "" { return fmt.Errorf("missing URL in mention query") } urls += ">" out, err = twtxtCache.QueryInStatus(urls) apiErrCheck(err, r) case "tweets": out = compositeStatusQuery(query, r) default: return fmt.Errorf("endpoint query, no cases match") } out = registry.ReduceToPage(page, out) data := parseQueryOut(out) etag := fmt.Sprintf("%x", sha256.Sum256(data)) w.Header().Set("ETag", etag) w.Header().Set("Content-Type", txtutf8) _, err = w.Write(data) return err } func joinQueryOuts(data ...[]string) []string { single := []string{} for _, e := range data { single = append(single, e...) } return dedupe(single) } func compositeStatusQuery(query string, r *http.Request) []string { var wg sync.WaitGroup var out, out2, out3 []string var err, err2, err3 error wg.Add(3) query = strings.ToLower(query) go func(query string) { out, err = twtxtCache.QueryInStatus(query) wg.Done() }(query) query = strings.Title(query) go func(query string) { out2, err2 = twtxtCache.QueryInStatus(query) wg.Done() }(query) query = strings.ToUpper(query) go func(query string) { out3, err3 = twtxtCache.QueryInStatus(query) wg.Done() }(query) wg.Wait() apiErrCheck(err, r) apiErrCheck(err2, r) apiErrCheck(err3, r) return joinQueryOuts(out, out2, out3) }