0bin
0bin copied to clipboard
Feature/delete expired
This adds a purge option to zerobin (https://github.com/sametmax/0bin/issues/48) by adding two class method to the Paste class (see paste.py#L296 and paste.py#L315)
I add to move some logic from the route to the Paste class (see paste.py#L268)
I also added a is_burn_notice property (only for aestheticism)
With this patch, zerobin can be called this way:
zerobin --purge
It could also be done in a route like /purge if needed.
(and it seems that I haven't broken anything :) )
Ok, I'll look it up tomorrow.
Le lun. 07 juil. 2014 02:05:47 CEST, jcsaaddupuy a écrit :
This adds a purge option to zerobin (#48 https://github.com/sametmax/0bin/issues/48) by adding two class method to the Paste class (see paste.py#L296 https://github.com/jcsaaddupuy/0bin/blob/feature/delete_expired/zerobin/paste.py#L296 and paste.py#L315 https://github.com/jcsaaddupuy/0bin/blob/feature/delete_expired/zerobin/paste.py#L315)
I add to move some logic from the route to the Paste class (see paste.py#L268 https://github.com/jcsaaddupuy/0bin/blob/feature/delete_expired/zerobin/paste.py#L268)
I also added a is_burn_notice property (only for aestheticism)
With this patch, zerobin can be called this way:
zerobin --purge
It could also be done in a route like /purge if needed.
(and it seems that I haven't broken anything :) )
You can merge this Pull Request by running
git pull https://github.com/jcsaaddupuy/0bin feature/delete_expired
Or view, comment on, or merge it at:
https://github.com/sametmax/0bin/pull/69
Commit Summary
feat(delete_expired): adds an option to delete expired pastes
fix: remove useless line
feat(paste): add is_burn_notice property
fix(burn_after_reading): fixes burn after reading deletion
File Changes
M zerobin/paste.py https://github.com/sametmax/0bin/pull/69/files#diff-0 (67)
M zerobin/routes.py https://github.com/sametmax/0bin/pull/69/files#diff-1 (27)
M zerobin/views/paste.tpl https://github.com/sametmax/0bin/pull/69/files#diff-2 (2)
Patch Links:
https://github.com/sametmax/0bin/pull/69.patch
https://github.com/sametmax/0bin/pull/69.diff
— Reply to this email directly or view it on GitHub https://github.com/sametmax/0bin/pull/69.
Ok, It's a very clean PR, thank you !
I'll make minor adjustments and merge it as soon as I can. Probably in the next 3 days (sorry I'm a bit swamped :)).
Le 07/07/2014 02:05, jcsaaddupuy a écrit :
This adds a purge option to zerobin (#48 https://github.com/sametmax/0bin/issues/48) by adding two class method to the Paste class (see paste.py#L296 https://github.com/jcsaaddupuy/0bin/blob/feature/delete_expired/zerobin/paste.py#L296 and paste.py#L315 https://github.com/jcsaaddupuy/0bin/blob/feature/delete_expired/zerobin/paste.py#L315)
I add to move some logic from the route to the Paste class (see paste.py#L268 https://github.com/jcsaaddupuy/0bin/blob/feature/delete_expired/zerobin/paste.py#L268)
I also added a is_burn_notice property (only for aestheticism)
With this patch, zerobin can be called this way:
zerobin --purge
It could also be done in a route like /purge if needed.
(and it seems that I haven't broken anything :) )
You can merge this Pull Request by running
git pull https://github.com/jcsaaddupuy/0bin feature/delete_expired
Or view, comment on, or merge it at:
https://github.com/sametmax/0bin/pull/69
Commit Summary
feat(delete_expired): adds an option to delete expired pastes
fix: remove useless line
feat(paste): add is_burn_notice property
fix(burn_after_reading): fixes burn after reading deletion
File Changes
M zerobin/paste.py https://github.com/sametmax/0bin/pull/69/files#diff-0 (67)
M zerobin/routes.py https://github.com/sametmax/0bin/pull/69/files#diff-1 (27)
M zerobin/views/paste.tpl https://github.com/sametmax/0bin/pull/69/files#diff-2 (2)
Patch Links:
https://github.com/sametmax/0bin/pull/69.patch
https://github.com/sametmax/0bin/pull/69.diff
— Reply to this email directly or view it on GitHub https://github.com/sametmax/0bin/pull/69.
Hi!
I just fixed a bug on my own code - non burn after reading paste where never deleted :( (https://github.com/jcsaaddupuy/0bin/commit/1c6b923f19c37b8e732ef5abc576412a34fe265a) I also changed method parameters names for classmethods (cls vs self) (https://github.com/jcsaaddupuy/0bin/commit/4de492fb8401990519375853f206d9115d6f853b) The purge method is now deleting empty directories (https://github.com/jcsaaddupuy/0bin/commit/9e5c4ea2b15b3b1e9d06f489dd06f86a7f4f4b92)
Noted. Still waiting for some time to merge that. I haven't forget.
Le lun. 14 juil. 2014 17:25:43 CEST, jcsaaddupuy a écrit :
Hi!
I just fixed a bug on my own code - non burn after reading paste where never deleted :( (jcsaaddupuy@1c6b923 https://github.com/jcsaaddupuy/0bin/commit/1c6b923f19c37b8e732ef5abc576412a34fe265a) I also changed method parameters names for classmethods (/cls/ vs /self/) (jcsaaddupuy@4de492f https://github.com/jcsaaddupuy/0bin/commit/4de492fb8401990519375853f206d9115d6f853b) The purge method is now deleting empty directories (jcsaaddupuy@9e5c4ea https://github.com/jcsaaddupuy/0bin/commit/9e5c4ea2b15b3b1e9d06f489dd06f86a7f4f4b92)
— Reply to this email directly or view it on GitHub https://github.com/sametmax/0bin/pull/69#issuecomment-48913965.
Is this PR dead? Was this functionality implemented in another PR in the meantime? If no, did the code diverge so much that this PR is too hard to merge today?
Same questions as @zertrin (but almost one year later :wink: )