Last active
October 29, 2019 21:40
-
-
Save techtonik/9bfd6b3acac305ee64f2f4ec9ffffdfe to your computer and use it in GitHub Desktop.
Revisions
-
techtonik revised this gist
May 6, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ https://github.com/techtonik/discovery/tree/master/interface/plugin/farmanager 1. Download `pygin*.7z` from https://forum.farmanager.com/viewtopic.php?f=8&t=9998 (I tested with latest pygin_c080105_040517.7z) -
techtonik revised this gist
May 6, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ https://gist.github.com/techtonik/9bfd6b3acac305ee64f2f4ec9ffffdfe Here is an example plugin. Feel free to copy and adapt. ```python __title__ = "02fields" __author__ = "anatoly techtonik <[email protected]>" __license__ = "Public Domain" -
techtonik revised this gist
May 6, 2017 . 1 changed file with 48 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,54 @@ https://gist.github.com/techtonik/9bfd6b3acac305ee64f2f4ec9ffffdfe 1. Download `pygin*.7z` from https://forum.farmanager.com/viewtopic.php?f=8&t=9998 (I tested with latest pygin_c080105_040517.7z) 2. Unpack `pygin.dll` into Adapters/ subdir of your Far directory (%FARHOME%) 3. Create your plugin in %FARHOME%/Plugins as Python package (dir with `__init__.py`) 4. Restart, press F11 to see your plugin in the list, F3 to see more info 5. If something goes wrong, check %TMP%/pygin.log for errors and output Here is an example plugin. Feel free to copy and adapt. ``` __title__ = "02fields" __author__ = "anatoly techtonik <[email protected]>" __license__ = "Public Domain" # --- utility functions --- import hashlib def getuuid(data): """Generate UUID from `data` string""" if type(data) != bytes: data = data.encode('utf-8') h = hashlib.sha256(data).hexdigest()[:32].upper() for i, pos in enumerate([8, 12, 16, 20]): h = h[:i+pos] + '-' + h[i+pos:] return h # --- plugin interface def GetGlobalInfoW(info): """ Called by Far Manager, plugin needs to fill the info """ info["Title"] = __title__ # should be set and non-empty info["Author"] = __author__ # should be set and non-empty # first string from file comment desc = __doc__.strip().splitlines()[0] info["Description"] = desc # should be set info["Guid"] = getuuid(info["Title"]) def GetPluginInfoW(info): """ Called by Far Manager to add item into Plugin commands menu (F11) """ info["MenuString"] = __title__ info["Guid"] = getuuid(info["MenuString"]) def OpenW(info): """ Called by Far Manager when plugin is invoked """ print("[open] " + __file__) ``` For Far API refence, see https://api.farmanager.com/ru/exported_functions/getglobalinfow.html -
techtonik revised this gist
Apr 28, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ https://gist.github.com/techtonik/9bfd6b3acac305ee64f2f4ec9ffffdfe 1. Download `pygin.7z` from https://forum.farmanager.com/viewtopic.php?f=8&t=9998 size, sha1 = (379105, 89903f828fdf5668d104690867a8241e80b5d3e6) 2. Unpack `pygin.dll` into Adapters/ subdir of your Far directory (%FARHOME%) 3. Create your plugin in %FARHOME%/Plugins as Python package (dir with `__init__.py`) -
techtonik revised this gist
Apr 28, 2017 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,8 @@ https://gist.github.com/techtonik/9bfd6b3acac305ee64f2f4ec9ffffdfe 1. Download `pygin.7z` from https://forum.farmanager.com/viewtopic.php?f=8&t=9998 size, sha1 = (379105, 89903f828fdf5668d104690867a8241e80b5d3e6) 2. Unpack `pygin.dll` into Adapters/ subdir of your Far directory (%FARHOME%) 3. Create your plugin in %FARHOME%/Plugins as Python package (dir with `__init__.py`) ``` -
techtonik revised this gist
Aug 4, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ 1. Download pygin.7z from http://forum.farmanager.com/download/file.php?id=7215 size, sha1 = (327461, 7bfc9cdf6435b8f625134b4b6f95ab6393e34dea) 2. Unpack pygin.dll into Adapters/ subdir of your Far directory (%FARHOME%) 3. Create your plugin in %FARHOME%/Plugins as Python package (dir with `__init__.py`) ``` ``` -
techtonik revised this gist
Jul 29, 2016 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,7 @@ 1. Download pygin.7z from http://forum.farmanager.com/download/file.php?id=7215 size, sha1 = (327461, 7bfc9cdf6435b8f625134b4b6f95ab6393e34dea) 2. Unpack pygin.dll into Adapters/ subdir of your Far directory (%FARHOME%) 3. Create your plugin in %FARHOME%/Plugins ``` ``` -
techtonik revised this gist
Jul 29, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ 1. Download pygin.7z from http://forum.farmanager.com/download/file.php?id=7215 size, sha1 = (327461, 7bfc9cdf6435b8f625134b4b6f95ab6393e34dea) 2. Unpack pygin.dll into Adapters/ subdir of your Far directory -
techtonik renamed this gist
Jul 29, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
techtonik created this gist
Jul 29, 2016 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ 1. Download pygin.7z from http://forum.farmanager.com/download/file.php?id=7215 size, sha1 = (327461, 7bfc9cdf6435b8f625134b4b6f95ab6393e34dea) 2. Unpack pygin.dll into Adapters/ subdir of your Far directory