Euler's Continued Fraction Theorem for fractions

How can I use Euler's Continued Fraction Theorem to find the continued fraction expansion for a (ordinary, finite) fraction via its (terminating or recurring) decimal expansion, rather than via the more obvious Euclid's Algorithm?

The examples I'm thinking of are $5/7$ and $3/8$ each of which can be thought of as a series in a power of $10$

$5/7=0.\overline{571428}=\sum _{k=1}^{\mathrm{\infty}}571428({10}^{-6}{)}^{k}$

and

$3/8=0.375=3\ast {10}^{-1}+7\ast {10}^{-2}+5\ast {10}^{-3}.$

I'd like to use these coefficients and expansion points together with Euler's Theorem to show the continued fraction expansions

$5/7=[0;1,2,2]$

and

$3/8=[0;2,1,2].$