App-Chart

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

devel/run-annotation-dialog.pl
devel/run-delete-symlist-dialog.pl
devel/run-diagnostics.pl
devel/run-download-dialog.pl
devel/run-draw-text-centred.pl
devel/run-haxis.pl
devel/run-heading.pl
devel/run-intraday.pl
devel/run-jobs-running-dialog.pl
devel/run-open-dialog.pl
devel/run-prefs-dialog.pl
devel/run-raw-dialog.pl
devel/run-symlist-radio.pl
devel/run-vacuum-dialog.pl
devel/run-watchlist.pl
devel/run-weblink-menu.pl
devel/scandeps-to-makefile.pl
devel/t-font.pl
devel/VacuumDialog.t
devel/warnings-unused.pl
devel/weblinks-samples.pl

SIGNATURE  view on Meta::CPAN

SHA256 24797dc2d69746dbba9c690ffe2b2daa43d698cf1080bd635c6e6be88dae7512 devel/run-annotation-dialog.pl
SHA256 f362345645c9ca6b7d49627ebd6a98347cabf2f9d4ab6f47b759b6a8332b109d devel/run-delete-symlist-dialog.pl
SHA256 f25119a21f792a4387adc45e299156e54bc7ef914e11da49d3fd9f156556a972 devel/run-diagnostics.pl
SHA256 c70b33b20cbe7b42bec7689a831093e181ec75c5376d0116812fa6e134942241 devel/run-download-dialog.pl
SHA256 d68087da99e8838a2f3b53c819f1a2547623dfe15995c56560787bdebb5a722a devel/run-draw-text-centred.pl
SHA256 18b105923bbaebcd34d2fb0be9444ccafb1e21b6eee8fbf76c592d167c428d64 devel/run-haxis.pl
SHA256 c6c926f0eac842d6eb1653b3bd2a031603e6369b1549ef058d88c72d25fa40f6 devel/run-heading.pl
SHA256 a701d9bf34ceb3d10e50e52c735a30cebb2c4d4603da7cbe11e4b6f167d2c3ac devel/run-intraday.pl
SHA256 24899e0f055048bd8a2fb45530241f526f40d7fa2e8f438ebfc8f900cb17ac7f devel/run-jobs-running-dialog.pl
SHA256 69f6d78365b39c723851c4e6ae11dfc08716b22e6444ccc811d12907ad4af6f0 devel/run-open-dialog.pl
SHA256 e35ef28e85dc058fcb0e62174a6973f77407dbb414e758c10cab4c1356a0bde6 devel/run-prefs-dialog.pl
SHA256 d87ea25d5b20259b08ae6999babe713fa52b4edd5a9a8feab02c7ffacf4c98df devel/run-raw-dialog.pl
SHA256 9290c8e2c637d88d62fe53299119c092e4abdb6aee7391409a567bf64efe6b5b devel/run-symlist-radio.pl
SHA256 92e835ba79fec7320002fac85a8d1e23ee3fb5d736dc05bb65f7ab95feca7850 devel/run-vacuum-dialog.pl
SHA256 8d75ca16af0278979dca0add454c428e3c6b15f1a73d7a19afb8deb9d35443be devel/run-watchlist.pl
SHA256 3f506735ef788c81846f1aa8d675f439593de15dd40792ac5be493dd791a1053 devel/run-weblink-menu.pl
SHA256 1d1ecce3422cc27664c56cd25154f527eba4fe8e525d1ebfdbeeba11249f8b39 devel/scandeps-to-makefile.pl
SHA256 4e6ce15b51751058ab886c652ce26a1e9d43ee191d461326324824d4784a5c53 devel/t-font.pl
SHA256 8d8df3fb74414fcbd64e5ada2b035dcdfcd7ebc5b2e2cb50c08b1777b97f61b1 devel/warnings-unused.pl
SHA256 832bab8ba2de4162c241e56ec6408eb245bfa5d7c241b880baeaf179eb069127 devel/weblinks-samples.pl
SHA256 37511f6aaf431a8389299da2e32453d7b1c90b103f13d32c0b992adc856cb406 doc/chart.omf

devel/convert-scm.pl  view on Meta::CPAN

        $sth->execute ($symbol, $id, $price, ($key eq 'alert-above' ? 1 : 0));
        $sth->finish();

      } else {
        print "unrecognised note: ", Dumper(\$form);
      }
    }
  }
}

sub convert_prefs {
  print "prefs\n";

  my $filename = "$ENV{HOME}/Chart/prefs.scm";
  my $content = File::Slurp::slurp ($filename);

  $content =~ s/\#f/""/g;
  my $forms = Lisp::Reader::lisp_read($content);

  foreach my $form (@$forms) {
    my $key = $form->[0];
    if ($key eq 'favourites') {
      my ($key, $list) = @$form;
      my $sth = $nbh->prepare_cached

devel/convert-scm.pl  view on Meta::CPAN

      $all_symlist->insert_symbol ($symbol);
    }
  }
}

$dbh->begin_work;
$nbh->begin_work;
$dbh->do ('PRAGMA synchronous = OFF');
$dbh->do ('PRAGMA cache_size = 20000'); # of 1.5k pages, is 30Mb

convert_prefs();

#convert_notes ('BHP.AX','BBW.AX','ERA.AX','TEL.NZ');
convert_notes (directory_files ("$ENV{HOME}/Chart/notes"));

convert_intraday ();

#convert_data ('TEL.NZ','FPA.NZ','BHP.AX','IPG.AX');
convert_data (directory_files ("$ENV{HOME}/Chart/data"));

convert_historical;

lib/App/Chart/Google.pm  view on Meta::CPAN

# overridden by specific nodes
# App::Chart::setup_source_help
#   ($google_pred, __p('manual-node','Google Finance'));



#-----------------------------------------------------------------------------
# web link - basic quote page
#
# Eg. http://www.google.com/finance?q=BHP.AX
# Probably not for prefs etc.

App::Chart::Weblink->new
  (pred => $google_web_pred,
   name => __('_Google Stock Page'),
   desc => __('Open web browser at the Google Finance page for these shares'),
   proc => sub {
     my ($symbol) = @_;

     my $suffix = App::Chart::symbol_suffix ($symbol);
     if ($suffix eq '.AX') {

lib/App/Chart/Google.pm  view on Meta::CPAN

# download
#
# This uses the historical prices page like
#
#     http://www.google.com/finance/historical?q=AAPL
#
# which used to have a CSV link like
#
#     http://www.google.com/finance/historical?cid=22144&startdate=Aug+15%2C+2008&enddate=Aug+14%2C+2009&output=csv
#
# but maybe now is only the HTML.  No data available for ASX prefs apparently.
#

App::Chart::DownloadHandler::IndivChunks->new
  (name       => __('Google'),
   pred       => $google_pred,
   available_tdate_by_symbol => \&daily_available_tdate,
   available_tdate_extra     => 1,
   url_func   => \&daily_url,
   parse      => \&daily_parse,
   chunk_size => 500);

lib/App/Chart/Suffix/AX.pm  view on Meta::CPAN


my $pred_any = App::Chart::Sympred::Any->new ($pred_shares, $pred_indexes);
App::Chart::TZ->sydney->setup_for_symbol ($pred_any);

# App::Chart::setup_source_help
#   ($pred_any, __p('manual-node','Australian Stock Exchange'));
# while nothing ASX specific ...
App::Chart::setup_source_help
  ($pred_any, __p('manual-node','Yahoo Finance'));

# ordinary shares like NAB.AX, not prefs like NABHA.AX
my $pred_ordinaries = App::Chart::Sympred::Regexp->new (qr/^.{0,3}\.AX$/);

# but no "spreadsheet format" for ASX, just the weblink for now
$App::Chart::Google::google_web_pred->add ($pred_ordinaries);




# See http://www.asx.com.au/resources/education/basics/trading_hours_asx.htm
# SEATS takes changes only between 7am and 7pm

lib/App/Chart/Suffix/AX.pm  view on Meta::CPAN

__END__





# Other Sites:
#
# eoddata.com -- pay
# www.tradingroom.com.au -- gone to afr.com with login required
# findata.co.nz -- ASX past 30 days, incl prefs, but login to download more
#
# asxhistoricaldata.com
# week's worth of all shares zipped like (about 80 kbytes) back to 1997
# http://www.asxhistoricaldata.com/wp-content/uploads/week20160429.zip
# monthly and yearly files before recent weeks
# ordinaries only, no prefs
#
# http://www.cooltrader.com.au
# Register, free 10am next day, renew annually, daily csv files.
#
# barchart.com includes ASX, but register for historical maybe
#
# http://www.smh.com.au/business/markets/quotes/price-history/BHP/bhp-billiton-limited
# http://www.smh.com.au/business/markets/quotes/price-history/BHP/bhp-billiton-limited?page=2
# HTML table of recent prices and page to go back, about 100k each month
# Maybe only selected top ordinaries

unused/CommSec.pm  view on Meta::CPAN

#    - commsec whole-day update files
#    - commsec individual update files
#
# To update many ASX shares the whole-day files are best, or for just a few
# then the individual files are best.  A mixture is used too, if there's a
# few symbols that are quite a bit behind then they'll be done
# individually, and the balance with whole-day.
#
# The main problem with the whole-day file is how many entries it has,
# about 4500 as of Jan 2007.  There's about 1600 companies (a lot of them
# small caps), the rest is warrants on the majors, and a few prefs or bonds
# on various.

App::Chart::DownloadHandler->new
  (name            => __('CommSec'),
   pred            => $pred,
   available_tdate => \&available_tdate,
   proc            => \&download,
   priority        => 10);

# today's data available after 10:30pm weekdays, Sydney time

unused/Float.pm  view on Meta::CPAN

#    - float whole-day update files (possible zipped)
#    - float individual historical files (possibly zipped)
#
# To update many ASX shares the whole-day files are best, or for just a few
# then the individual files are best.  A mixture is used too, if there's a
# few symbols that are quite a bit behind then they'll be done
# individually, and the balance with whole-day.
#
# The main problem with the whole-day file is how many entries it has,
# about 4500 as of Jan 2007.  There's about 1600 companies (a lot of them
# small caps), the rest is warrants on the majors, and a few prefs or bonds
# on various.

App::Chart::DownloadHandler->new
  (name            => __('Float'),
   pred            => $pred,
   available_tdate => \&available_tdate,
   proc            => \&download,
   priority        => 20); # before 2nd commsec, and before yahoo

sub download {

unused/TradingRoom.pm  view on Meta::CPAN

   name => __('Tradig Room Summary'),
   desc => __('Open web browser at the Trading Room summary page for these shares'),
   proc => sub {
     my ($symbol) = @_;
     return 'http://www.tradingroom.com.au/apps/qt/quote.ac?sy=tpl&type=delayedquote&code='
       . URI::Escape::uri_escape(App::Chart::symbol_sans_suffix($symbol));
   });


#-----------------------------------------------------------------------------
# download - prefs
#
# For ordinary NAB.AX etc prefer Yahoo which takes a date range and goes
# back further than a year.  But as of June 2015 it doesn't have historical
# data for preference shares like NABHA.AX (though it does have quotes).
# Use Trading Room 1-year csv for ASX prefs.  Its csv is about 13kbytes for
# the full year, with no compression offered apparently.
#
App::Chart::DownloadHandler->new
  (name            => __('TradingRoom'),
   pred            => App::Chart::Sympred::Regexp->new (qr/^.{4,}\.AX$/),
   available_tdate => \&available_tdate,
   proc            => \&download,
   priority        => 10);

# today's data available ...



( run in 1.081 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )