Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for new website and add date to file names #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jbkt
Copy link

@jbkt jbkt commented Sep 15, 2016

No description provided.

@balasankarc
Copy link
Owner

@jbkt Thanks for the pull request. I had no idea someone else was using this. :)

There are a few issues/doubts I have regarding this. The following is the output I got when I tried to run the code after applying your PR

python commitstrip.py -v -ps 1 -pe 5 en .
Page #1     : http://www.commitstrip.com/wp-content/uploads/2016/09/Strip-Apprendre-a-etre-dev-650-finalenglish.jpg
Page #1     : http://www.commitstrip.com/wp-content/uploads/2016/09/Strip-Strip-Parachute-de-secours-inexistant-650-finalenglish.jpg
Page #1     : http://www.commitstrip.com/wp-content/uploads/2016/09/Strip-Le-stagiaire-et-la-variable-english650-final.jpg
Page #1     : http://www.commitstrip.com/wp-content/uploads/2016/08/Strip-Lenfance-du-codeur-Le-mode-sans-echec-english650-final.jpg
Page #1     : http://www.commitstrip.com/wp-content/uploads/2016/08/Strip-Les-specs-cest-du-code-650-finalenglish.jpg
Page #1     : http://www.commitstrip.com/wp-content/uploads/2016/08/Strip-Les-discussions-genantes-650-finalenglish.jpg
Page #1     : http://www.commitstrip.com/wp-content/uploads/2016/08/Strip-La-regression-interdite-english6502-final.jpg
Page #1     : http://www.commitstrip.com/wp-content/uploads/2016/08/Strip-Messages-dabsence-650-finalenglish.jpg
Page #3     : http://www.commitstrip.com/wp-content/uploads/2016/05/Strip-Former-ou-ne-pas-former-english650-final-1.jpg
Page #3     : http://www.commitstrip.com/wp-content/uploads/2016/05/Strip-Lenfant-et-la-tablette-english650-final-1.jpg
Page #3     : http://www.commitstrip.com/wp-content/uploads/2016/05/Strip-Detruire-les-serveurs-english650-final.jpg
Page #3     : http://www.commitstrip.com/wp-content/uploads/2016/05/Strip-Le-screensaver-650-finalenglish-2.gif
Page #3     : http://www.commitstrip.com/wp-content/uploads/2016/05/Strip-EclipseCon-650-finalenglish.jpg
Page #3     : http://www.commitstrip.com/wp-content/uploads/2016/05/Strip-Oracle-v-Google-650-finalenglish-4.jpg
Page #3     : http://www.commitstrip.com/wp-content/uploads/2016/05/Strip-Le-dilemme-de-lupgrade-650-finalenglish-2.jpg
Page #3     : http://www.commitstrip.com/wp-content/uploads/2016/05/Strip-Taboola-et-Outbrain-650-finalenglish-2.jpg
Page #3     : http://www.commitstrip.com/wp-content/uploads/2016/05/Strip-Le-sourcier-650-finalenglish.jpg
Page #3     : http://www.commitstrip.com/wp-content/uploads/2016/05/Strip-Qui-de-la-poule-ou-de-loeuf-650-finalenglish.jpg
Page #3     : http://www.commitstrip.com/wp-content/uploads/2016/05/Strip-Pepperidge-farm-650-finalenglish.jpg
Page #3     : http://www.commitstrip.com/wp-content/uploads/2016/05/Strip-Quand-les-PM-se-mettent-au-code-650-finalenglish-1.jpg
Page #3     : http://www.commitstrip.com/wp-content/uploads/2016/05/Strip-Le-fullstack-JS-2-650-finalenglish-2.jpg
Page #3     : http://www.commitstrip.com/wp-content/uploads/2016/05/Strip-The-4-th-of-may-650-finalenglsih-1.jpg
Page #4     : http://www.commitstrip.com/wp-content/uploads/2016/04/Strip-Client-qui-paye-10-fois-englishfinal.jpg
Page #4     : http://www.commitstrip.com/wp-content/uploads/2016/04/Strip-Brutal-2-650-finalenglish.jpg
Page #4     : http://www.commitstrip.com/wp-content/uploads/2016/04/Strip-Test-Turing-inverse-650-finalenglish.jpg
Page #4     : http://www.commitstrip.com/wp-content/uploads/2016/04/Strip-Bien-fixer-ou-bien-bien-fixer-650-finalenglish.jpg
Page #4     : http://www.commitstrip.com/wp-content/uploads/2016/04/Strip-Facebook-live-650-finalenglish.jpg
Page #4     : http://www.commitstrip.com/wp-content/uploads/2016/04/Strip-Notice-a-vie-650-finalenglish-1.jpg
Page #5     : http://www.commitstrip.com/wp-content/uploads/2016/03/Strip-ASAP-650-final-english-2.jpg
Page #5     : http://www.commitstrip.com/wp-content/uploads/2016/03/Strip-Les-enfants-sont-nuls-650-finalenglish.jpg
Page #5     : http://www.commitstrip.com/wp-content/uploads/2016/03/Strip-Pas-si-évident-650-finalenglish-1.jpg
Page #5     : http://www.commitstrip.com/wp-content/uploads/2016/03/Strip-Un-ehistoire-dattente-650-finalenglish.jpg
Page #5     : http://www.commitstrip.com/wp-content/uploads/2016/03/Strip-Larroseur-arrosé-650-finalenglish-1.jpg
Page #5     : http://www.commitstrip.com/wp-content/uploads/2016/03/Strip-Test-Webcam-650-finalenglish.jpg
Page #5     : http://www.commitstrip.com/wp-content/uploads/2016/03/Strip-Reflexion-de-codeur-4-650-finalenglish.jpg
Page #5     : http://www.commitstrip.com/wp-content/uploads/2016/02/Strip-Le-Freelance-a-la-maison-650-finalenglish.jpg
Page #5     : http://www.commitstrip.com/wp-content/uploads/2016/02/Strip-La-vision-du-recruteur-650-finalenglish-1.jpg
Page #5     : http://www.commitstrip.com/wp-content/uploads/2016/02/Strip-Log-nonstandard-650-fianlenglish-1.jpg
Page #5     : http://www.commitstrip.com/wp-content/uploads/2016/02/Strip-Linternet-des-objets-650-finalenglish.jpg
Page #5     : http://www.commitstrip.com/wp-content/uploads/2016/02/Strip-Trop-dinfo-650-finalenglish-1.jpg
Page #5     : http://www.commitstrip.com/wp-content/uploads/2016/02/Strip-Du-rouge-au-vert-650-finalenglish.jpg
.
.
.
[It continues]

As you can see, how we consider "page" is incorrect. When I developed the script initially, there was no index page and the base url showed the latest strip (and each following page showed one strip each. So, "page" meant "strip" then). So, pages between 1 and 5 meant, I got the latest 5 strips. However, that is not happening here.

Please update the code so as to get only n number of strips (where n = pageEnd - pageStart).

@jbkt
Copy link
Author

jbkt commented Sep 15, 2016

That is why I added another loop on "strips", running the command:
$ ./commitstrip.py fr ~/Documents/CommitStrip

I get:
2012-02-24-interview-almost.jpg 2014-04-22-stay-lean.jpg 2012-02-27-interview-let-there-be-light.jpg 2014-04-23-first-world-antivirus-problem.jpg 2012-03-01-artistic-meeting.jpg 2014-04-24-when-i-have-to-work-with-legacy-systems.jpg 2012-03-02-hiii-you.jpg 2014-04-25-inbox-312.jpg 2012-03-05-new-computer.jpg 2014-04-28-coders-childhood-copying-an-audio-cd.jpg 2012-03-06-pre-commit-hook-irl.jpg 2014-06-02-ce-quil-faut-maitriser-quand-on-travaille-dans-un-open-space.jpg 2012-03-07-in-the-basement.jpg 2014-06-03-the-problem-is-not-the-tool-itself.jpg 2012-03-08-hungry.jpg 2014-06-05-the-applications-that-completely-drain-your-phones-battery.jpg 2012-03-09-friday-night.jpg 2014-06-06-coders-duty-to-remember.jpg 2012-03-13-requiescat-in-pace.jpg 2014-06-09-two-faced-coder.jpg 2012-03-14-whatever-it-takes.jpg 2014-06-10-you-shall-be-a-coder-son.jpg 2012-03-15-auto-fail.jpg 2014-06-12-2014-world-cup-what-about-the-favelas.jpg 2012-03-16-doctor-will-i-live.jpg 2014-06-13-being-cool-youre-doing-it-wrong.jpg 2012-03-19-rasmus-something.jpg 2014-06-16-the-day-has-come-commitstrip-finally-has-its-very-own-online-shop.jpg 2012-03-20-oh-by-the-way.jpg 2014-06-17-unicode-7-et-ses-nouveaux-emoji.jpg 2012-03-21-look-whos-talking.jpg 2014-06-18-think-out-of-the-framework.jpg 2012-03-22-bargaining-for-dummies.jpg 2014-06-19-pourquoi-vous-devriez-vous-remettre-a-coder-la-tout-de-suite.jpg 2012-03-23-do-you-want-firefox-to-remember-this-password.jpg 2014-06-20-top-c0d3r.jpg 2012-03-26-coders-day-out.jpg 2014-06-23-clash-of-cultures.jpg 2012-03-27-speed-training.jpg 2014-06-24-happy-birthday-curiosity.jpg 2012-03-28-teamwork.jpg 2014-06-25-people-you-come-across-in-it-schools.jpg 2012-05-07-nicolas-sarkozy-is-leaving-hadopi-too.jpg 2014-06-27-the-infamous-3rd-lead.jpg 2012-05-09-le-changement-cest-maintenant-ou-comment-mettre-toutes-les-chances-de-son-cote.jpg 2014-06-30-lenfance-du-codeur-la-boule.jpg 2012-05-10-histoire-vraie-2.jpg 2014-07-02-what-they-dont-tell-us-about-smartwatches.jpg 2012-05-11-jte-jure-cest-vrai.jpg 2014-07-03-then-all-of-a-sudden-everything-fails.jpg 2012-05-14-faites-marcher-les-petits-boutiques-quils-disaient.jpg 2014-07-07-if-super-mario-world-had-been-released-on-an-app-store.jpg 2012-05-15-lheure-du-rd.jpg 2014-07-09-the-iphone-6s-incredible-sapphire-glass-display.jpg 2012-05-16-comment-ne-pas-perdre-le-focus.jpg 2014-07-10-when-you-meet-a-fellow-coder.jpg 2012-05-18-la-revolution-mobile-vue-par-les-developeurs-css.jpg 2014-07-11-you-cant-judge-a-book-by-its-cover.jpg 2012-05-22-ca-va-sarranger.jpg 2014-07-15-top-6-worst-bugs-ever.jpg 2012-05-23-comment-leap-motion-va-revolutionner-nos-interactions-avec-nos-ordinateurs.jpg 2014-07-16-and-they-started-to-learn-code-at-primary-school.jpg 2012-05-25-lundi-jme-mets-au-sport.jpg ...

@balasankarc
Copy link
Owner

@jbkt
What I meant was, when I specify pageStart as 1 and pageEnd as 5, I should get only latest 5 strips. Not this huge list.

@balasankarc
Copy link
Owner

@jbkt Any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants