New to Busy?

Hivediff - an app to view the history of any hive post

18 comments

holger80
73
19 days ago3 min read

Hivediff is a small python GUI that can be used to view the editing history of a post.

It uses the account history for searching all comment operations with the specified permlink. Based on the received patches, a change history is build and can be viewed.

In this example, it can be seen that there two changes were made to the original post.

Hivediff can now be used to see what was changed at the specific operation. On the left side, you see the state before the edit and on the right side, you see the state after the edit.

You can select the different edits by their time-stamp at the left side by clicking on an item in the tree view.

Hivediff was inspired by pydiff, which is the reason why it uses Tk.

Installation

You need to clone the github repository:

git clone https://github.com/holgern/hivediff.git

and you need to install Tk and beem for python 3.

  • For Ubuntu, you can install Tk by sudo apt-get install python-tk.
  • For MacOS, Tk should be included.
  • For windows, the easiest way is to use anaconda as it's includes Tk.

beem can be installed by

pip install beem

or

conda install beem

Usage

Hivediff can be started by (you may need to replace python by python3)

python .\hivediff.py

It is possible to set an authorperm link with --authorperm:

python .\hivediff.py --authorperm @holger80/update-for-beem-support-for-ledger-nano-sx-has-been-added

It is also possible to set an authorperm via a dialog at File/View Post history.

View diff between a markdown file and the corresponding Hive version

Hivediff can also be used to check the difference between an edited markdown file with YAML header to the currently broadcasted post body.

Let's assume, I want to edit my last post. At first, I can download the post as markdown file with:

beempy download -a holger80 -s update-for-beem-support-for-ledger-nano-sx-has-been-added

Then I'm editing the file and save it.
I can now check my changes with

python hivediff.py --file 2020-05-12T19-23-15_update-for-beem-support-for-ledger-nano-sx-has-been-added.md

It is also possible to load the file in the app. Just click on the File menu and click compare Markdown file.

This command let Hivediff load the markdown file and extract the permlink from the YAML header.

On the left side, the post body is shown and on the right side my locally stored markdown file. I can see that I added an s to key.

I can now broadcast the changes with

beempy post 2020-05-12T19-23-15_update-for-beem-support-for-ledger-nano-sx-has-been-added.md

Reload

You can reload with strg+r, or by click on Reload in the menu.
It is also possible to search a string in your document (strg+f).

Feedback

Do you think that Hivediff is a useful application? Should I invest more work in it? Maybe create an installer and a standalone version?

Maybe add the possibility to edit the content, revert changes, and finally broadcast the modified content?


If you like what I do, consider casting a vote for me as witness on Hivesigner or on PeakD

Comments

Sort byBest