4
42
Fork
You've already forked threadcat
0

Suggestion: Save thread data to a folder (as an option) #7

Open
opened 2026年05月22日 12:47:30 +02:00 by derheap · 2 comments

Right now all files are saved in the current directory.

It would be nice to have an option to save the data in a new folder:

mastodon.social:@urlyman:116385624740724662/
├── 306277846b8f6e51.png
├── 308489a9c3b28ba0.png
├── 45876d98d9f3a6ca.png
├── 9556ac36cda4d34d.png
├── b1def495890452f5.png
└── index.md

If the folder is named after the thread it would be even nicer.
(The : instead of / are Macos specific and not optimal.)

Even better if this option could be configured via the .envrc file.

Right now all files are saved in the current directory. It would be nice to have an option to save the data in a new folder: ``` mastodon.social:@urlyman:116385624740724662/ ├── 306277846b8f6e51.png ├── 308489a9c3b28ba0.png ├── 45876d98d9f3a6ca.png ├── 9556ac36cda4d34d.png ├── b1def495890452f5.png └── index.md ``` If the folder is named after the thread it would be even nicer. (The : instead of / are Macos specific and not optimal.) Even better if this option could be configured via the .envrc file.

I'd like to learn more about your use case for this – is it quickly "archiving" multiple threads?

My feeling is that multiple people might have different preferences for where the files should go. Maybe for now, would it be an option to script this yourself? threadcat has a -o option, so you could use this wrapper script to do what you want:

#!/usr/bin/env bash

set -eu -o pipefail
# Replace each '/' with ':'.
DIR=${1//\//:}
# Cut off "https://".
DIR=${DIR:8}
mkdir -p "$DIR"
threadcat "1ドル" -o "$DIR/index.md"
I'd like to learn more about your use case for this – is it quickly "archiving" multiple threads? My feeling is that multiple people might have different preferences for where the files should go. Maybe for now, would it be an option to script this yourself? threadcat has a `-o` option, so you could use this wrapper script to do what you want: ```bash #!/usr/bin/env bash set -eu -o pipefail # Replace each '/' with ':'. DIR=${1//\//:} # Cut off "https://". DIR=${DIR:8} mkdir -p "$DIR" threadcat "1ドル" -o "$DIR/index.md" ```
Author
Copy link

The use case is more a basic need – not to accidently clutter the directory I am in.
Especcially if I save more than a thread in a row.

Thanks for the wrapper script. This will do it for now.

I had looked at the command line options. But I did not realise that I could a directory to -o.
I thought it would just change the name of the markdown file.

The use case is more a basic need – not to accidently clutter the directory I am in. Especcially if I save more than a thread in a row. Thanks for the wrapper script. This will do it for now. I had looked at the command line options. But I did not realise that I could a directory to `-o`. I thought it would just change the name of the markdown file.
Sign in to join this conversation.
No Branch/Tag specified
main
v0.1.2
v0.1.1
v0.1.0
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
blinry/threadcat#7
Reference in a new issue
blinry/threadcat
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?