Sure thing, the right way to do this is to take what beer you have left over in the primary and siphon it into some sort of bottling bucket but given the small amount of beer you have left you could probably use a nice sized pot or something. The important thing is to figure out how much beer you actually have so you'll know how many bottles to use and how much priming sugar you need. If you siphon off into the bottling bucket and its marked with gallon, half gallon marks and you feel good about estimating the volume based on those marks than great. Same if you use a gallon container. You probably won't end up with anything near a gallon, at least I don't but if you feel good guesstimating with your eyes based on your known volume (e.g. the gallon container) than run with it. You could also siphon the left over beer into your bottles before putting the beer into the priming container. This way you'll know exactly how many bottles and how much sugar you'll need.
After you have your volume of beer you need to figure out how much priming sugar you need. You'll probably do best to scale down from 3/4 of a cup of priming sugar per five gallon batch based on how much beer you have. You could also scale up (probably a little easier) from 1/2-1 teaspoon of priming sugar per bottle. You should boil the sugar in as little water as possible to make sure there is no contamination and that the sugar is sanitized. After you boil the sugar you can move it to the left over beer and then bottle as you would normally.
Now, having said all that, you can do it my way (many many many people will cringe using my way however so read with caution). I usually just add something just over 1/2 teaspoon directly to my clean and sanitized bottle. With some experimentation I've found the 1 teaspoon number to over carbonate a bit and the 1/2 teaspoon to be just under what I'm looking for (of course make adjustments depending on the beer your are bottling, maybe a little more for wheat or lighter beers and and a little less for heavier, fuller English beers, experiment a little to figure out what amount works best for you).
I like this way because there isn't as much guess work. I can bottle until I run out of beer. Having said that, I'm not really taking into account the potential for contaminated priming sugar and carbonation is going to be inconsistent between and among bottles and batches. Having said that, I've never had a problem with contamination and since all I'm usually bottling is somewhere between 2-6 bottles of left over beer that used to go down the drain, the fact I've found a viable use for it makes me happy enough to trump and concerns I may have had about the consistency regarding the level of carbonation. It works for me! To put an experimental spin on it, it gives you the freedom to mess with different levels of carbonation to figure out what you like best with each kind of beer. Much better to put varying amounts of sugar in each bottle to see what they give you than to try and mess with a five gallon keg. Just be careful to not prime too much, we don't want any bottle bombs!! I would say, with my experience, there is never a reason to go above 1 teaspoon per bottle no matter what kind of beer and how much you want it carbonated.
On a final note, this method of bottling my left over beer developed because the volumes of my primary and secondary are different. If they were the same I wouldn't have the extra beer and thus, wouldn't bottle anything. But since I formulate my recipes for six gallons (to account for trub and spent yeast loss) and my kegs and secondaries are only five gallons it means I usually have some left over, depending on original yeast count, the type of yeast, its flocculation, attenuation and my starting wort volume (usually between 2-6 bottles).
Since I'm taking the beer from the primary I do not expect it to be as clear as if I had taken it from the secondary. But again, I can't understate that this is the beer that was once going down the drain. The fact that I've found a way to keep it is worth the extra haze and sediment at the bottom of the bottle.