Giter Club home page Giter Club logo

astronomical-twitterbot's People

Contributors

cori avatar

Watchers

 avatar  avatar

astronomical-twitterbot's Issues

add bot-ness


opened via imdone.io from a code comment on 441b05ed by cori


// TODO: add bot-ness id:0 gh:2 ic:gh
// TODO: how to organize the "API" vs the bot? id:1 gh:3 ic:gh
// TODO: logging? id:8 gh:12 ic:gh
// TODO: data persistance? id:7 gh:11 ic:gh
// TODO: set up cron id:9 gh:13 ic:gh
// TODO: reply immediately if 2*lt < ~5 minutes (the period I'll poll twitter for new messages) id:10 gh:14 ic:gh

set up cron


opened via imdone.io from a code comment on 7c3c10e7 by cori


// TODO: set up cron id:9 gh:13 ic:gh
// TODO: reply immediately if 2*lt < ~5 minutes (the period I'll poll twitter for new messages) id:10 gh:14 ic:gh
// init project
var express = require('express');
var app = express();

some kind of race condition here; on occasion time_boundries is undefined when we get here

particularly (it seems) when there are multiple tweets/dms to handle


opened via imdone.io from a code comment on 5935f153 by cori


// TODO some kind of race condition here; on occasion time_boundries is undefined when we get here
// particularly (it seems) when there are multiple tweets/dms to handle
var lt = output.split(time_boundaries.start)[2].split(time_boundaries.end)[0].trimLeft();
return lt;
}
function convert_owlt_to_round_trip( one_way_light_time ) {

it seems like this doesn't always reset the session id, because we're getting back the same time for multiple bodies in one run

j = requestor.jar(); // need a new jar on every request to reset the session


opened via imdone.io from a code comment on 5935f153 by cori


// TODO: it seems like this doesn't always reset the session id, because we're getting back the same time for multiple bodies in one run
// j = requestor.jar(); // need a new jar on every request to reset the session
return requestor.post({ jar: j, url: horizonsUri, form: {sstr:name, body_group:'all', find_body:'Search', mb_list:'planet'}})
.then( function( html ) {
var dom = cheerio.load(html);
var errorNode = dom('.error');
var settings = dom('h3').next();

something's up with the times - I'm either getting or no matter what body names I use.

     Argh! for some bodies there are multiple possible responses, and you've got to select amongst them

opened via imdone.io from a code comment on 3c22b297 by cori


// TODO: something's up with the times - I'm either getting 16:33 or 20:27 no matter what body names I use. id:17 gh:23 ic:gh
// Argh! for some bodies there are multiple possible responses, and you've got to select amongst them
/****************** multi-body selection ******************
<form method="post" action="https://ssd.jpl.nasa.gov/horizons.cgi#top" enctype="multipart/form-data">
<h3>select from 2 matching bodies:</h3>
<select name="body" size="2">

data persistance?


opened via imdone.io from a code comment on 7c3c10e7 by cori


// TODO: data persistance? id:7 gh:11 ic:gh
// TODO: set up cron id:9 gh:13 ic:gh
// TODO: reply immediately if 2*lt < ~5 minutes (the period I'll poll twitter for new messages) id:10 gh:14 ic:gh
// init project
var express = require('express');

parse the reponse body, looking for this content, or a subset thereof, and return, skipping the rest of the chain

missing celestial body results in


opened via imdone.io from a code comment on 441b05ed by cori


// TODO: parse the reponse body, looking for this content, or a subset thereof, and return, skipping the rest of the chain
// missing celestial body results in
/*
<div class="error">
<a name="top"><b>&nbsp; ERROR:</b>
</a><ul>
<li>no matching body found

extract the request pattern


opened via imdone.io from a code comment on 3f671125 by cori


// TODO: extract the request pattern id:4 gh:7 ic:gh
function horizons_find_astro_body_step( name ) {
console.clear();
// curl -d sstr=sedna -d body_group=all -d find_body=Search -d mb_list=planet https://ssd.jpl.nasa.gov/horizons.cgi -v
requestor.post({ jar: j, url: horizonsUri, form: {sstr:name, body_group:'all', find_body:'Search', mb_list:'planet'}}, function( error, response, body ) {

logging?


opened via imdone.io from a code comment on 7c3c10e7 by cori


// TODO: logging? id:8 gh:12 ic:gh
// TODO: data persistance? id:7 gh:11 ic:gh
// TODO: set up cron id:9 gh:13 ic:gh
// TODO: reply immediately if 2*lt < ~5 minutes (the period I'll poll twitter for new messages) id:10 gh:14 ic:gh
// init project

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.