Browse Source

Add a way of getting crypto commodity prices

Samuel W. Flint 2 years ago
parent
commit
27b21b6284
1 changed files with 2 additions and 0 deletions
  1. 2 0
      bean-prices

+ 2 - 0
bean-prices

@@ -20,6 +20,8 @@ for line in $(cat ~/Ledger/commodities.txt ) ; do
         bean-price -e "USD:yahoo/$NEWCOMMODITY" | awk -e '{printf "%s %s %s %.2f %s\n", $1, $2, $3, $4, $5}' | sed -e "s/${NEWCOMMODITY}/${ORIGCOMMODITY}/g" | tee -a ${TEMP_FILE}
     elif [ $TYPE == 'm' ] ; then
         bean-price -e "USD:oanda/${COMMODITY}_USD" | sed -e 's/_USD//' | awk -e '{printf "%s %s %s %.2f %s\n", $1, $2, $3, $4, $5}'  | tee -a ${TEMP_FILE}
+    elif [ $TYPE == 'C' ] ; then
+        bean-price -e "USD:yahoo/${COMMODITY}-USD" | sed -e 's/-USD//' | awk -e '{printf "%s %s %s %.2f %s\n", $1, $2, $3, $4, $5}' | tee -a ${TEMP_FILE}
     elif [ $TYPE == 'f' ] ; then
         bean-price -e "USD:yahoo/${COMMODITY}" | awk -e '{printf "%s %s %s %.2f %s\n", $1, $2, $3, $4, $5}'  | tee -a ${TEMP_FILE}
     else