summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThang Pham <phamducthang1234@gmail.com>2022-04-28 17:42:17 -0400
committerThang Pham <phamducthang1234@gmail.com>2022-04-28 17:42:17 -0400
commitc0a9bb2f485bf55bf1d105611e14357b1afe1bb0 (patch)
treef0ac51b15cfa19e26be360b45d851fbb5ee3a118
parent7e4775d3425db584a0e32692cb60e679a2039756 (diff)
project structure cleanup
-rw-r--r--NOTES.org46
-rw-r--r--README.md6
-rw-r--r--doc/config.md (renamed from config.md)0
-rw-r--r--hackernews_tui/src/view/async_view.rs2
4 files changed, 4 insertions, 50 deletions
diff --git a/NOTES.org b/NOTES.org
deleted file mode 100644
index 4b560e5..0000000
--- a/NOTES.org
+++ /dev/null
@@ -1,46 +0,0 @@
-#+TITLE: Hacker News TUI Project Notes
-#+AUTHOR: Thang Pham
-
-* Roadmap
-
-** DONE Render story/comment main text in ~CommentView~
-
-** TODO Improve error message for config parser
-
-** TODO Add Hacker News credential supports
-Ideally, users should be able to [0/3] [0%]
-- [ ] upvote/downvote
-- [ ] add comment
-- [ ] post
-
-** TODO Improve keymapping [0/2] [0%]
-- [ ] allow to bind multiple shortcuts to a single command
-- [ ] improve command naming/structure in each view
-
-** TODO Allow to parse Hacker News URL
-More specifically, open link starting with ~https://news.ycombinator.com/item?id=~ should open a new ~CommentView~ with the corresponding item as the main entry.
-
-** TODO Others [0/1] [0%]
-- [ ] Try [[https://github.com/cheeaun/node-hnapi][node-hnapi]] to replace [[https://hn.algolia.com/api][HN Algolia]] for retrieving story's comments
-
-
-* Changes
-** [[https://github.com/aome510/hackernews-TUI/pull/62][Render story text in comment view #62]] :ATTACH:
-:PROPERTIES:
-:ID: 024b344d-e592-45d0-8957-0477a4f95139
-:END:
-This PR implements [[*Render story/comment main text in ~CommentView~]].
-
-- Render a story text on the top of the ~CommentView~:
-
- #+attr_html: :width 1000
- [[attachment:_20220109_200339Screen Shot 2022-01-09 at 8.03.36 PM.png]]
-** [[https://github.com/aome510/hackernews-TUI/pull/63][Update dependencies #63]]
-This PR updates dependencies for ~hackernews-TUI~ which includes
-- updating ~cursive~-related dependencies:
- + ~cursive~ from ~0.16.3~ to ~0.17.0~
- + ~cursive-async-view~ from ~0.5.0~ to ~0.6.0~
- + ~cursive-buffered_backend~ from ~0.5.0~ to ~0.6.0~
- + ~cursive-aligned-view~ from ~0.5.0~ to ~0.6.0~
-- ~clap~ from ~2.34.0~ to ~3.0.7~
-- and other packages
diff --git a/README.md b/README.md
index f0835ab..71ede11 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# hackernews-TUI
-`hackernews_tui` is a fast and [customizable](https://github.com/aome510/hackernews-TUI/blob/main/config.md) application for browsing Hacker News on the terminal.
+`hackernews_tui` is a fast and [customizable](https://github.com/aome510/hackernews-TUI/blob/main/doc/config.md) application for browsing Hacker News on the terminal.
`hackernews_tui` is written in Rust with the help of [Cursive TUI library](https://github.com/gyscos/cursive/). It uses [HN Algolia APIs](https://hn.algolia.com/api/) and [HN Official APIs](https://github.com/HackerNews/API) to get Hacker News data.
@@ -134,9 +134,9 @@ In each `View`, press `?` to see a list of supported keyboard shortcuts and thei
![Example of a Help View](https://user-images.githubusercontent.com/40011582/147393555-5ca346ca-b59a-4a7f-ab53-b1ec7025eca4.png)
-The below sections will list the application's default shortcuts, which can be customized by changing the [key mappings](https://github.com/aome510/hackernews-TUI/blob/main/config.md#keymap) in the user's config file.
+The below sections will list the application's default shortcuts, which can be customized by changing the [key mappings](https://github.com/aome510/hackernews-TUI/blob/main/doc/config.md#keymap) in the user's config file.
-For more information about configuring the key mapping or defining custom shortcuts, please refer to the [config documentation](https://github.com/aome510/hackernews-TUI/blob/main/config.md#keymap).
+For more information about configuring the key mapping or defining custom shortcuts, please refer to the [config documentation](https://github.com/aome510/hackernews-TUI/blob/main/doc/config.md#keymap).
### Global key shortcuts
diff --git a/config.md b/doc/config.md
index 86a0dea..86a0dea 100644
--- a/config.md
+++ b/doc/config.md
diff --git a/hackernews_tui/src/view/async_view.rs b/hackernews_tui/src/view/async_view.rs
index 7d2c61e..1466c33 100644
--- a/hackernews_tui/src/view/async_view.rs
+++ b/hackernews_tui/src/view/async_view.rs
@@ -73,7 +73,7 @@ pub fn get_article_view_async(siv: &mut Cursive, article_url: &str) -> impl View
let err_desc = format!(
"Failed to execute the command: `{} {}`.\n\
Please make sure you have configured the `article_parse_command` option as described in the below link:\n\
- \"https://github.com/aome510/hackernews-TUI/blob/main/config.md#article-parse-command\"",
+ \"https://github.com/aome510/hackernews-TUI/blob/main/doc/config.md#article-parse-command\"",
config::get_config().article_parse_command,
article_url
);