Skip to content
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

Support --exclude-from for rsync publishing using excludes.txt #2659

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dcantrell
Copy link

Add an excludes.txt example file where users can list rsync exclude
specifications. If the site you are publishing has any paths on the
remote site that Pelican should ignore and not remove, list them in
excludes.txt so they are not removed each time you do:

make rsync_upload

The example file has a comment pointing users to the rsync man page
for information on the format used in exclude files. The only entry
in it by default is the .DS_Store entry which was from the rsync
command in tasks.py.

Add an excludes.txt example file where users can list rsync exclude
specifications.  If the site you are publishing has any paths on the
remote site that Pelican should ignore and not remove, list them in
excludes.txt so they are not removed each time you do:

    make rsync_upload

The example file has a comment pointing users to the rsync man page
for information on the format used in exclude files.  The only entry
in it by default is the .DS_Store entry which was from the rsync
command in tasks.py.
@avaris
Copy link
Member

avaris commented Dec 3, 2019

Two comments:

  1. excludes.txt is a bit too generic for a name. Something like rsync_excludes.txt would be better for understanding what the file is without opening it.
  2. Does it really need a jinja template of its own? It's all static text. You can easily write it from a string.

@dcantrell
Copy link
Author

Two comments:

1. `excludes.txt` is a bit too generic for a name. Something like `rsync_excludes.txt` would be better for understanding what the file is without opening it.

Makes sense, I can change that.

2. Does it really need a jinja template of its own? It's all static text. You can easily write it from a string.

Initially I didn't make it a jinja template, but I decided to follow what the other template files were doing. I don't know what jinja is anyway. I can just drop all that.

Changes coming up.

Give the rsync excludes file a bit more of a descriptive name.
…2659)

No need to have this file be a template.  It can just be written out
as a string.
@justinmayer
Copy link
Member

Hey David. I keep looking at this PR from time to time, and I guess my question is what is the impetus for storing the excludes outside tasks.py / Makefile? While I understand the DRY concept, if that's the reason I'm not sure it makes a lot of sense in this case given that most folks are only going to ignore a handful of file types. In the end, I'm just not sure it makes sense to create a separate file for this purpose. It seems like it creates unnecessary clutter.

Am I missing something? Is it just me?

@dcantrell
Copy link
Author

The main objective is to allow rsync exclude pattern syntax in the external excludes list and avoid string manipulation problems that may come about while writing an excludes list as a string in Python or in a Makefile or something like that. The other objective I had was to permit site-specific customization in a file not owned by the upstream project to allow for easier merging/rebasing of upstream code from Pelican to your own local project.

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

Successfully merging this pull request may close these issues.

None yet

3 participants