For 2nd level spellbooks or higher, assume there's about 6 spells in the book. Using one of the standard spell lists, roll a d10 once to find the first spell in the book; the five spells after it on the list are also in the book by default. Follow up with 4d20 and look up each result on the list; if the result is a spell already known, drop it; otherwise, add it. Any d20 result that is higher than the number of spells on the standard lists means no spell.
If a wizard is particularly inventive, there will be non-standard spells in the spellbook. If you have no ideas or other spell lists to steal from, divide the wizard's Int by 6 (round down) and roll that many d20s on the Quickie Dice Tool; ignore any rolls higher than the number of spells on the standard list, but treat other rolls as indicating the base spell, modified by the Material, Ability, or Action indicated.
First level spellbooks always contain all the spells on the standard list and 0 to 3 additional non-standard spells.