Skip to main content

Archivy extension to integrate your knowledge base as a syncable git repository with version control.

Project description

archivy-git allows users to use version control with their Archivy instance.

It is an official extension developed by archivy

Install

You need to have archivy already installed.

Run pip install archivy_git.

Usage

$ archivy git --help
Usage: archivy git [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  pull   Pulls changes from remote to local repository.
  push   Pushes local changes to the remote.
  setup  Creates and sets up git repository.

Use the setup command to create and configure your git repository.

Then you can periodically pull/push through the command line or the web interface by clicking Plugins on your archivy homepage.

However, it can also be useful to automatically push changes when you make an edit or create a new note / bookmark. To do this, you'll need to configure a Hook.

These are events that Archivy exposes and that you can configure.

To do so, run archivy hooks to edit the file and create it if it doesn't exist.

We can use the sync_dataobj archivy-git method to sync changes when they are made.

Example:

from archivy.config import BaseHooks
class Hooks(BaseHooks):

	def on_edit(dataobj):
		from archivy_git import sync_dataobj	
		sync_dataobj(dataobj) # syncs / pushes changes

	def on_dataobj_create(dataobj):
		# the same for creation
		from archivy_git import sync_dataobj	
		sync_dataobj(dataobj)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

archivy_git-0.1.0.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

archivy_git-0.1.0-py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page