You are not logged in.

#1 2019-09-15 22:34:56

kunda
Member
Registered: 2019-01-06
Posts: 9

[REQUEST] wallstreet - Stock Quotes and Charts for the Terminal

Repo: https://github.com/madnight/wallstreet

https://user-images.githubusercontent.c … 295766.png

Dependencies:
npm

  "dependencies": {
    "alphavantage": "^1.2.5",
    "array-interpolatejs": "^1.0.2",
    "asciichart": "^1.5.9",
    "axios": "^0.19.0",
    "chalk": "^2.4.2",
    "cnn-market": "^1.0.0",
    "commander": "^3.0.0",
    "configstore": "^5.0.0",
    "human-readable-numbers": "^0.9.5",
    "lodash": "^4.17.15",
    "node-fetch": "^2.6.0",
    "node-iex-cloud": "^0.0.4",
    "yahoo-stocks": "^2.0.4"
}

moderator edit -- replaced oversized image with link.
Pasting pictures and code

Last edited by 2ManyDogs (2019-09-15 22:44:50)

Offline

#2 2019-09-16 12:39:56

loqs
Member
Registered: 2014-03-06
Posts: 8,821

Re: [REQUEST] wallstreet - Stock Quotes and Charts for the Terminal

Based on Node.js package guidelines

pkgname=wallstreet-git
_pkgname=wallstreet
pkgver=r21.05aa8ea
pkgrel=1
pkgdesc="Stock quotes and charts for the terminal"
arch=('any')
url="https://github.com/sheerun/bower-away"
license=('MIT')
depends=('nodejs' 'coffee-script')
makedepends=('npm' 'git' 'jq')
source=("git+https://github.com/madnight/wallstreet.git")
sha256sums=('SKIP')

pkgver() {
  cd $_pkgname
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  npm install -g --user root --prefix "$pkgdir/usr" git+file://$(realpath $_pkgname)
  find "$pkgdir/usr" -type d -exec chmod 755 {} +

  # Remove references to $pkgdir
  find "$pkgdir" -type f -name package.json -print0 | xargs -0 sed -i "/_where/d"

  # Remove references to $srcdir
  local tmppackage="$(mktemp)"
  local pkgjson="$pkgdir/usr/lib/node_modules/$_pkgname/package.json"
  jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage"
  mv "$tmppackage" "$pkgjson"
  chmod 644 "$pkgjson"
  chown -R root:root "$pkgdir"

  install -Dm 644 "$_pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

Build tested only.

Offline

Board footer

Powered by FluxBB