GithubHelp home page GithubHelp logo

bjjmath's Introduction

How to Run

  • Clone repo
  • go mod tidy
  • mkdir output && mkdir output/html && output/csv

References

Deps

LibSQL

https://github.com/tursodatabase/libsql/blob/main/libsql-server/docs/BUILD-RUN.md

Instructions for mac install were buried bc they changed repos

Future TO-DO

Beth stack for web site

Turso

https://turso.tech/ Managed SQlLite as libSQL seems promising way to add db to app very quickly with flat file local dev and generous free tier

Add a compilation phase and build steps

  • Create output directories
  • add git version to output maybe

How to work out belt rank for edges

A competitor that beat gordon at purple shouldn't be considered to beat gordon at black belt

How to work out scheduled jobs

Refresh data daily/weekly/etc

How to figure out ruleset

If a user beats gordon in EBI should that count for ADCC? What about points

[] Cache local files

gocolly/colly#193

Expire local file cache

I need to be able to record when a file was cached locally and then use current date to validate/expire the cache date I think for now once a month or week would really be fine.

[] REad local files

https://github.com/gocolly/colly/blob/master/_examples/local_files/local_files.go

[] Test new file against local file last modified date

Update local cache and rescrape

Resolve urls

Currently they are using weird ?p=# url and want the actual resolved urls

SqlLite

If you need to have sqlite first in your PATH, run: echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.zshrc

For compilers to find sqlite you may need to set: export LDFLAGS="-L/usr/local/opt/sqlite/lib" export CPPFLAGS="-I/usr/local/opt/sqlite/include"

For pkg-config to find sqlite you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig"

graph db with sqllite

Gotchas

Add protocol to scraping domain

must send https://www.bjjheroes.com not just www... weirdly it just failed silently would have expected an error.

Adding local pacakages

must run go mod init after

Best way to organize code

I'd like to just have

/src

  • main.go /package1
  • package1.go /package2
  • package2.go ...

but not sure entirely how to accomplish this. main.go should just setup the code with flags and then call into the src/ packages.

Go community pretty opinionated and have a standard https://github.com/golang-standards/project-layout

Bad url

Sheliah Lindsey Magness BJJ has original url: https://www.bjjheroes.com/?p=13193 which redirects to: https://www.bjjheroes.com/wp-content/uploads/2023/01/CarlosHenrique.jpg

it should be: https://www.bjjheroes.com/bjj-fighters/sheliah-lindsey

bjjmath's People

Contributors

seandunford avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.