This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Delete duplicated nikola meta data in translated posts (must be in nikola's translated paths) | |
import os, sys, codecs | |
import shutil | |
# recursive, paths from working dir | |
FROM_PATH = "" | |
OUTPUT_PATH = None #if none, replace file | |
def file_open_save(path, mode, text=False): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Converts multimarkdown meta block (pelican) to rst (nikola); also moves "draft" status and summary | |
# | |
import os, sys, codecs | |
# recursive, paths from working dir | |
FROM_PATH = "" | |
OUTPUT_PATH = None #if none, replace file | |
SUMMARY_TO_DESCRIPTION = True # Put summary key (pelican) to description key (nikola) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Creates a simple sitemap, taking a source dir and translating to a site url; applying filters: | |
PATH_SITE: source path, must include / at the end ; also accesible from cli with -f | |
SITE_URL: must include final /; also accesible from cli with -s | |
EXTENSIONS_ACCEPTED: ('ext1', 'ext2') | |
SITEMAP_FILE: also accesible from cli with -xml | |
IGNORE_FILES: ('error.php', '.htaccess') | |
IGNORE_FOLDERS: ('.svn', 'imgs', 'src') | |
PRIORITY: from 0.0 to 1.0; also accesible from cli with -p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create svn changelog (Python 2.7, 3.3) | |
""" | |
Takes the svn log [options] and turns them into a changelog. | |
Basic: | |
-------- | |
2013-11-25: | |
changed arguments (better handling) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Displays lines in files (grepy) that have TODO or FIXME | |
# script -> where script runs. script del file num -> del line | |
import re, os, sys, argparse | |
import shutil | |
filesIgnore = ('.bak') | |
try: | |
from colorama import Fore, init, Style |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Script to merge txt files from a given folder | |
mergetxt path_directory path_output [options: --sep num --fname num] | |
path_directory: enter 'here' to take the path from where it runs | |
separator: separator between each file. |