Opened 16 years ago
Closed 16 years ago
#1848 closed enhancement (fixed)
[new PATCH] Version in MOTD
Reported by: | anonymous | Owned by: | xeen |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | unspecified | Version: | |
Keywords: | MOTD Message of the Day | Cc: |
Description
Can MOTD be modified to include latest stable and experimental release, that would be a good aid into knowing when to download a new update of JOSM.
Attachments (3)
Change History (13)
by , 16 years ago
Attachment: | Getting Started.patch added |
---|
comment:1 by , 16 years ago
Keywords: | Message of the Day added |
---|---|
Summary: | Version in MOTD → [PATCH] Version in MOTD |
- Displays installed and current latest version in lower right corner.
- Saves MOTD to disk and caches it for 24 hours or until JOSM's version number changes
- fixes "disable motd" logic, it didn't work before
- added documentation
- MOTD variables are now their own group:
- motd.display – Display MOTD (boolean, default: true)
- motd.lastversion – JOSM's version number when the MOTD was updated (integer, default: 0). Will be set automatically.
- motd.lastupdate – The time the MOTD was last updated (in milliseconds). (long, default: 0). Will be set automatically.
- motd.updateinterval – The amount of time a cached copy is valid (if the version number stays the same) (in milliseconds). (integer, default: 24*60*60*1000 = 24 hours). Setting this to 0 essentially disables caching, the MOTD file is still written to the disk though.
comment:2 by , 16 years ago
Some notes:
- latest does not need "?format=txt".
- Using latest is not nice, tested is better. It should be clear that latest is a developer version.
- We already have a buffering class. Please use it instead of new routines.
comment:3 by , 16 years ago
Whups, that should've been tested, no idea why I chose latest in the first place. I used "?format=txt" to force WikiReader to do a normal read instead of trying to parse the wiki. I could pass a wrong base url, but that'd require a new WikiReader. So I opted for "?format".
Buffering classes: I thought so, too, when originally writing the patch, but a search didn't turn up any useful results and I don't know where to look. Can you give me a hand?
comment:4 by , 16 years ago
Owner: | changed from | to
---|
See "org.openstreetmap.josm.io.MirroredInputStream". Probably displaying "latest" as well is not wrong, but the main focus should be on tested.
comment:5 by , 16 years ago
Hm, MirroredInputStream doesn't allow to write custom content – using it would require going down to the bare minimum and only cache HTTP gets. In our case this leaves about 8 html cache files and all the executor, parsing and stitching overhead.
comment:6 by , 16 years ago
So what about writing another caching class which e.g. can be used by other parts as well (e.g. the wms stuff)? I really don't like to have dozens of implementations of equal functionality.
comment:7 by , 16 years ago
Added http://josm.openstreetmap.de/version which contains both versions.
by , 16 years ago
Attachment: | Cache Getting Started with Extra Class.patch added |
---|
comment:8 by , 16 years ago
Summary: | [PATCH] Version in MOTD → [new PATCH] Version in MOTD |
---|
by , 16 years ago
Attachment: | Cache Getting Started with Extra Class.2.patch added |
---|
Daily Interval was wrong
comment:9 by , 16 years ago
I plan to replace WMS Cache with this class at a later time, still looking how to insert it meaningfully into the plugin. Due to WMS structure it cannot simply replace WMS' current Cache class.