Releases: toiletbril/dedoc
0.2.7, 0.2.8
🧇
Thank you for waiting! Includes static x86_64
binaries for Windows and Linux.
This release includes binaries of version 0.2.7. In 0.2.8, git-const
was removed, as it was causing a panic when running cargo install
, since cargo doesn't use git repositories when compiling packages downloaded that way. There is no other differences between these versions.
Public changes
- Add
--porcelain
tosearch
andlist
to make scripting easier. - Add
--no-labels
tolist
to avoid printing labels. - Add
--exists
tolist
to check whether a docset exists or has been downloaded (with-l
).
Boring non-public changes
- Set up a proper Dockerfile and cross-compilation script.
- Make integration tests.
- Set up CI with Github Actions for integration tests.
- Collect integration tests' code coverage as an Github Action summary.
Please see README.md for usage information.
0.2.6
🦊
Includes static x86_64
binaries for Windows and Linux.
Changes
- Replace
attohttpc
withureq
to avoid being blocked by Cloudflare when accessing DevDocs. - Make various help messages a little bit better.
- Straight up a number of minor bug fixes. And by "minor bug fixes", ha-ha, well. Let's just say
Please see README.md for usage information.
0.2.5
🕴️
Includes static x86_64
binaries for Windows and Linux.
Changes
- Add
--number-lines
toopen
andsearch
which number outputted lines. - Add
--update-all
todownload
which bulk-updates everything. - Add
--search
tolist
which includes only items that contain on it's value in output. - Add an ability to overwrite program directory using
$DEDOC_HOME
environment variable. - Bump
toiletcli
to 0.12.0 to allow using equals to flag values, like--color=yes
. - Some warnings are now errors, so the program exits with non-zero exit code. Errors are now printed to stderr.
- Minor bug fixes, cleanup, and something else I forgot about.
Please see README.md for usage information.
0.2.3
Thank you for the stars :3c. Don't ask what happened to 0.2.2
Includes static x86_64
binaries for Windows and Linux.
Changes
- Opening a page now displays output based on the current terminal width, up to 120 columns.
- Added
-c
toopen
andsearch
to choose output width in columns. - Added
-f
toopen
andsearch
to ignore the fragment and instead open the entire page. - Changed
-c
for the base command to not require any arguments and be an alias of--color yes
. - Updated
html2text
to0.11.0
. - Fixed clippy warnings.
- Fixed minor bugs.
Please see README.md for usage information.
0.2.1
Includes static x86_64
binaries for Windows and Linux.
Changes
- Changed colors to be slightly brighter.
- Changed directory of debug builds to
.dedoc_debug
. - Added fragment support to
open
. - Added
test
subcommand for debug builds. - Improved performance when opening a page with fragments.
- Fixed
list
showing incorrect error when it was run beforefetch
. - Fixed suggestions going out of bounds when there is less than 3 of them.
- Fixed incorrect casing of fragments when using
search
with-i
flag. - Fixed
search
not working properly when using-pi
. - Fixed minor bugs.
Known issues
As I have figured out, the html2text
library has some trouble in accurately identifying fragments within <li>
and similar tags. As a result, navigating to specific fragments within certain docsets might be limited.
Please see README.md for usage information.
0.2.0
Includes static x86_64
binaries for Windows and Linux.
Changes
download
now only downloadsdocs.json
andindex.json
. HTML pages are now generated directly out ofdocs.json
, with unnecessary attributes stripped off for minimal disk usage.- Default
search
now usesindex.json
, listing fragments when available. - Opening a fragment with
search
/open
now prints only the fragment contents. - Precise
search
now provides contexts around the found section, similar togrep
. Context may contain raw HTML, as currently files are transpiled on-the-fly for dynamic coloring support. - Added
-w
tosearch
(Search for the whole sentence). preformat
tags are now padded to 80 characters.- Improved search cache.
- Fixed minor bugs.
Upgrading old docsets
Docsets from previous versions are incompatible. If you're upgrading from older version, please redownload them:
$ dedoc download --force $(dedoc list -ln)
Please see README.md for usage information.
0.1.3
Includes static x86_64
binaries for Windows and Linux.
Changes
download
now deletes unused files, which cuts the disk usage in half.- Added
-n
tolist
(Print each docset on a separate line). - Added
-h
toopen
(Interpret arguments as a path to HTML file and translate it to markdown). - Added
--purge-all
toremove
(Remove all installed docsets). - Fixed small bugs and corrected typos.
Some notes
I have recently discovered that docsets could be downloaded more efficiently, using db.json
(which lists all HTML documents in a single file), and filename search could use index.json
(which maps every title to a path of HTML page).
staging
already uses db.json
, but there's still some thinking to do for HTML to markdown conversion. If this tool ever helps anyone other than me, feel free to open a pull request there to speed everything up.
This version's download
downloads and unpacks a tarball, and search
/open
transpiles pages to markdown on the fly, to support colors and column width. This works well for me.
Please see README.md for usage information.
0.1.2
Initial release. Includes static x86_64
binaries for Windows and Linux.
Please see README.md for more information.
Usage
To start using dedoc
and fetch all latest available docsets, first run:
$ dedoc fetch
Fetching `https://devdocs.io/docs.json`...
Writing `docs.json`...
Fetching has successfully finished.
You can use -f
flag to overwrite the fetched document if you encounter any issues.
To see available docsets, run:
$ dedoc ls
angular, ansible, apache_http_server, astro, async, ...
Which will list all docsets available to download from file which you
previously fetched. If you need version-specific docs, like
vue~3
/~2
, use -a
flag, which will list everything.
Download the documentation:
$ dedoc download rust
Downloading `rust`...
Received 9335861 of 9335861 bytes...
Extracting to `/home/user/.dedoc/docsets/rust`...
Install has successfully finished.
This will make the documentation available locally as a bunch of HTML pages.
To search, for instance, for BufReader
from rust
, run:
$ dedoc search rust bufreader
Searching for `bufreader`...
Exact matches in `rust`:
1 std/io/struct.bufreader
You will get search results which are pages with filenames that match your
query. If you need a more thorough search, you can use -p
flag, which will
look inside of the files as well.
Finally, to see the page you can either use dedoc open
:
$ dedoc open rust std/io/struct.bufreader
Or use -o
flag, which will open n-th matched page:
$ dedoc search rust bufreader -o 1
You would probably like to use ss
instead of search
, pipe output to a pager,
like less
and forcefully enable colors with -c y
if your pager supports it,
which turns the final command into:
$ dedoc -c y ss rust bufreader -o 1 | less -r