diff --git a/LICENSE b/LICENSE deleted file mode 100644 index e543896..0000000 --- a/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -/* -* -------------------------------------------------------------------------------- -* "THE NO-ALCOHOL BEER-WARE LICENSE" (Revision 42): -* Phyks (webmaster@phyks.me) wrote this file. As long as you retain this notice you -* can do whatever you want with this stuff (and you can also do whatever you want -* with this stuff without retaining it, but that's not cool...). If we meet some -* day, and you think this stuff is worth it, you can buy me a --beer-- soda in -* return. -* Phyks -* --------------------------------------------------------------------------------- -*/ diff --git a/README.md b/README.md deleted file mode 100644 index 821fcff..0000000 --- a/README.md +++ /dev/null @@ -1,76 +0,0 @@ -Blogit -====== - -A git based blogging software. Just as Jekyll and so, it takes your articles as -html files and computes them to generate static page and RSS feed to serve -behind a webserver. It uses git as a backend file manager (as git provide some -useful features like history and hooks) and Python for scripting the conversion -process. You can customize the python scripts to handle special tags (ie, not -standard HTML tags) just as <code> for example. See params file in raw -dir to modify this. - -This project is still a WIP. - -How it works ? -============== - -There are three directories under the tree : raw for your raw HTML articles and -header/footer, gen (created by the script) for the temporary generated files -and blog for the blog folder to serve behind the webserver. - -Articles must be in folders year/month/ARTICLE.html (ARTICLE is whatever you -want) and some extras comments must be put in the article file for the script -to handle it correctly. See the test.html example file for more info on how to -do it. - -You can put a file in "wait mode" and don't publish it yet, just by adding -.ignore at the end of its filename; Every file that you put in raw and that is -not a .html file is just copied at the same place in the blog dir (to put -images in your articles, for example, just put them beside your articles and -make a relative link in your HTML article). - -You should change the params file (raw/params) before starting to correctly set -your blog url, your email address and the blog title (among other parameters). - -When you finish editing an article, just git add it and commit. The -pre-commit.py hook will run automatically and generate your working copy. - -Note about tags : Tags are automatically handled and a page for each tag is -automatically generated. A page with all the articles for each month and each -year is also automatically generated. - -Note : Don't remove gen/ content unless you know what you're doing. These files -are temporary files for the blog generation but they are useful to regenerate -the RSS feed for example. If you delete them, you may need to regenerate them. - -Important note : This is currently a beta version and the hook isn't set to run -automatically for now. You have to manually run pre-commit.py (or move it to -.git/hooks but this has never been tested ^^). - -Example of syntax for an article -================================ -```HTML - -
(== Whatever you want)
-``` - -LICENSE -======= -TLDR; I don't give a damn to anything you can do using this code. It would just -be nice to quote where the original code comes from. - - -* ----------------------------------------------------------------------------- -* "THE NO-ALCOHOL BEER-WARE LICENSE" (Revision 42): -* Phyks (webmaster@phyks.me) wrote this file. As long as you retain this notice -* you can do whatever you want with this stuff (and you can also do whatever -* you want with this stuff without retaining it, but that's not cool...). If we -* meet some day, and you think this stuff is worth it, you can buy me a -* beer soda in return. -* Phyks -* ------------------------------------------------------------------------------ diff --git a/pre-commit.py b/pre-commit.py index c82f4df..cb7be26 100755 --- a/pre-commit.py +++ b/pre-commit.py @@ -537,8 +537,8 @@ for filename in added_files+modified_files: if tags_comma != "": tags_comma += ", " - tags_comma += ("" + - tag+"") + tags_comma += (""+tag+"") # Write generated HTML for this article in gen / article = replace_tags(article, search_list, replace_list) @@ -556,7 +556,8 @@ for filename in added_files+modified_files: "\">"+title+"\n" "\t\t"+article+"\n" "\t\t

"+date_readable+"

\n" - "\t\t

"+tags_comma+"

\n" + "\t\t

Tags : "+tags_comma + + "

\n" "\t\n" "\n") print("[INFO] (GEN ARTICLES) Article "+filename[4:]+" generated") @@ -567,7 +568,7 @@ for filename in added_files+modified_files: # Starting to generate header file (except title) tags_header = "" for tag in tags_full_list: - tags_header += "
" + tags_header += "
" tags_header += ("\"test\"") tags_header += (""+tag[9:-4]+"") @@ -580,7 +581,7 @@ except IOError: header = header.replace("@tags", tags_header, 1) header = header.replace("@blog_url", params["BLOG_URL"]) -articles_header = "

"+"Archives

") +articles_header += ("
  • "+"Archives
  • ") header = header.replace("@articles", articles_header, 1) try: diff --git a/raw/footer.html b/raw/footer.html index 7681d48..2094550 100644 --- a/raw/footer.html +++ b/raw/footer.html @@ -1,4 +1,4 @@ -
    -
    - + + + diff --git a/raw/header.html b/raw/header.html index 459e00b..6e90f56 100644 --- a/raw/header.html +++ b/raw/header.html @@ -1,30 +1,41 @@ - + - - - @titre - - - -
    -
    -

    Phyks' Blog

    -

    -

    Catégories

    -
    - @categories -
    -
    -

    Derniers articles

    -
    - @articles -
    -
    -

    Liens

    - -
    -
    + + + @titre + + + + + +
    + + + + + + +
    + diff --git a/raw/params b/raw/params index 2121b50..1040a65 100644 --- a/raw/params +++ b/raw/params @@ -1,12 +1,12 @@ BLOG_TITLE = Phyks' blog NB_ARTICLES_INDEX = 20 -BLOG_URL = file:///home/lucas/Blog/git/blog/ +BLOG_URL = http://localhost/Blog_test/blog/ #RSS params WEBMASTER = webmaster@phyks.me (Phyks) LANGUAGE = fr -DESCRIPTION = -COPYRIGHT = +DESCRIPTION = Test de desc +COPYRIGHT = CC L0 #Personal replacements #Items are passed as arguments to a python regex,