Code Monkey home page Code Monkey logo

volt's Introduction

Greetings visitor 👋

My name is Wibowo Arindrarto. I go by Bow.

I am a software developer with a formal background in biomedical science. Here you can find some of my public work.


All-Time Stats

volt's People

Contributors

bow avatar dependabot[bot] avatar pyup-bot avatar spaetz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

volt's Issues

Documentation

This would be the main reference for Volt, covering:

  • The subcommands
  • How to build a basic site
  • How to extend a site using Engines, Plugins, and Widgets,

crash when paginations refer to inexisting header keys

This is my ENGINE_BLOG Config(): PAGINATIONS = ('', 'tag/{tags}',...

However, on "volt gen", it aborts with:

File "/home/spaetz/local/lib/python3.3/site-packages/Volt-0.0.2-py3.3.egg/volt/engine/core.py", line 276, in
item_list_per_unit = (getattr(x, field) for x in units)
AttributeError: 'TextUnit' object has no attribute 'tags'

And indeed, most of my posts don't have a ---

tags: foo

in their post. Would it be possible to robustify this, to assume an empty value if non-existant rather than bailing out? I don't really want to insert an empty "tags: " line in those posts if not needed. And it might be worthwhile to fix this to work (ie not bail out) on all possible attributes.

I really love volt. It's nicely done. I am still fuzzing with the styles, but you can see it in action at http://sspaeth.de

Initial Update

Hi 👊

This is my first visit to this fine repo, but it seems you have been working hard to keep all dependencies updated so far.

Once you have closed this issue, I'll create seperate pull requests for every update as soon as I find one.

That's it for now!

Happy merging! 🤖

Unable to change excerpt length

Hello, I am unable to change the excerpt length regardless of what character length I try.
I changed from the default 400 to 25 and different values in between with no change. Is there anywhere else I need to change this? I found the following code in volt conf.py Thanks

# Excerpt length (in characters) for paginated items
EXCERPT_LENGTH = 25,

slugify can only handle ASCII chars

So far slugify can only work when the title consists of ASCII only (it removes some special chars, though). Being a German I tend to have a few Umlauts in my titles though and volt bombs out. I can see a few ways to handle this better from the volt side of things:

  1. Filter out even more special chars, using a list such as öäü. I did this by adding it to the list of RE_PRUNE (or similar) regexp.
  2. Filter out all non-ascii chars by adding \W to the list of pruned chars. (more general solution)
  3. Use maketrans and str.translate to replace some chars with others, this would not work well for e.g. ä which needs to become 'ae'.
  4. Add more replacement rules that replace öäü with oe, ae, ue etc...
  5. Allow to have umlauts in slugs (not sure how web servers handle that)

Personally, I think #2 might be the easiest solution.This seems also in line with what e.g. django does on slugify:
"Converts to lowercase, removes non-word characters (alphanumerics and underscores) and converts spaces to hyphens. Also strips leading and trailing whitespace."

If RE_PRUNE would strip all non-ascii chars, this would also make the whole non-ascii check in lines 459-469 redundant.

Allow customized atom_template.xml (hard to do now)

Hi bow,
Today I tought my atom feed at http://sspaeth.de/index.atom to include the language tag of my posts. While doing that I discovered that the atomic plugin allows you to specify a template file name in the CONFIG, but the directory is hardcoded to the atomic plugin one, which is usually not reachable for a user that has a system installation of volt. It would rather make sense to be able to specify the TEMPLATE_DIR in the plugin configuration, or even better to:

  1. Check the users TEMPLATE_DIR for the template file, and if not there fall back to the built-in one.

I have solved to issue for myself by doing "volt ext --builtin atomic" and hacking the code to use CONFIG.SITE.TEMPLATE_DIR, but I would be happier if I could use the upstream plugin.

what does "All engines are inactive" mean?how to fix it?

hi.

as3:/volt# mkdir volt-site
as3:
/volt# cd volt-site
as3:~/volt/volt-site# volt init

Volt project started. Have fun!

as3:/volt/volt-site# volt gen
All engines are inactive -- nothing to generate.
as3:
/volt/volt-site# ls
contents templates voltconf.py voltconf.pyc

tks

Volt "crash"

  1. Install volt
  2. Run "volt serve" without any previous configuration in an empty dir:

Traceback (most recent call last):
...
File "/usr/local/lib/python2.7/dist-packages/Volt-0.0.2-py2.7.egg/volt/config/init.py", line 144, in prep_template
if hasattr(user_widget, func_name):
UnboundLocalError: local variable 'user_widget' referenced before assignment

And indeed, volt/config/init.py fails a few lines above "if the user does not have any widget file" and then bombs out on line 144 where the variable "user_widget" is supposed to exist.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.