Skip to content

Commit

Permalink
Docs: Extend section about importing from Telegram
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-si committed Jan 4, 2023
1 parent 0fc5adc commit a69b372
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 17 deletions.
20 changes: 18 additions & 2 deletions docs-source/faqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ can transfer it to the community.
Not locking you in is one of the most important aspects of TaskLite.
Therefore it supports numerous export formats:

- JSON - All tasks as one JSON array
- [NDJSON](http://ndjson.org/) - One JSON object per task
- CSV
- SQL
Expand All @@ -159,13 +160,13 @@ For more information check out the
<summary><small>Answer:</small></summary>

All your data is stored in **your** TaskLite database on **your** computer.
No analytics data or data of any other kind gets transfered to a third party
No analytics data or data of any other kind gets transferred to a third party
during the usage of TaskLite.

</details>


## How do you share / sell my data?
## Do you share or sell my data?

<details>
<summary><small>Answer:</small></summary>
Expand All @@ -174,4 +175,19 @@ We do not have access to any of your data!

</details>


## How do I keep up with any changes related to TaskLite?

<details>
<summary><small>Answer:</small></summary>

There are several ways to stay up to date:

- Visit the [official changelog](/changelog)
- Join our subreddit at [/r/TaskLite](https://www.reddit.com/r/TaskLite/)
- Follow the
[releases page on GitHub](https://github.com/ad-si/TaskLite/releases)

</details>

</div>
40 changes: 38 additions & 2 deletions docs-source/import.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,46 @@ Telegram's "Saved Messages" -- a.k.a. messages to oneself -- are a pretty
convenient inbox. Here is how to move them to TaskLite afterwards:

1. Install [Telegram Desktop](https://desktop.telegram.org/)
`brew install telegram-desktop`
1. Go to "Saved Messages"
1. Click on 3 dots in the upper right corner
1. Click on "Export Chat History"
1. Deselect all additional media and select "JSON" as output format
1. Approve download on a mobile device
1. Download the JSON file and clean it up
1. Import data as described in the section for YAML files
1. Download the JSON file
(if download window was closed, simply follow the previous steps again)
1. Import JSON directly:
```bash
cat result.json \
| jq -c '
.messages
| map(
(if (.text | type) == "string"
then .text
else (.text
| map(
if (. | type) == "string"
then .
else .text end
)
| join(", ")
)
end) as $body
| {
utc: .date,
body: $body,
tags: ["telegram"]
}
)
| .[]
'
| while read -r task
do
echo "$task" | tasklite importjson
done
```
or convert it to YAML for easier cleanup:
```sh
jq '.messages' result.json | yq --yaml-output > out.yaml
```
1. Clear chat history on Telegram
5 changes: 5 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.PHONY: help
help: makefile
@tail -n +4 makefile | grep ".PHONY"


# Build the documentation
docs: book.toml docs-source
mdbook build
Expand Down
13 changes: 0 additions & 13 deletions tasklite-api/datasette/metadata.json

This file was deleted.

0 comments on commit a69b372

Please sign in to comment.