Commit Graph

  • b2642dcfac chore: remove Sourcehut CI manifest main swaits 2026-08-31 17:16:25 -06:00
  • 9cc9f3d7a3 add github mirror swaits 2024-01-29 10:38:18 -07:00
  • 0d0c8af1d6 add LICENSE swaits 2020-04-24 09:42:05 -07:00
  • f8af5be62d Merge from develop swaits 2015-02-20 06:17:23 -08:00
  • a5496b51b8 more readme updates :) develop swaits 2015-02-20 06:17:05 -08:00
  • 32c214b3ef Merge from default swaits 2015-02-20 06:05:19 -08:00
  • bddd144dee update readme swaits 2015-02-20 06:04:45 -08:00
  • 61514fb6c9 Merge from develop swaits 2015-02-20 05:50:49 -08:00
  • 530c87845e add readme swaits 2015-02-20 05:50:13 -08:00
  • 54b804cf18 re-vendored swaits 2015-02-20 05:31:34 -08:00
  • 5fb78a041e add sh and zsh targets to make file to conveniently get at the same environment as make; moved cover.out to $/tmp, updated .hgignore to match swaits 2015-02-20 05:31:08 -08:00
  • 7c943fee07 very minor banner change swaits 2015-02-19 11:29:30 -08:00
  • 4baebdda93 Merge from develop swaits 2015-02-18 07:55:42 -08:00
  • a7ca3de99e change the functions basically just taking a single *httpItem parameter to use them as receivers instead swaits 2015-02-18 07:55:22 -08:00
  • 6ed857bb77 Merge from develop swaits 2015-02-17 10:38:23 -08:00
  • f9488c5c11 flow: Merged <feature> 'cleanup_and_refactoring' to <develop> ('develop'). swaits 2015-02-17 10:38:04 -08:00
  • 154ef4321e flow: Closed <feature> 'cleanup_and_refactoring'. feature/cleanup_and_refactoring swaits 2015-02-17 10:38:04 -08:00
  • 3e35fdb488 some cleanup and refactoring * moved crawlItem into fetch.go * renamed fetchPage fetchItem * doCrawl now takes number of workers as a parameter * command line flag parsing added swaits 2015-02-17 10:36:48 -08:00
  • 6c9434e39a flow: Created branch 'feature/cleanup_and_refactoring'. swaits 2015-02-17 09:53:28 -08:00
  • 425fb674dd Merge from develop swaits 2015-02-17 09:28:56 -08:00
  • 04e26b214e flow: Merged <feature> 'use_crawler_workers' to <develop> ('develop'). swaits 2015-02-17 09:28:34 -08:00
  • b502cfd5b1 flow: Closed <feature> 'use_crawler_workers'. feature/use_crawler_workers swaits 2015-02-17 09:28:34 -08:00
  • 13b84ee452 completion of crawler worker mode. tests still passing! swaits 2015-02-17 09:28:24 -08:00
  • 3f85a0e7c0 switch to using a limited number of crawler worker functions swaits 2015-02-17 09:24:52 -08:00
  • e80ef1b1b9 flow: Created branch 'feature/use_crawler_workers'. swaits 2015-02-17 09:24:26 -08:00
  • af148c3a8a Merge from develop swaits 2015-02-17 08:57:14 -08:00
  • e38595db7e realized we don't need the second itemMap ("results"), just the one ("crawled"). tests still pass. swaits 2015-02-17 08:56:46 -08:00
  • c58bf3b364 Merge from develop swaits 2015-02-17 02:11:19 -08:00
  • c13c5cf7dd better usage, command line error handling swaits 2015-02-17 02:10:50 -08:00
  • 82d901ac38 Merge from develop. Functional for initial release. swaits 2015-02-17 01:51:24 -08:00
  • 71e0ea4975 flow: Merged <feature> 'make_json_pretty' to <develop> ('develop'). swaits 2015-02-17 01:50:46 -08:00
  • 1c0512a98d flow: Closed <feature> 'make_json_pretty'. feature/make_json_pretty swaits 2015-02-17 01:50:46 -08:00
  • 1a66b03d0d add indentation to json output. update test. swaits 2015-02-17 01:50:39 -08:00
  • 21e2acd4a5 flow: Created branch 'feature/make_json_pretty'. swaits 2015-02-17 01:34:30 -08:00
  • 3a56205fa8 update Design doc status for each item swaits 2015-02-17 01:32:45 -08:00
  • e2a799f02f flow: Merged <feature> 'fix_anchor_duplication' to <develop> ('develop'). swaits 2015-02-17 01:26:44 -08:00
  • f72d5d5eb0 flow: Closed <feature> 'fix_anchor_duplication'. feature/fix_anchor_duplication swaits 2015-02-17 01:26:44 -08:00
  • 1b09e6c204 deal with anchors and index.html "page aliasing: proprerly * so now http://a.com/index.html and http://a.com/ are understood equivalents * as are http://a.com/x.html#blog and http://a.com/x.html (etc.) * this meant a little more bookkeeping in docrawler, but not horrible * stripAnchorFromURL because stripURL because it now handles anchor and path suffix stripping * and url tests were written to support this swaits 2015-02-17 01:26:20 -08:00
  • 4e335cfc8a reviewed coverage report. remove some dead code. add a few comments to areas of code unlikely to hit. swaits 2015-02-17 00:44:39 -08:00
  • db314ec938 flow: Created branch 'feature/fix_anchor_duplication'. swaits 2015-02-17 00:36:58 -08:00
  • 42a40be62f flow: Merged <feature> 'remove_error_from_parselinks' to <develop> ('develop'). swaits 2015-02-16 23:08:37 -08:00
  • ee3cac7e29 flow: Closed <feature> 'remove_error_from_parselinks'. feature/remove_error_from_parselinks swaits 2015-02-16 23:08:37 -08:00
  • 6edd18e361 remove error from return of parseLinks as it's not needed swaits 2015-02-16 23:08:33 -08:00
  • f16be33dbd flow: Created branch 'feature/remove_error_from_parselinks'. swaits 2015-02-16 23:06:45 -08:00
  • 6665729e3f rename docrawl -> doCrawl; add some missing comments swaits 2015-02-16 23:02:03 -08:00
  • 48be4bc77d flow: Merged <feature> 'unique_links_from_each_page' to <develop> ('develop'). swaits 2015-02-16 22:48:04 -08:00
  • 6d16ebb8a1 flow: Closed <feature> 'unique_links_from_each_page'. feature/unique_links_from_each_page swaits 2015-02-16 22:48:04 -08:00
  • 2c2cfc126c links are now uniq'd before marshaling * crawled is now a map to httpItem's (instead of struct{}) so we can connect pages mid-crawl * added duplicate link to html site, test updated to match * now any httpItem with linkType == tUnknown is listed as "Broken" in the output swaits 2015-02-16 22:47:56 -08:00
  • 7e18005473 remove page.go (merge miss from /develop) swaits 2015-02-16 22:24:59 -08:00
  • 81ae0c433b Merge from develop swaits 2015-02-16 22:23:19 -08:00
  • 9938ae06f6 flow: Merged <feature> 'refactor_state_management' to <develop> ('develop'). swaits 2015-02-16 22:14:23 -08:00
  • e3c730bdfc flow: Closed <feature> 'refactor_state_management'. feature/refactor_state_management swaits 2015-02-16 22:14:23 -08:00
  • 72cac47961 docrawl() completely refactored to use goroutine per URL * outputs status * crawlStatus() function created (split out of docrawl()) * changed from using bool flags to linkType in single httpItem enum, tests updated to match this * unified where we set httpItem.linkType (inside fetchType), appropriate errors and returns added * renamed a lot of things from 'page' to 'item' * include refurl in httpItem * []*Location result is now sorted swaits 2015-02-16 22:13:52 -08:00
  • d7cc760e5b rename page.go -> item.go swaits 2015-02-16 18:17:01 -08:00
  • 58614802b6 renamed Page -> httpItem, and changed its members to unexported as well * tests all passing swaits 2015-02-16 18:14:12 -08:00
  • 66f78b562f flow: Created branch 'feature/refactor_state_management'. swaits 2015-02-16 16:34:09 -08:00
  • d3aeafeba5 update TODO swaits 2015-02-16 16:28:36 -08:00
  • 2e99708417 won't recrawl pages that are the same after stripping #anchor (blah.html#about, blah.html#contact, etc.) * but broken * committing on feature branch and will come back to this swaits 2015-02-16 16:26:16 -08:00
  • d9009cdbaa flow: Created branch 'feature/unique_links_from_each_page'. swaits 2015-02-16 15:50:30 -08:00
  • 56467ea175 Merge from develop. First version satisfying all basic requirements. swaits 2015-02-16 06:27:10 -08:00
  • fe46e7af15 add a TODO list swaits 2015-02-16 06:13:59 -08:00
  • 77b50a22b4 split tests out from everything else in cloc (make stats) swaits 2015-02-15 23:12:01 -08:00
  • 81e673a6bc flow: Merged <feature> 'url_on_command_line' to <develop> ('develop'). swaits 2015-02-15 22:58:06 -08:00
  • e867840994 flow: Closed <feature> 'url_on_command_line'. feature/url_on_command_line swaits 2015-02-15 22:58:06 -08:00
  • 5813e948f0 will attempt to crawl any URLs passed in on command line swaits 2015-02-15 22:58:01 -08:00
  • e3556df1b1 flow: Created branch 'feature/url_on_command_line'. swaits 2015-02-15 22:31:18 -08:00
  • b159dbf636 design doc extra line removed swaits 2015-02-15 22:30:53 -08:00
  • bdc75eca4a flow: Merged <feature> 'fix_broken_links' to <develop> ('develop'). swaits 2015-02-15 22:27:04 -08:00
  • c2b2897f5d flow: Closed <feature> 'fix_broken_links'. feature/fix_broken_links swaits 2015-02-15 22:27:04 -08:00
  • 569037d29f lint and fmt swaits 2015-02-15 22:26:44 -08:00
  • f3152b6f44 broken links now recorded as such * Broken field in Page{} now, * anything that fails to fetch (with http 200) or parse (should not happen) is considered broken * tests updated appropriately * discovered my "image.png" file was in the wrong directory because it showed up as broken. fixed! * bug fix: only fetch if type=text/html (after HEAD response) swaits 2015-02-15 22:25:50 -08:00
  • f9fd0955e8 flow: Created branch 'feature/fix_broken_links'. swaits 2015-02-15 22:09:25 -08:00
  • 2f2d1036f6 flow: Merged <feature> 'limit_host_part' to <develop> ('develop'). swaits 2015-02-15 22:09:10 -08:00
  • 148e833454 flow: Closed <feature> 'limit_host_part'. feature/limit_host_part swaits 2015-02-15 22:09:10 -08:00
  • 7498b648d7 urls with hosts that don't match the first URL are now skipped and marked as remote in the output * added Skipped field to Page to remember this state * marshaled into "Remote" field in JSON * bug fix: skipped (etc.) sites weren't getting added to the main page list * tests had to be reworked. because the crawl is non-deterministic, the tests started breaking. tests made a bit more robust, but are slightly weaker now. * the lists of URLs in the output are now sorted * ... and the parseLinks is no longer doing any sorting (no point in it) * parser tests updated accordingly * added a "broken" link to index.html - not currently supported, will fix next! swaits 2015-02-15 22:07:37 -08:00
  • 794f586979 flow: Created branch 'feature/limit_host_part'. swaits 2015-02-15 20:44:54 -08:00
  • 4598e6d8fe flow: Merged <feature> 'output_sitemap' to <develop> ('develop'). swaits 2015-02-15 20:42:55 -08:00
  • 2ae0502aba flow: Closed <feature> 'output_sitemap'. feature/output_sitemap swaits 2015-02-15 20:42:55 -08:00
  • be11b13443 json sitemap output now functional * the json marshaller cannot deal with circular data structures, and no automatic .String() conversion * so we copy our crawl data slice into another slice which will be marshaled into json more easily * made the page slice we use during crawling actually circular (as it should be) rather than putting duplicates in for each page discovered * test for conversion to output data structure, and hacky cheater test for json output * removed Base *Page from our Page struct as it's only needed temporarily swaits 2015-02-15 18:57:34 -08:00
  • 7d9bd98488 flow: Created branch 'feature/output_sitemap'. swaits 2015-02-15 17:25:52 -08:00
  • 8a6cac5df0 minor test cleanup; add "make stats" target to run cloc against project swaits 2015-02-15 16:19:58 -08:00
  • 828d776b94 flow: Merged <feature> 'improve_test_coverage' to <develop> ('develop'). swaits 2015-02-15 16:04:09 -08:00
  • 1e54b04490 flow: Closed <feature> 'improve_test_coverage'. feature/improve_test_coverage swaits 2015-02-15 16:04:09 -08:00
  • ccc65f9715 coverage improved from 85.2% to 91.1% swaits 2015-02-15 16:03:10 -08:00
  • e4ce693396 flow: Created branch 'feature/improve_test_coverage'. swaits 2015-02-15 15:38:01 -08:00
  • cca2bcaf58 flow: Merged <feature> 'create_simple_sitemap' to <develop> ('develop'). swaits 2015-02-15 15:31:27 -08:00
  • f058de8e6f flow: Closed <feature> 'create_simple_sitemap'. feature/create_simple_sitemap swaits 2015-02-15 15:31:27 -08:00
  • 8a71e4cb5c missed a go fmt swaits 2015-02-15 15:30:13 -08:00
  • c95ad7ab95 now crawling multiple pages! * moved Page{} and NewPage() into page.go * queued and crawled are both maps now. used to track which pages we already know about * tests updated to match the multipage crawling * added another file to the testsite (scripts/blah.js) swaits 2015-02-15 15:26:21 -08:00
  • 0c48b94ece refactoring and cleanup. needed before proceeding. * fetch() renamed to fetchPage. now takes *Page instead of url string * fetch_filetype() renamed to fetchFiletype. now takes *Page instead of url string * parse() renamed to parseLinks() * tests updated appropriately * minor cleanup (lint) * NewPage added for conveniently creating new *Page structs from url strings swaits 2015-02-15 14:54:52 -08:00
  • 614f05f1d7 minor Makefile cleanup swaits 2015-02-15 14:02:08 -08:00
  • 9fb19b0067 Merge from develop. Plus hack fix to make golint work again. swaits 2015-02-15 12:59:52 -08:00
  • d8b47abf6e flow: Merged <feature> 'add_test_coverage' to <develop> ('develop'). swaits 2015-02-15 12:41:02 -08:00
  • 67817048f9 flow: Closed <feature> 'add_test_coverage'. feature/add_test_coverage swaits 2015-02-15 12:41:02 -08:00
  • 12cd121271 add coverage to Makefile (make cover) * also tweaked GOPATH as needed * re-vendored with cover tool included * ignore $/cover.out swaits 2015-02-15 12:40:56 -08:00
  • dbf49d259b flow: Created branch 'feature/add_test_coverage'. swaits 2015-02-15 12:18:00 -08:00
  • 0456723f0b minimally functional crawler - crawls single page, finds links, stores in data structure * refined Page struct. now need to refactor everything else to use this * wrote docrawl() function. NOT intended to be anything like the final design. just sketching it out to get a better idea of needs, design, etc. * replaced fmt.Print* with t.Log* in tests (oops!) * added a header fetcher function to get the file type (since we only want to parse html (with tests) * added small test for the URL resolver where the base URL is empty * added placeholder files in testsite/ for about.html and image.png swaits 2015-02-15 12:12:30 -08:00
  • 7f6978ad27 Merge from develop swaits 2015-02-15 10:03:36 -08:00
  • d60700bf1a flow: Merged <feature> 'url_parse_and_clean' to <develop> ('develop'). swaits 2015-02-15 10:02:25 -08:00
  • afa5cfcc89 flow: Closed <feature> 'url_parse_and_clean'. feature/url_parse_and_clean swaits 2015-02-15 10:02:25 -08:00