imsky / PocketEuler

:heavy_plus_sign: Offline version of Project Euler.
116 stars 11 forks source link

Added problem's titles. #64

Closed yehoshuapw closed 7 years ago

yehoshuapw commented 8 years ago

added problems titles, as a subheader.(H2)

so now for example problem 33 is:

Problem 33

Digit cancelling fractions

...

imsky commented 8 years ago

👏

yehoshuapw commented 7 years ago

rebased, and redid, with some fixes so won't need to do this each time, and merging should be enough. (most of my addition was adding lines, but I also before hade the --------- part constant length, so there were conflicts. Now only adds in the subtitle.)

yehoshuapw commented 7 years ago

I connected all the pieces of scripts I used, and added in the 'by hand' changes and edited into a single script, that does my job. script. It's not very elegant, since I didn't program it as a script, but glued together scriptlets i made, and changed a bit here and there to be easy to change some things.

Anyways, should I add that in?

imsky commented 7 years ago

feel free to add it in

jayvdb commented 7 years ago

Could you replace /home/ypw/ with ~, and use mkdir -p to make the base directories if they are missing. Note there are Python libraries that can be used to fetch PE problem data (titles and problem text), but if this script works for you, and it also works when someone else runs it, then 👍 from me too.

yehoshuapw commented 7 years ago

Those 2 lines are supposed to be edited, since defaultpath should be where README.md is, and defaultthingspath where the script and it's files should be. I can leave them empty, and ask for them, or create directories.

Should i leave those strings empty, and if their empty ask for input( or just tell the user to edit them)? or should it create directories? (it should create directories, a more generalized locations is probably better. any suggestions?)

jayvdb commented 7 years ago

Well README.md and the script will be in the repo, so they will share the same base directory, which you can derive from $0. The files directory can be also in the same base path, with that subdirectory added to .gitignore so it isnt committed.

yehoshuapw commented 7 years ago

should I squash this?

imsky commented 7 years ago

yes please squash this

yehoshuapw commented 7 years ago

rebased again (onto), instead of just merging, since also added a newline to the end of the file, making the diff both ways, and so conflicting.

Also, as a general rule, should I merge (creating more commits) or rebase?

ghost commented 7 years ago

Can / Should we merge this? @imsky @jayvdb

imsky commented 7 years ago

let's do it @georgenetu