Skip to content

Commit

Permalink
added README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Parry-97 committed Jul 9, 2023
1 parent 3e0a90e commit a98ce7e
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 18 deletions.
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Claus Matzinger <claus.matzinger+kb@gmail.com>", "Param Pal Singh <singhparampal97@gmail.com"]
edition = "2018"
name = "manning-lp-async-rust-project"
name = "stock_cli"
version = "0.1.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Stock Tracking CLI App

This is a CLI app for tracking the price of stocks. It uses the [Yahoo Finance API crate](https://docs.rs/yahoo_finance_api/latest/yahoo_finance_api/index.html) to get the stock prices. The app is written entirely in _Rust_ and uses the following tools:

- [Clap](https://docs.rs/clap/2.33.3/clap/) for parsing command line arguments
- [Yahoo Finance API](https://docs.rs/yahoo_finance_api/latest/yahoo_finance_api/index.html) for getting the stock prices
- [Rustls](https://docs.rs/rustls/0.19.1/rustls/) for HTTPS requests
- [Tokio](https://docs.rs/tokio/1.9.0/tokio/) for async runtime
- [Actix]("https://actix.rs/") for actor system

The app is compiled using the 2018 edition of Rust.

## Example Usage

```bash

$ ./stock_cli --help

stock_cli 1.0
Param Singh, Claus Matzinger
A Manning LiveProject: Async Streams in Rust

USAGE:
stock_cli [OPTIONS] --from <FROM>

OPTIONS:
-f, --from <FROM>
Required start date for the period to fetch

-h, --help
Print help information

-m, --max-iterations <MAX_ITERATIONS>
Optional number of max iterations to run [default: 1]

-s, --source <SOURCE>
Optional .txt source file to read symbols from [default: sp500.may.2020.txt]

-V, --version
Print version information

```
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{error::Error, time::Duration};
use actix::Actor;
use chrono::{DateTime, Utc};
use clap::Parser;
use manning_lp_async_rust_project::{
use stock_cli::{
actors::{
DataLoadActor, DataLoadMessage, DataProcessActor, DataProcessMessage, DataSaveActor,
DataSaveMessage,
Expand Down
4 changes: 2 additions & 2 deletions src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use crate::calculations::{max, min, n_window_sma, price_diff};
#[derive(Parser, Debug)]
#[clap(
version = "1.0",
author = "Claus Matzinger",
about = "A Manning LiveProject: async Rust"
author = "Param Singh, Claus Matzinger",
about = "A Manning LiveProject: Async Streams in Rust"
)]
pub struct Opts {
/// Optional .txt source file to read symbols from
Expand Down

0 comments on commit a98ce7e

Please sign in to comment.