tags:
- date/2023/04/22 date: 2023-04-22 created: 2023-04-22T03:41:05 author: [https://github.com/jeetsukumaran] license: "CC BY 4.0" title: | the truth they will never tell you
var utility = require(app.vault.adapter.basePath + "/__annex__/resources/obsidian/scripts/javascript/utility.js") | |
function formatContributorList(dv, plan) { | |
let contributors = dv.pages() | |
.where((p) => p.file.etags.includes(plan.workplanTag)) | |
.where((p) => p.file.path !== plan.file.path) | |
.sort((p) => p["content-brief"] + p.title + p.file.name) | |
.map((p) => { | |
let contributor = []; | |
let display = p["production-brief"] ?? p["content-brief"] ?? p.title ?? p.file.name; |
function runQuery(options) { | |
options = options || {} | |
// const excludePatterns = options.excludePatterns ?? [] | |
// const includePatterns = options.includePatterns ?? [] | |
const excludePaths = options.excludePaths ?? [] | |
const includePaths = options.includePaths ?? [] | |
const limit = options.limit ?? 50 | |
const allPages = dv.pages() | |
let sourcePages = null | |
if (includePaths.length) { |
tags:
# "heavy" approach (can be useful if you want to derive | |
# and add simple behavior, e.g. validation etc.) | |
class Attributes: | |
def __init__(self, **kwargs): | |
# Alternatively: | |
# self.__dict__.update(kwargs) | |
for k, v in kwargs.items(): | |
setattr(self, k, v) | |
# or otherwise: |
#! /usr/bin/env python | |
############################################################################### | |
## | |
## Copyright 2012 Jeet Sukumaran. | |
## | |
## This program is free software; you can redistribute it and/or modify | |
## it under the terms of the GNU General Public License as published by | |
## the Free Software Fountion; either version 3 of the License, or | |
## (at your option) any ler version. |
#! /bin/bash | |
set -e -o pipefail | |
prog_name=$(basename ${0}) | |
if [[ -z "$1" || -z "$2" ]] | |
then | |
echo "Usage: ${prog_name} <REPO> <SUBDIR> [<DEST>]" | |
exit 1 |
# Bash completion of conda environment names {{{3 | |
# | |
# Triggered on: | |
# - ``conda activate <TAB>`` | |
# - ``conda ... --clone <TAB>`` | |
# - ``conda ... --name <TAB>`` | |
# | |
# (C) 2021 Jeet Sukumaran | |
# (Free to use under the MIT License terms) | |
function _conda_env_complete() { |
# Colorized ``ls`` | |
# | |
# ``ls`` has native support for colorizing the entries themselves, which can | |
# be seen by running ``ls --color`` or ``ls --color=auto``, and this can be | |
# made standard by aliasing these to ``ls`` in your ``.bashrc. | |
# | |
# The colors of the file/directory entries themselves can be customized by | |
# adding the following in your ``~/.bashrc`` : | |
# |
#! /usr/bin/env python | |
############################################################################### | |
## | |
## Copyright 2014 Jeet Sukumaran. | |
## | |
## This program is free software; you can redistribute it and/or modify | |
## it under the terms of the GNU General Public License as published by | |
## the Free Software Foundation; either version 3 of the License, or | |
## (at your option) any later version. |