Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

Make a differencing tool for conf.py #12

Open
sinewalker opened this issue Dec 21, 2016 · 2 comments
Open

Make a differencing tool for conf.py #12

sinewalker opened this issue Dec 21, 2016 · 2 comments

Comments

@sinewalker
Copy link
Owner

As noted on the Wiki Setup page, it would be useful to have a tool that compares the stock Nikola conf.py in a manner similar to Spacsmacs' (spacemacs/ediff-dotfile-and-template).

Probably use Unix or GNU diff rather than ediff from the command line. Or, why not both?

@sinewalker
Copy link
Owner Author

sinewalker commented Jun 12, 2017

To generate a vanilla conf.py I can use nikola init -q ${TMP}/dummy and then difference that with the project's one. After computing the diff, just nuke ${TMP}/dummy.

I wonder if I can call nikola init from Python (or even create my own task?)

Perhaps a Nikola plugin?

@sinewalker
Copy link
Owner Author

The tool from spacemacs is this elisp code:

(defun spacemacs/ediff-dotfile-and-template ()
  "ediff the current `dotfile' with the template"
  (interactive)
  (ediff-files (dotspacemacs/location)
               (concat dotspacemacs-template-directory ".spacemacs.template")))

So... combined with my ediff shell function from dotfiles I can probably do something pretty simple as a shell script.

I'm wondering though if there's a python differencing tool, to avoid a reliance on emacs for the tool chain?

Maybe something like this tool? Of course, it then becomes its own dependency...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant