Explorar el Código

Support precious metals

Samuel W. Flint hace 6 años
padre
commit
11776bc4d6
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      bean-prices

+ 1 - 1
bean-prices

@@ -17,7 +17,7 @@ for line in $(cat ~/.ledger/commodities.txt ) ; do
     elif [ $TYPE == 's' ] ; then
         bean-price -e "USD:google/$COMMODITY" | awk -e '{printf "%s %s %s %.2f %s\n", $1, $2, $3, $4, $5}'  | tee -a ${TEMP_FILE}
     elif [ $TYPE == 'm' ] ; then
-        echo "Precious metals are not currently supported."
+        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}
     else
         echo "$TYPE is not currently a known type."
     fi