New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a differencing tool for conf.py #12

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

Comments

Projects
None yet
1 participant
@sinewalker
Owner

sinewalker commented Dec 21, 2016

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

This comment has been minimized.

Show comment
Hide comment
@sinewalker

sinewalker Jun 12, 2017

Owner

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?

Owner

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

This comment has been minimized.

Show comment
Hide comment
@sinewalker

sinewalker Aug 13, 2017

Owner

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...

Owner

sinewalker commented Aug 13, 2017

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 join this conversation on GitHub. Already have an account? Sign in to comment