Commit graph

57 commits

Author SHA1 Message Date
Danilo Bargen
7941fbc727 Bump copyright year 2018-02-11 00:58:53 +01:00
anderejd
6fdf14df63 Move to Serde and upgrade all dependencies (#35)
- Do cargo upgrade --all
- Resolve build errors by moving from rustc-serialize to serde
2017-12-23 01:59:42 +01:00
Danilo Bargen
324b6939bd Add back support for old format
Implement version detection for reverse compatibility.
2016-11-20 23:11:34 +01:00
Danilo Bargen
27b8e7f363 Detect and store format version 2016-11-20 22:38:01 +01:00
Danilo Bargen
dfcb8e4857 Support new title format 2016-11-20 22:35:29 +01:00
Danilo Bargen
00512fdc7b Mostly port to new format
Titles are not handled properly yet.

See discussion at https://github.com/tldr-pages/tldr/pull/958
2016-11-12 13:34:15 +01:00
Danilo Bargen
9e868cb728 Upgrade curl to 0.3 2016-08-01 12:20:41 +02:00
Severen Redwood
aab4220029 Rename everything named tldr to tealdeer (#30) 2016-04-19 10:15:24 +02:00
Severen Redwood
26b8f519c4 Use rust-xdg for cache creation (#29)
* Add rust-xdg as a dependency
* Use rust-xdg to create the cache directory

Closes #10.
2016-04-18 18:40:28 +02:00
Danilo Bargen
6398f6594f Rename project (#26)
* Change name to "tealdeer"
* Rename repository as well
* Add logo
2016-04-16 10:20:16 +02:00
Danilo Bargen
f68df11b99 Fix creation of cache dir
Resolves #22.
2016-04-04 00:21:49 +02:00
Danilo Bargen
a6b6ce5781 Allow overriding of cache dir
By setting TLDR_RS_CACHE_DIR the cache dir can be overridden. This is
very useful for example during testing.
2016-04-03 01:36:39 +02:00
Danilo Bargen
30af8ca90f Moved test from main.rs to types.rs 2016-04-03 01:36:39 +02:00
Danilo Bargen
8e643b7987 Fix code formatting and update .gitignore 2016-04-03 00:25:06 +02:00
Danilo Bargen
ccaf9c9f27 Fix cache updating
For some reason, the cache was not actually being updated because the
`Archive.unpack()` method doesn't overwrite any files.

So now we clear the cache directory before unpacking the archive.

Fixes #18.
2016-04-03 00:06:36 +02:00
Danilo Bargen
fb62eaaaad Fix detection of outdated cache 2016-02-07 23:10:28 +01:00
Danilo Bargen
db5fab2d87 Handle errors in Tokenizer::next_token 2016-01-27 18:06:38 +01:00
Danilo Bargen
ecf77b5297 Fix some problems reported by clippy 2016-01-27 17:49:19 +01:00
Danilo Bargen
e00fe75d37 Add clippy 2016-01-27 17:49:19 +01:00
Danilo Bargen
dcd80a92b2 Enable more compiler lints 2016-01-27 17:48:43 +01:00
Danilo Bargen
d47208f273 License under MIT/Apache-2.0 2016-01-27 17:48:43 +01:00
Danilo Bargen
6e4fc487a9 Implement --list flag 2016-01-27 17:39:17 +01:00
Danilo Bargen
ea7965a775 Derive Copy for OsType 2016-01-27 13:56:29 +01:00
Danilo Bargen
4c5666884b Simplify logic in Cache::find_page 2016-01-27 13:55:52 +01:00
Danilo Bargen
0d871091d3 Create Cache::get_platform_dir 2016-01-27 13:55:17 +01:00
Danilo Bargen
152343eaef Underline parameters in example code 2016-01-26 10:22:03 +01:00
Danilo Bargen
1e69f4ac4e Make it possible to override the OS 2016-01-22 08:29:27 +01:00
Danilo Bargen
eac7308ba7 Fix argument format 2016-01-22 08:29:14 +01:00
Danilo Bargen
a07f7e00dc Implement Decodable for OsType 2016-01-22 08:29:10 +01:00
Danilo Bargen
34fa7d94b4 Create OsType enum 2016-01-19 18:49:16 +01:00
Danilo Bargen
55bbd78360 Implement --clear-cache flag 2016-01-10 22:39:11 +01:00
Danilo Bargen
4a59dc6798 Render pages from cache 2016-01-10 00:33:51 +01:00
Danilo Bargen
4e951a0247 Rename Updater to Cache 2016-01-08 19:19:03 +01:00
Danilo Bargen
75d5fd5257 Revert accidental breakage of archive URL
Localhost URL was used for development in the train with a flaky
internet connection.
2016-01-08 19:18:44 +01:00
Danilo Bargen
b2ea2c3842 Warn if cache is too old or missing 2016-01-08 18:55:40 +01:00
Danilo Bargen
4db20cb6bb Implement Updater.last_update 2016-01-08 08:40:34 +01:00
Danilo Bargen
062d209113 Update README 2016-01-06 23:48:08 +01:00
Danilo Bargen
676ab62b4e Remove obsolete functions in updater 2016-01-06 23:33:52 +01:00
Danilo Bargen
bb14466213 Unpack tldr archive directly into ~/.cache/tldr-rs 2016-01-06 23:25:44 +01:00
Danilo Bargen
68b3ff23bc Allow --update to be run on its own 2016-01-06 23:24:56 +01:00
Danilo Bargen
bb72cd1a0f Stop printing arguments on invocation 2016-01-06 23:21:40 +01:00
Danilo Bargen
e0c9a85bd0 Implement command handling 2016-01-06 22:13:29 +01:00
Danilo Bargen
83e5e3622c Implement --update flag 2016-01-06 22:13:09 +01:00
Danilo Bargen
d321bef678 Reorder argument parsing handlers 2016-01-06 18:53:07 +01:00
Danilo Bargen
da43892451 Implement --render flag 2016-01-06 18:49:48 +01:00
Danilo Bargen
5c75798d19 Implement --version flag 2016-01-06 18:45:01 +01:00
Danilo Bargen
d4a43212cd Move formatter to separate module 2016-01-06 18:37:49 +01:00
Danilo Bargen
9343c52f13 Add argument parsing 2016-01-06 08:11:59 +01:00
Danilo Bargen
ab44af7d36 Deserialize index.json, copy tldr pages to cache 2016-01-03 23:41:52 +01:00
Danilo Bargen
b315741a21 Create cache dir if it doesn't exist yet 2016-01-03 21:27:22 +01:00