-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79be5d9
commit a2588e5
Showing
95 changed files
with
7,849 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: a6456d038c946a33dd68e9d80d753e4a | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Changelog | ||
========= | ||
|
||
- Add the ability to have more sophisticated cache entries | ||
- Utilize the new cache entries in the intersphinx doctype | ||
- Fix a bug with the score of the results being wrong when there are more than 100 results | ||
- Add a ``simple view`` setting to get results that look like they used to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
DocTypes | ||
========= | ||
DocTypes represent known formats/standards that the plugin can use to index a doc/manual. | ||
|
||
Doctype Index | ||
------------- | ||
|
||
.. NOTE:: | ||
Got a doctype not listed that you want added? Create a `github issue <https://github.com/cibere/Flow.Launcher.Plugin.rtfm/issues>`__ asking for it, or send me a message on `discord <https://discord.com/users/894312088762220605>`__. | ||
|
||
.. list-entries:: plugin/libraries/doctypes/__init__.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Favicons | ||
======== | ||
|
||
The plugin will look for and download the favicon for each manual/doc that you are using. If the plugin consistantly chooses the wrong favicon/image to use as the result icons, please create an `issue on the github page <https://github.com/cibere/Flow.Launcher.Plugin.rtfm/issues/new>`__ to let the developers of the plugin know, and so that they can fix it. | ||
|
||
SVG Files | ||
---------- | ||
In the event that the favicon is an `svg <https://en.wikipedia.org/wiki/SVG>`__ file, the plugin will try to use `ImageMagick <https://imagemagick.org/script/download.php#windows>`__ to convert it to a high quality ``png`` file. If `ImageMagick <https://imagemagick.org/script/download.php#windows>`__ is not installed, the plugin will use an undocumented google API to get a low quality render of the favicon. | ||
|
||
Example | ||
~~~~~~~ | ||
Without ImageMagick | ||
|
||
.. image:: /_static/images/py_logo_wo_imagemagick_example.png | ||
|
||
With ImageMagick | ||
|
||
.. image:: /_static/images/py_logo_w_imagemagick_example.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
rtfm plugin | ||
=========== | ||
The rtfm plugin for `flow launcher <https://www.flowlauncher.com/>`__ makes it easy to query docs or manuals. | ||
|
||
For a list of versions that documentation is available for, see `here <https://rtfm.cibere.dev>`__. | ||
|
||
Getting Help | ||
------------- | ||
Need help? Either create an `issue request on github <https://github.com/cibere/Flow.Launcher.Plugin.rtfm/issues/new>`__, or join the `official flow discord server <https://discord.gg/QDbDfUJaGH>`__ and ask there. | ||
|
||
Demo | ||
----- | ||
.. image:: /_static/images/demo.gif | ||
|
||
Credits | ||
------- | ||
- Credits to `Danny/Rapptz <https://github.com/Rapptz>`__ for the original intersphinx code | ||
- Credits to `Yusyuriv <https://github.com/Yusyuriv>`__ for writing the frontend code for the settings website. | ||
- The webserver's design is based on `Figma SDS <https://github.com/figma/sds/>`__ (licensed under MIT) | ||
|
||
.. toctree:: | ||
:caption: First Steps | ||
:hidden: | ||
|
||
installing | ||
quickstart | ||
|
||
.. toctree:: | ||
:caption: Info | ||
:hidden: | ||
|
||
presets | ||
doctypes | ||
favicons | ||
main_keyword | ||
settings | ||
changelog | ||
logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
Installing | ||
========== | ||
|
||
There are 3 main ways to install the plugin: | ||
|
||
1. `Install Stable Release From Manifest <#install-stable-release-from-manifest>`__ | ||
2. `Install Specific Version <#install-specific-version>`__ | ||
3. `Install from source <#install-from-source>`__ | ||
|
||
Install Stable Release From Manifest | ||
------------------------------------- | ||
To install a stable release of the plugin from flow's plugin manifest, use the following command: | ||
|
||
.. code-block:: sh | ||
pm install rtfm by cibere | ||
Install Specific Version | ||
------------------------- | ||
Want to install a specific version? Well you can by using the `github release page <https://github.com/cibere/flow.Launcher.Plugin.rtfm/releases>`__ | ||
|
||
1. Find the version you want to download | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
To install a specific version, head over to the `releases page <https://github.com/cibere/flow.Launcher.Plugin.rtfm/releases>`__ and find the version that you want to install. In my case I'm going to install the `v1.0.0a4 <https://github.com/cibere/Flow.Launcher.Plugin.rtfm/releases/tag/v1.0.0a4>`__ prerelease. | ||
|
||
.. image:: /_static/images/v1.0.0a4_prerelease.png | ||
:target: https://github.com/cibere/Flow.Launcher.Plugin.rtfm/releases/tag/v1.0.0a4 | ||
|
||
2. Get the archive link | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Now grab the link to the ``zip`` file in the assets section. | ||
|
||
.. image:: /_static/images/copy_release_archive.png | ||
:target: https://github.com/cibere/Flow.Launcher.Plugin.rtfm/releases/tag/v1.0.0a4 | ||
|
||
3. Install the plugin | ||
~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Finally, install the zip using the package manager: | ||
|
||
.. code-block:: sh | ||
pm install <your link> | ||
# so in my case it would be | ||
pm install https://github.com/cibere/Flow.Launcher.Plugin.rtfm/releases/tag/v1.0.0a4 | ||
Install From Source | ||
-------------------- | ||
|
||
If for whatever reason you want to build the plugin yourself, you can. | ||
|
||
1. Download Source files | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
First, download the source files from `the github page <https://github.com/cibere/flow.Launcher.Plugin.rtfm>`__. This can be done by downloading it as a zip: | ||
|
||
.. image:: /_static/images/download_source.png | ||
:target: https://github.com/cibere/flow.Launcher.Plugin.rtfm | ||
|
||
or by cloning it using `git <https://git-scm.org>`__: | ||
|
||
.. code-block:: sh | ||
git clone https://github.com/cibere/flow.Launcher.Plugin.rtfm | ||
2. Install Dependencies | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Next, install the plugin's dependencies to a folder called ``lib``. This can be done with the following command: | ||
|
||
.. code-block:: sh | ||
py -m pip install -r requirements.txt -t lib | ||
3. Build the plugin | ||
~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Then build the plugin by running the ``build_plugin.py`` file while passing the name of the location. In my case, I'm going to name the built plugin ``built_rtfm_plugin.zip``. That can be done by running: | ||
|
||
.. NOTE:: | ||
Make sure the name you pass ends with ``.zip``, as the script will create an archive with the chosen name. | ||
|
||
.. code-block:: sh | ||
py build_plugin.py built_rtfm_plugin.zip | ||
4. Install the plugin | ||
~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Now finally, install the plugin by using the package manager. | ||
|
||
.. code-block:: sh | ||
pm install <path to zip> | ||
# so in my case | ||
pm install C:\Users\default.MyPC\Downloads\flow.launcher.plugin.rtfm\built_rtfm_plugin.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
Logs | ||
==== | ||
|
||
The plugin has an extensive logging system builtin, however the majority of it is set to the debug level, which is disabled by default. | ||
|
||
Debug Mode | ||
----------- | ||
Debug mode is available for the cases where detailed logs are needed to debug an issue. Having this enabled can slow down the plugin to some degree, but it should only be somewhat noticeable when caching a large amount of manuals. | ||
|
||
What gets logged without debug mode? | ||
------------------------------------ | ||
Disabling debug mode does not disable logs. When debug mode is disabled, entries that are info level and above are still logged, for example: | ||
|
||
- Webserver startup info (like the port it is running on) | ||
- Start-time settings info from `flogin <https://github.com/cibere/flogin>`__ | ||
- Webserver access logs from `aiohttp <https://docs.aiohttp.org/en/stable/>`__ | ||
- Warnings (ex: the port the webserver attempted to start on was already taken) | ||
- Errors | ||
|
||
Log Location | ||
------------ | ||
Logs are stored in a file called ``flogin.log`` in the plugin's root directory. The file is capped at 1mb, however once that limit is reached, the contents will be moved to a file called ``flogin.log.1``. The contents of ``flogin.log.1`` will never be moved, and will just be overriden once ``flogin.log`` fills up again. | ||
|
||
This file can also be accessed via the ``Open Log File`` result when using the :doc:`main_keyword` or in any context menu from a result that came from the plugin. | ||
|
||
Disabling Logs | ||
-------------- | ||
If you want to disable logs completely, head into your plugin's directory and create a file called ``.flogin.prod``. | ||
|
||
To find the plugin's directory, open your flow launcher settings menu, head into the plugins tab, and find the ``rtfm`` plugin. | ||
|
||
.. NOTE:: | ||
This file is only checked for on startup, so you must restart flow after creating/deleting this file for the changes to take affect. | ||
|
||
.. image:: /_static/images/plugin_folder_icon_darkmode.png | ||
:class: only-dark | ||
|
||
.. image:: /_static/images/plugin_folder_icon_lightmode.png | ||
:class: only-light |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Main Keyword | ||
============ | ||
|
||
The main keyword lets you quickly access the settings webserver, reload the cache, or open up the log file. The default default keyword is ``rtfm``, but it can be configured in the plugin's settings (see :doc:`settings` for more info). | ||
|
||
.. image:: /_static/images/main_keyword_example_darkmode.png | ||
:class: only-dark | ||
|
||
.. image:: /_static/images/main_keyword_example_lightmode.png | ||
:class: only-light |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Presets | ||
======== | ||
Presets are special implementations for specific websites that don't conform to specific standards, or aren't easily indexable. When you add a manual/doc, the plugin will automatically check if against the list of current presets to see if there are any for the manual/doc, and if not, it will try to guess which standard it conforms to. | ||
|
||
Preset Index | ||
------------- | ||
|
||
This is a list of manuals/docs that the plugin has specially designed parsers to handle. | ||
|
||
.. NOTE:: | ||
Got a manual/doc not listed that you want added? Create a `github issue <https://github.com/cibere/Flow.Launcher.Plugin.rtfm/issues>`__ asking for it, or send me a message on `discord <https://discord.com/users/894312088762220605>`__. | ||
|
||
.. list-entries:: plugin/libraries/presets/__init__.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
Quickstart | ||
=========== | ||
This guide will walk you through the process of adding your first manual/doc, which for examples sake, will be this documentation. This guide will also assume that you have a fresh install of the plugin, and have not changed any settings. | ||
|
||
Opening the settings | ||
-------------------- | ||
To open up the settings website, type ``rtfm`` into flow launcher and press the ``Open Settings`` result. | ||
|
||
.. NOTE:: | ||
See :doc:`main_keyword` for more information on that keyword. | ||
|
||
.. image:: /_static/images/quickstart/rtfm_result_example_darkmode.png | ||
:class: only-dark | ||
|
||
.. image:: /_static/images/quickstart/rtfm_result_example_lightmode.png | ||
:class: only-light | ||
|
||
Adding the doc | ||
-------------- | ||
Find the ``Add Manual`` section, and input a keyword and location for the doc/manual. In our case, we will choose ``kw`` as the keyword, and ``rtfm.cibere.dev/latest`` as the location. Then press the ``Add`` button to add it. | ||
|
||
.. NOTE:: | ||
See :doc:`settings` for more information on the plugin settings. | ||
|
||
.. image:: /_static/images/quickstart/add_manual_darkmode.png | ||
:class: only-dark | ||
|
||
.. image:: /_static/images/quickstart/add_manual_lightmode.png | ||
:class: only-light | ||
|
||
Editing the doc | ||
------------------- | ||
To edit the manual/doc, scroll down until you find the doc/manual we just added. In our case, we are just going to leave it as-is. | ||
|
||
.. NOTE:: | ||
See :ref:`the editing a manual section <edit_manual>` for information about the different fields. | ||
|
||
.. image:: /_static/images/quickstart/edit_manual_darkmode.png | ||
:class: only-dark | ||
|
||
.. image:: /_static/images/quickstart/edit_manual_lightmode.png | ||
:class: only-light | ||
|
||
Save the settings | ||
------------------ | ||
Now we are going to save our settings so that it actually gets added to the plugin and so that we can query it. To save the settings, scroll up until you find the ``Plugin Settings`` section, and press the ``Save Settings & Reload Cache`` button. | ||
|
||
.. NOTE:: | ||
|
||
See :ref:`the saving settings section <save_settings>` for more information about saving the settings. | ||
|
||
.. image:: /_static/images/save_settings_example_darkmode.png | ||
:class: only-dark | ||
|
||
.. image:: /_static/images/save_settings_example_lightmode.png | ||
:class: only-light | ||
|
||
Querying the doc/manual | ||
----------------------- | ||
Now that we've added and saved our doc/manual, we can query it to see the results. As we set the keyword to ``kw`` in the `adding the doc step <#adding-the-doc>`__, we will be using the ``kw`` keyword to do so. So, using flow, type ``kw presets`` and see the results. | ||
|
||
.. image:: /_static/images/quickstart/kw_presets_darkmode.png | ||
:class: only-dark | ||
|
||
.. image:: /_static/images/quickstart/kw_presets_lightmode.png | ||
:class: only-light |
Oops, something went wrong.