Comments (9)
Sounds like a good idea, I am actually using this format everywhere but here (for whatever reason). A PR would be very welcome!
from watermark.
So one totally quick hack is to replace your existing default strftime
with an ISO-8601 alternative:
if not any(vars(args).values()):
self.out += strftime("%Y-%m-%dT%H:%M:%S")
#self.out += strftime('%m/%d/%Y %H:%M:%S')
and then by way of a very quick test I get:
$ python -c "import watermark; watermark.WaterMark().watermark('')"
2016-01-29T17:52:54
CPython 3.4.4
IPython 4.0.1
compiler : GCC 4.4.7 20120313 (Red Hat 4.4.7-1)
system : Linux
release : 3.16.0-38-generic
machine : x86_64
processor : x86_64
CPU cores : 8
interpreter: 64bit
from watermark.
Looks good to me. Personally, I don't like the "T" in "2016-01-29T17:52:54", but hey, let's just go with the standard here ;).
I think we could also remove
@argument('-e', '--eurodate', action='store_true', help='prints current date as DD/MM/YYYY')
then and update
@argument('-d', '--date', action='store_true', help='prints current date as MM/DD/YYYY')
Are you planning to prepare a pull request?
from watermark.
I'll avoid a PR if that's OK, the change is pretty minor. I hope that's OK?
I.
On 29 Jan 2016 18:08, "Sebastian Raschka" [email protected] wrote:
Looks good to me. Personally, I don't like the "T" in
"2016-01-29T17:52:54", but hey, let's just go with the standard here ;).I think we could also remove
@argument('-e', '--eurodate', action='store_true', help='prints current date as DD/MM/YYYY')
then and update
@argument('-d', '--date', action='store_true', help='prints current date as MM/DD/YYYY')
Are you planning to prepare a pull request?
—
Reply to this email directly or view it on GitHub
#9 (comment).
from watermark.
Sure, that's absolutely fine! I'll take a look at it :).
from watermark.
I just pushed the update. Thanks again for the suggestion!
from watermark.
Glad it was a useful question :-)
from watermark.
Just to note - I've added a link to my data science notes, cheers! https://github.com/ianozsvald/data_science_delivered
from watermark.
Thanks, Ian. That's a pretty cool outline; it transfers nicely into a project planning todo-checklist ;)
from watermark.
Related Issues (20)
- v1.7 tag missing HOT 1
- Supporting nested library imports via `-iv`
- version unknown HOT 4
- --iversions returns an error if no package has been imported HOT 1
- Timezone name has no trailing space HOT 2
- Python 3.8's new metadata package
- support -iv edge cases? HOT 1
- cli version HOT 5
- Python 2.7 and 3.5 EOL HOT 1
- Adopt NEP 29?
- setup.py fails unless all install_requires are already installed HOT 1
- Missing space before timezone HOT 5
- Watermark fails to recognize all project used libraries HOT 1
- `-d` doesn't print date, only when combined with `-u` HOT 1
- Watermark fails to identify (some) packages when imported as 'from X import Y' HOT 13
- Error UsageError on author argument HOT 1
- Is it possible to blur background? HOT 1
- Remove Travis CI config and replace build status badge with AppVeyor? HOT 2
- New feature to check for latest packages
- Include information about how Python was installed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from watermark.