Comments (6)
Maybe? π
Actually, if you're comfortable with the command line, you could get the URLs of the url
and the preview_url
attributes of all the media in mentions (I think! Lightly testedβ¦) by using this jq command:
jq '.mentions[].media_attachments[]|.url,.preview_url' octodon.social.user.kensanata.json
With a little sed
you can extract all the path's you need:
jq '.mentions[].media_attachments[]|.url,.preview_url' octodon.social.user.kensanata.json \
| sed -n -e 's/[^\/]*\/\/[^\/]*\/\([^"]*\)"$/\1/p'
So perhaps this is enough to wrap around a loop to rm
? Something like the following, untested?
rm $(jq '.mentions[].media_attachments[]|.url,.preview_url' octodon.social.user.kensanata.json \
| sed -n -e 's/[^\/]*\/\/[^\/]*\/\([^"]*\)"$/\1/p')
from mastodon-archive.
I'd say such a feature would have to be added to the file media.py
, in other words, some option for the media
command.
from mastodon-archive.
Not with the tool itself, unfortunately.
from mastodon-archive.
Ok, so as well as #40 that's something I should try to add, I guess ? :)
from mastodon-archive.
Well, it's not that I don't want to do it, but I don't have the time right know but those media files takes some storage space π
So thanks a lot for your command, I'll investigate.
And maybe add some PRΒ :)
(the best would be not to download them, with an option)
from mastodon-archive.
Yeah, to be honest I never download media...
from mastodon-archive.
Related Issues (20)
- No main.py created in windows?? HOT 7
- Install "the Debian way" HOT 8
- getting mastodon-backup packaged (for Linux) HOT 19
- Generate tarball compatible to Mastodon's export HOT 5
- Specifying bookmarks or statuses with text search resets other specified collections HOT 2
- Feature: Backup / Export Filters HOT 8
- incremental runs of 'mastodon-archive' giving 404s on deleted mentions/replies on STDERR HOT 7
- Compress JSON HOT 8
- Consider making --with-followers and --with-following on by default? HOT 3
- Improve followers feature : consider more interactions HOT 4
- Report fails if no bookmark in archive (old archive) HOT 4
- Version check fails on Pleroma instance HOT 4
- HTML export to use cropped, centered images HOT 4
- HTML Export posts videos with a <img> tag HOT 6
- HTML Export pages should lazy load videos and images to be usable as static sites HOT 14
- Add pagination numbers in html exports
- TypeError: 'NoneType' object is not subscriptable HOT 8
- Backup other account's public posts HOT 1
- Don't burst the API rate limiting HOT 1
- Archiving context HOT 3
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 mastodon-archive.