getting closer

This commit is contained in:
Anish Lakhwara 2022-04-03 23:22:35 +10:00
parent 155513a8bd
commit b03568cfcc
15 changed files with 23 additions and 19 deletions

2
.gitignore vendored
View file

@ -5,7 +5,7 @@ __pycache__/*
.tags .tags
.vimwiki_tags .vimwiki_tags
.vim/* .vim/*
censor.py .lsp/
.envrc .envrc
.direnv/* .direnv/*
./raw/* ./raw/*

View file

@ -1,5 +1,5 @@
from . import mistune from . import mistune
from shared import TagHelper, config from basant.shared import TagHelper, config
from jinja2 import Environment, FileSystemLoader from jinja2 import Environment, FileSystemLoader
import argparse import argparse
import glob import glob

View file

@ -6,7 +6,7 @@
# filter - leave names in tact but do not link to relevant documents # filter - leave names in tact but do not link to relevant documents
# create - list in an index file for website # create - list in an index file for website
from basant.shared import TagHelper, config, helpers from basant.shared import TagHelper, config, helpers
from basant.shared.censor import privateList from basant.shared import censor as c
from os import listdir, mkdir, path, remove from os import listdir, mkdir, path, remove
import shutil import shutil
from . import convert from . import convert
@ -14,7 +14,7 @@ import os
# TODO: generalize based on headings(?) in index.wiki # TODO: generalize based on headings(?) in index.wiki
censor = privateList censor = c.privateList
# TODO put this in config too... # TODO put this in config too...
filter = ["dream", "gratitude", "review", "jrnl", "work", "job", "debt", filter = ["dream", "gratitude", "review", "jrnl", "work", "job", "debt",
"people", "priv", "threatdefence", "info"] "people", "priv", "threatdefence", "info"]

View file

@ -1,9 +1,9 @@
import json import json
import random import random
from shared import helpers from basant.shared import helpers
import shared.censor import basant.shared.censor
censor = shared.censor.privateList censor = basant.shared.censor.privateList
def loadNetwork(path='network.json'): def loadNetwork(path='network.json'):

View file

@ -1,6 +1,6 @@
import grab.kitaab import basant.grab.kitaab as grab
from shared import TagHelper from basant.shared import TagHelper
import build.kitaab import basant.build.kitaab as build
def get_raw_files(): def get_raw_files():
@ -17,7 +17,7 @@ def build_website():
def main(): def main():
get_raw_files() # get_raw_files()
build_website() build_website()

View file

@ -1,8 +1,9 @@
from ctags import CTags, TagEntry from ctags import CTags, TagEntry
import sys import sys
from os import listdir, path from os import listdir, path
from . import config from . import config, censor as c
from .censor import privateList
privateList = c.privateList
def getAllFiles(): def getAllFiles():

2
basant/shared/censor.py Normal file
View file

@ -0,0 +1,2 @@
privateList = ['y0x3y', 'piracy', 'weed', 'drugs', 'gel capsules',
'no weed', 'hackres town', 'hackers.town', 'radicalEd']

View file

@ -8,12 +8,12 @@ build_folder = "output/"
assets_folder = "assets/" assets_folder = "assets/"
medias_folder = "media/" medias_folder = "media/"
raw_folder = "raw/" raw_folder = "raw/"
template_main = "build/partial/main.html" template_main = "partial/main.html"
template_nav = "build/partial/nav.html" template_nav = "partial/nav.html"
template_index = "build/partial/index_table.html" template_index = "partial/index_table.html"
template_list = "build/partial/list.html" template_list = "partial/list.html"
rss_template = "build/partial/rss.xml" rss_template = "partial/rss.xml"
rss_item_template = "build/partial/item.xml" rss_item_template = "partial/item.xml"
name_of_site = "Kitaab" name_of_site = "Kitaab"
site_meta_description = "" site_meta_description = ""
twitter_name = "@aynish@merveilles.town" twitter_name = "@aynish@merveilles.town"

View file

@ -39,6 +39,7 @@
src = ./.; src = ./.;
version = "0.1"; version = "0.1";
propagatedBuildInputs = [ python-with-my-packages ]; propagatedBuildInputs = [ python-with-my-packages ];
doCheck = false;
}; };
}); });
} }