oops got corrupted
This commit is contained in:
parent
4ad8241505
commit
a50b56d7e4
|
@ -84,14 +84,18 @@ def deleteOldRaw():
|
|||
shutil.rmtree(config.raw_folder)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# network = loadNetwork()
|
||||
# network = censorNetwork(network)
|
||||
def grabFiles():
|
||||
deleteOldRaw()
|
||||
AllFiles = TagHelper.getAllFiles()
|
||||
FilteredFiles = filterFiles(AllFiles)
|
||||
copyFiles(FilteredFiles)
|
||||
print("Censoring files...")
|
||||
censorFiles()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# network = loadNetwork()
|
||||
# network = censorNetwork(network)
|
||||
# print("Converting files...")
|
||||
# convertFiles()
|
||||
grabFiles()
|
||||
|
|
|
@ -1,25 +1,23 @@
|
|||
import basant.grab.kitaab as grab
|
||||
from basant.shared import TagHelper
|
||||
#! /usr/bin/env python
|
||||
|
||||
# import basant.grab.kitaab as grab
|
||||
import basant.build.kitaab as build
|
||||
|
||||
|
||||
def get_raw_files():
|
||||
all_files = TagHelper.getAllFiles()
|
||||
filtered_files = grab.kitaab.filterFiles(all_files)
|
||||
grab.kitaab.copyFiles(filtered_files)
|
||||
print("Censoring files...")
|
||||
grab.kitaab.censorFiles()
|
||||
print('grabbing files')
|
||||
# grab.kitaab.grabFiles()
|
||||
|
||||
|
||||
def build_website():
|
||||
print('building websites')
|
||||
build.kitaab.generate_website()
|
||||
build.generate_website()
|
||||
|
||||
|
||||
def main():
|
||||
# get_raw_files()
|
||||
get_raw_files()
|
||||
build_website()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
build_website()
|
||||
|
|
|
@ -3,7 +3,7 @@ nav_tags = ['dev', 'way', 'recipe', 'ops', 'blog',
|
|||
'rock', 'phil', 'story', 'blog', 'untagged']
|
||||
relative_build_url = ""
|
||||
absolute_build_url = "https://anish.lakhwara.com/"
|
||||
files_folder = '/home/anish/vimwiki'
|
||||
files_folder = '/home/anish/vimwiki2'
|
||||
build_folder = "output/"
|
||||
assets_folder = "./basant/assets/"
|
||||
medias_folder = "./basant/media/"
|
||||
|
|
42
flake.nix
42
flake.nix
|
@ -41,5 +41,47 @@
|
|||
propagatedBuildInputs = [ python-with-my-packages ];
|
||||
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
|
||||
project_urls={"Source code": "https://git.sealight.xyz/aynish/basant"},
|
||||
url="https://git.sealight.xyz/aynish/basant",
|
||||
scripts=['basant/main.py'],
|
||||
packages=find_packages(),
|
||||
setup_requires=["setuptools"],
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue