Browse Source

Update bean-prices

Samuel W. Flint 5 years ago
parent
commit
be7eb365f8
1 changed files with 4 additions and 4 deletions
  1. 4 4
      bean-prices

+ 4 - 4
bean-prices

@@ -13,13 +13,13 @@ for line in $(cat ~/.ledger/commodities.txt ) ; do
     TYPE=$(echo $line | cut -d' ' -f1)
     COMMODITY=$(echo $line | cut -d' ' -f2)
     if [ $TYPE == 'c' ] ; then
-        bean-price -e "USD:google/^CURRENCY:USD$COMMODITY" | sed -e 's/CURRENCY:USD//' | awk -e '{printf "%s %s %s %.2f %s\n", $1, $2, $3, $4, $5}'  | tee -a ${TEMP_FILE}
+        bean-price -e "USD:yahoo/${COMMODITY}USD=X" | sed -e 's/USD=X//' | awk -e '{printf "%s %s %s %.2f %s\n", $1, $2, $3, $4, $5}'  | tee -a ${TEMP_FILE}
     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}
+        bean-price -e "USD:iex/$COMMODITY" | awk -e '{printf "%s %s %s %.2f %s\n", $1, $2, $3, $4, $5}'  | 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}
+        bean-price -e "USD:oanda/${COMMODITY}USD=X" | sed -e 's/USD=X//' | 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:google/MUTF:${COMMODITY}" | sed -e 's/MUTF://' | awk -e '{printf "%s %s %s %.2f %s\n", $1, $2, $3, $4, $5}'  | tee -a ${TEMP_FILE}
+        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
         echo "$TYPE is not currently a known type."
     fi