#!/usr/bin/ruby -w require 'date' require 'pp' # require 'extra/enum' require 'inat/app/application' require 'inat/app/globals' require 'inat/data/entity/observation' require 'inat/data/entity/request' require 'inat/data/db' require 'inat/data/query' app = INat::Application.new app.run # PP::pp Globals.config, $>, 64 # puts # puts DDL.DDL # PP::pp DB::instance, $>, 64 # data = API::query(:observations, user_login: 'shikhalev', month: 11) # PP::pp data.map { |d| Observation::parse(d) }.size, $>, 64 # https://www.inaturalist.org/projects/174222 # https://www.inaturalist.org/places/193592 # https://www.inaturalist.org/places/193881 (Ачитский район) # https://www.inaturalist.org/places/194104 (Богдановичский район) # https://www.inaturalist.org/places/194414 (Качканарский район) # https://www.inaturalist.org/places/194023 (Берёзовский район) # https://api.inaturalist.org/v1/observations?project_id=176067&updated_since=2023-10-31T19:36:29+05:00&per_page=200&order_by=id&order=asc&locale=ru&preferred_place_id=11829 # W, [2023-11-02T01:54:41.818021 #8118] WARN -- ‹main›: Some Taxon IDs were not fetched: 48460, 1, 47120, 245097, 47119, 47118, 120474, 342614, 319384, 67599, 495875, 153683, 153680, 367182, 48893, 1252003, 60920! # W, [2023-11-02T03:49:58.509031 #8118] WARN -- ‹main›: Some Taxon IDs were not fetched: 1, 47118, 47119, 47120, 48460, 48893, 60920, 67599, 120474, 153680, 153683, 245097, 319384, 342614, 367182, 495875, 1252003! # query = Query::new project_id: 180212 # PP::pp query.observations.size, $>, 64 # require 'inat/data/types/apiquery' # pp Time::new.to_date.to_s # a = ApiQuery::new ololo: 1, lalala: UUID.generate # PP::pp a, $>, 64 # puts a.to_query # Request::create '' # pp URI::parse('https://api.inaturalist.org/v1/observations?project_id=176067&updated_since=2023-10-31T19:36:29+05:00&per_page=200&order_by=id&order=asc&locale=ru&preferred_place_id=11829') # d = Date::parse '2023-11-01' # t = d.to_time # i = t.to_i # pp [ d, t, i ]