Comments (6)
The next version will have two additional filters that will help here:
sha1sum
- Takes the retrieved content and returns the sha1sum as hexdigesthexdump
- Takes the retrieve content and returns a hexdump-like representation
The hexdump output doesn't include file offsets, as otherwise the diffs will be quite large.
from urlwatch.
You can do this for local files by just piping it into sha1sum
or a similar tool or even hexdump
if you want to see which bytes change. For things like PDF you can also pipe it through a tool that converts the PDF to text, so you can even see text changes.
from urlwatch.
Is there a way for remote files, too? This would my use case.
from urlwatch.
This is probably a bad idea for a number of reasons, but perhaps something like the following would work for your particular use case?
curl -Is URL | awk '$1 ~ /Last-Modified:/ {sub(".*: ", ""); print}'
from urlwatch.
@thp Thanks, sha1sum solves my usecase perfectly.
from urlwatch.
Note that this will still download the file every time fully when watched. A more efficient solution would be to only do a HEAD request and then use either ETag or Last-Modified as suggested by @brbsix, but we do not have that feature (getting HTTP headers) yet. We do already support specifying the HTTP method, so maybe if it's HEAD, the content should be the raw headers, since the body will always be empty, anyway.
from urlwatch.
Related Issues (20)
- add support to specify multiple recipients per URL HOT 7
- YAML Anchors/Aliases not working HOT 4
- CSS Filter "AttributeError: 'CSSSelector' object has no attribute 'evaluate'" HOT 2
- FEATURE: Support multiple reporters with different options HOT 6
- Meaning of max_tries is confusing
- urlwatch stopped working HOT 4
- sendmail is not documented HOT 2
- Randomly "not enough values to unpack" Python errors HOT 4
- Cache inconsistency creating new items from nowhere HOT 3
- Feature request: Extension of regex filtering to extract data HOT 7
- Consider releasing version 2.29 HOT 5
- Question - Report http errors only once HOT 5
- urlwatch 2.25-1 on Debian Stable 12.5 (navigate fails) HOT 3
- Enable/disable job from the command line HOT 1
- urlwatch moans when supplying --config HOT 1
- urlwatch 2.25 - AttributeError: 'list' object has no attribute 'read' HOT 2
- XML parsing with CDATA not working HOT 6
- urlwatch 2.28: html: separate: true not sending separate emails HOT 2
- --test-filter works but not with a normal execution HOT 4
- Cannot check IEEE Xplore page
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 urlwatch.