oops got corrupted
This commit is contained in:
parent
4ad8241505
commit
a50b56d7e4
|
@ -84,14 +84,18 @@ def deleteOldRaw():
|
||||||
shutil.rmtree(config.raw_folder)
|
shutil.rmtree(config.raw_folder)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
def grabFiles():
|
||||||
# network = loadNetwork()
|
|
||||||
# network = censorNetwork(network)
|
|
||||||
deleteOldRaw()
|
deleteOldRaw()
|
||||||
AllFiles = TagHelper.getAllFiles()
|
AllFiles = TagHelper.getAllFiles()
|
||||||
FilteredFiles = filterFiles(AllFiles)
|
FilteredFiles = filterFiles(AllFiles)
|
||||||
copyFiles(FilteredFiles)
|
copyFiles(FilteredFiles)
|
||||||
print("Censoring files...")
|
print("Censoring files...")
|
||||||
censorFiles()
|
censorFiles()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
# network = loadNetwork()
|
||||||
|
# network = censorNetwork(network)
|
||||||
# print("Converting files...")
|
# print("Converting files...")
|
||||||
# convertFiles()
|
# convertFiles()
|
||||||
|
grabFiles()
|
||||||
|
|
|
@ -1,25 +1,23 @@
|
||||||
import basant.grab.kitaab as grab
|
#! /usr/bin/env python
|
||||||
from basant.shared import TagHelper
|
|
||||||
|
# import basant.grab.kitaab as grab
|
||||||
import basant.build.kitaab as build
|
import basant.build.kitaab as build
|
||||||
|
|
||||||
|
|
||||||
def get_raw_files():
|
def get_raw_files():
|
||||||
all_files = TagHelper.getAllFiles()
|
print('grabbing files')
|
||||||
filtered_files = grab.kitaab.filterFiles(all_files)
|
# grab.kitaab.grabFiles()
|
||||||
grab.kitaab.copyFiles(filtered_files)
|
|
||||||
print("Censoring files...")
|
|
||||||
grab.kitaab.censorFiles()
|
|
||||||
|
|
||||||
|
|
||||||
def build_website():
|
def build_website():
|
||||||
print('building websites')
|
print('building websites')
|
||||||
build.kitaab.generate_website()
|
build.generate_website()
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
# get_raw_files()
|
get_raw_files()
|
||||||
build_website()
|
build_website()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
build_website()
|
||||||
|
|
|
@ -3,7 +3,7 @@ nav_tags = ['dev', 'way', 'recipe', 'ops', 'blog',
|
||||||
'rock', 'phil', 'story', 'blog', 'untagged']
|
'rock', 'phil', 'story', 'blog', 'untagged']
|
||||||
relative_build_url = ""
|
relative_build_url = ""
|
||||||
absolute_build_url = "https://anish.lakhwara.com/"
|
absolute_build_url = "https://anish.lakhwara.com/"
|
||||||
files_folder = '/home/anish/vimwiki'
|
files_folder = '/home/anish/vimwiki2'
|
||||||
build_folder = "output/"
|
build_folder = "output/"
|
||||||
assets_folder = "./basant/assets/"
|
assets_folder = "./basant/assets/"
|
||||||
medias_folder = "./basant/media/"
|
medias_folder = "./basant/media/"
|
||||||
|
|
42
flake.nix
42
flake.nix
|
@ -41,5 +41,47 @@
|
||||||
propagatedBuildInputs = [ python-with-my-packages ];
|
propagatedBuildInputs = [ python-with-my-packages ];
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
};
|
};
|
||||||
|
packages.site = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "anish-lakhwara-site";
|
||||||
|
src = ./.;
|
||||||
|
buildInputs = [ pkgs.python3 ];
|
||||||
|
buildPhase = ''
|
||||||
|
${self.defaultPackage.${system}}/bin/main.py
|
||||||
|
'';
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp -R output/* $out/
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
#nixosModule = { options, lib, config, pkgs, ... }:
|
||||||
|
# let
|
||||||
|
# serverName = "anish.lakhwara.com";
|
||||||
|
# webRoot = "/var/www/${serverName}";
|
||||||
|
|
||||||
|
# serviceConfig = config.services."${serverName}";
|
||||||
|
# options = {
|
||||||
|
# enable = lib.mkEnableOption "${serverName} service";
|
||||||
|
# };
|
||||||
|
# in
|
||||||
|
# {
|
||||||
|
# options.services.${serverName} = options;
|
||||||
|
# config = lib.mkIf serviceConfig.enable {
|
||||||
|
# systemd.services."source-${serverName}" = {
|
||||||
|
# description = ''
|
||||||
|
# https://${serverName} source
|
||||||
|
# '';
|
||||||
|
# serviceConfig = {
|
||||||
|
# Type = "oneshot";
|
||||||
|
# };
|
||||||
|
# startAt = "*00:00:00";
|
||||||
|
# path = with pkgs; [ nix gnutar gzip curl jq ];
|
||||||
|
# script = ''
|
||||||
|
# set -ex
|
||||||
|
|
||||||
|
# ln -sfT ${flake.packages.system.site} ${webRoot}
|
||||||
|
# '';
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
0
package.nix
Normal file
0
package.nix
Normal file
1
setup.py
1
setup.py
|
@ -7,6 +7,7 @@ setup(
|
||||||
# TODO: broken because of import stuff, need to refactor app somehow
|
# TODO: broken because of import stuff, need to refactor app somehow
|
||||||
project_urls={"Source code": "https://git.sealight.xyz/aynish/basant"},
|
project_urls={"Source code": "https://git.sealight.xyz/aynish/basant"},
|
||||||
url="https://git.sealight.xyz/aynish/basant",
|
url="https://git.sealight.xyz/aynish/basant",
|
||||||
|
scripts=['basant/main.py'],
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
setup_requires=["setuptools"],
|
setup_requires=["setuptools"],
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue