Coder Social home page Coder Social logo

someodd / burrow Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 1.0 1.3 MB

Static gopherhole generator.

Home Page: https://www.someodd.zip/showcase/burrow/

License: GNU General Public License v3.0

Haskell 93.17% Makefile 0.88% Shell 4.39% Dockerfile 1.57%
atom gopher-protocol markdown static-site-generator

burrow's Introduction

burrow's People

Contributors

github-actions[bot] avatar someodd avatar sternenseemann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

morrowm

burrow's Issues

ToGopherMenu complexity

Now that prefixing each non-linking line in a gophermap/menu with i is no longer required (see: #1) is src/Markdown/ToGopherMenu.hs needlessly complex?

Could the exact same desired result be achieved with the ToTextFile version, except a different way of handling links?

Are there some advantages to keeping the abstraction this way? If not, save maintenance time and number of lines by simply sharing, mostly, the same code for both Markdown parsers (could be placed in src/Markdown/Common.hs), with the exception of the link parser.

better testing features

Thinking of this because I want to have a testing and prod config.

be able to specify .ini config with --config for build

docker able to build local dev version?

More mustache lambdas

Ideas:

  • Image to ASCII art
  • "Floating" ASCII art blocks to the right (so text surrounds it?)
  • Support arguments for lambdas

CLI-defined input and output paths

Ignoring the path variable from the CLI and just using the INI to get the output directory and input directory.

Need to either drop CLI support for defining the input and output path and compeltely rely on the ini file, or completely implement support for the CLi args.

This may also go hand-in-hand with adding a config abstraction, because then the config abstraction could have its output/input entries changed early on before it's passed around. Related: #20

Turns out, it's not impossible

➜  gopherhole-new-someodd git:(master) git push origin master
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 8 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 1.32 KiB | 1.32 MiB/s, done.
Total 5 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Cloning into '/tmp/gopherhole-clone'...
remote: done.
remote: burrow: this should be impossible!
remote: CallStack (from HasCallStack):
remote:   error, called at src/Markdown.hs:342:16 in burrow-0.1.14.0-inplace:Markdown
To gopherhole:/srv/git/gopherhole.git
   4a3560a..a64ee5b  master -> master

font spec: first line should be list of flags, other changes

Such as uppercase only or lowercase only, but done in a comma-delimited list like:

upercase only, monospaced.

This would be a good time to implement support for non-monospaced fonts, too.

Should rename the extension then from bmf (burrow monospaced font) to baaf (burrow ascii art font).

Bug encountered when trying to port jekyll posts

➜  gopherhole-new-someodd git:(master) git push origin master
Enumerating objects: 11, done.
Counting objects: 100% (11/11), done.
Delta compression using up to 8 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 11.41 KiB | 11.41 MiB/s, done.
Total 7 (delta 3), reused 0 (delta 0), pack-reused 0
remote: Cloning into '/tmp/gopherhole-clone'...
remote: done.
remote: burrow: this should be impossible!
remote: CallStack (from HasCallStack):
remote:   error, called at src/Markdown.hs:342:16 in burrow-0.1.14.0-inplace:Markdown
To gopherhole:/srv/git/gopherhole.git

Relevant line:

lineToText _ = error "this should be impossible!" -- FIXME

command to list all tags found

Along with how many posts per tag. This would be nice for keeping tags nice and organized, among other purposes (like if someone wanted to pipe it into some tagcloud app).

nix build only works in develop environment?

➜  burrow git:(master) nix run .#burrow -- build
burrow: data/fonts/basicthorpe.bmf: hGetContents: invalid argument (invalid byte sequence)
➜  burrow git:(master) nix run .#burrow -- build
➜  burrow git:(master) vim data/
➜  burrow git:(master) nix develop
tilde@framework:~/Projects/burrow$ nix run .#burrow -- build
tilde@framework:~/Projects/burrow$ ls
app           burrowsrc      data           flake.nix  README.md  templates
built         cabal.project  dist-newstyle  LICENSE    result
burrow.cabal  CHANGELOG.md   flake.lock     Makefile   src
tilde@framework:~/Projects/burrow$ 

testing

doctests, quickcheck, conventional tests

better errors--more of them!

Implement descriptive and helpful error messages for the end user:

  • pairToPostMeta if one of the required bits that are of the type Maybe a turns out to be Nothing.
  • better error for when call partial no exist/better error for when template file called to from frontmatter (parentTemplate) which doesn't exist.

more configuration settings

  • list bullet styles configuration and their spacing
  • Option to generate spacecookie.json from gopherhole.ini (can also derive optoins form the spacecookie.json). Is it necessary to include a spacecookie.json at all? Maybe you shouldn't.

docker hgetfilecontents error

When using the docker setup, the docker locale needs to be set up for hGetFileContents to work specifically for the fonts (bmf), I have no idea what's up with that.

https://stackoverflow.com/questions/30421845/haskell-quotefile-fails-on-text-file-with-invalid-byte-sequence-on-unicode-ch

This worked (in the Docker container, note i disabled deleting /tmp/gopherhole-clone in the post-receive git hook so i could do this build command cd to the tmp version):

cd /tmp/gopherhole-clone
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
export LANG=en_US.UTF8 burrow build
edit the file /etc/locale.gen, append new line en_US.UTF-8 UTF-8
invoke locale-gen to generate locales.
export LANG variable.

More CLI options

Need to add some features for the CLI:

  • define source and destination directories (see: #25)
  • define a config file path

Link bug: gopher:// links

there's an error in the link parser for gopher:// links. It needs to tokenize the URI so it can create a valid gopher link to external resources.

cli to add blog posts

would be nice because it would add frontmatter with correct timestamp and all that

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.