aboutsummaryrefslogtreecommitdiffstats
path: root/nikola/plugins/command/orphans.py
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2015-08-26 07:57:23 -0300
committerLibravatarAgustin Henze <tin@sluc.org.ar>2015-08-26 07:57:23 -0300
commit70ceb871117ca811d63cb02671dc0fefc2700883 (patch)
tree846133ea39797d2cd1101cff2ac0818167353490 /nikola/plugins/command/orphans.py
parent8559119e2f45b7f6508282962c0430423bfab051 (diff)
parent787b97a4cb24330b36f11297c6d3a7a473a907d0 (diff)
Merge tag 'upstream/7.6.4'
Upstream version 7.6.4
Diffstat (limited to 'nikola/plugins/command/orphans.py')
-rw-r--r--nikola/plugins/command/orphans.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/nikola/plugins/command/orphans.py b/nikola/plugins/command/orphans.py
index f550e17..b12cc67 100644
--- a/nikola/plugins/command/orphans.py
+++ b/nikola/plugins/command/orphans.py
@@ -24,6 +24,8 @@
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+"""List all orphans."""
+
from __future__ import print_function
import os
@@ -32,6 +34,9 @@ from nikola.plugins.command.check import real_scan_files
class CommandOrphans(Command):
+
+ """List all orphans."""
+
name = "orphans"
doc_purpose = "list all orphans"
doc_description = """\
@@ -41,5 +46,6 @@ but are not generated by Nikola.
Output contains filenames only (it is passable to `xargs rm` or the like)."""
def _execute(self, options, args):
+ """Run the orphans command."""
orphans = real_scan_files(self.site)[0]
print('\n'.join([p for p in orphans if not os.path.isdir(p)]))